mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-10-29 05:40:25 -04:00
Moved some info fields to proper place (setup). Renamed mmap_size to mmap_bytes. Added detailed fail report to params_t. Added params_info to API.
This commit is contained in:
parent
875aed990f
commit
cc79e0c6ea
8 changed files with 271 additions and 109 deletions
|
|
@ -516,9 +516,9 @@ int snd_pcm_mmap_data(snd_pcm_t *handle, void **data)
|
|||
return 0;
|
||||
}
|
||||
|
||||
if (handle->setup.mmap_size == 0)
|
||||
if (handle->setup.mmap_bytes == 0)
|
||||
return -ENXIO;
|
||||
if ((err = handle->ops->mmap_data(handle->op_arg, (void**)&handle->mmap_data, handle->setup.mmap_size)) < 0)
|
||||
if ((err = handle->ops->mmap_data(handle->op_arg, (void**)&handle->mmap_data, handle->setup.mmap_bytes)) < 0)
|
||||
return err;
|
||||
if (data)
|
||||
*data = handle->mmap_data;
|
||||
|
|
@ -575,7 +575,7 @@ int snd_pcm_munmap_data(snd_pcm_t *handle)
|
|||
int err;
|
||||
assert(handle);
|
||||
assert(handle->mmap_data);
|
||||
if ((err = handle->ops->munmap_data(handle->op_arg, handle->mmap_data, handle->setup.mmap_size)) < 0)
|
||||
if ((err = handle->ops->munmap_data(handle->op_arg, handle->mmap_data, handle->setup.mmap_bytes)) < 0)
|
||||
return err;
|
||||
free(handle->channels);
|
||||
handle->channels = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue