mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-01 22:58:49 -04:00
Fix channel_info callbacks of hooks, file and plug plugins
Fixed channel_info callbacks of hooks, file and plug plugins (BTS #1034). snd_pcm_generic_channel_info_slave() is added.
This commit is contained in:
parent
38f4e69b0c
commit
e5b91844bf
5 changed files with 10 additions and 3 deletions
|
|
@ -343,7 +343,7 @@ static snd_pcm_ops_t snd_pcm_file_ops = {
|
||||||
.hw_params = snd_pcm_file_hw_params,
|
.hw_params = snd_pcm_file_hw_params,
|
||||||
.hw_free = snd_pcm_file_hw_free,
|
.hw_free = snd_pcm_file_hw_free,
|
||||||
.sw_params = snd_pcm_generic_sw_params,
|
.sw_params = snd_pcm_generic_sw_params,
|
||||||
.channel_info = snd_pcm_generic_channel_info,
|
.channel_info = snd_pcm_generic_channel_info_slave,
|
||||||
.dump = snd_pcm_file_dump,
|
.dump = snd_pcm_file_dump,
|
||||||
.nonblock = snd_pcm_generic_nonblock,
|
.nonblock = snd_pcm_generic_nonblock,
|
||||||
.async = snd_pcm_generic_async,
|
.async = snd_pcm_generic_async,
|
||||||
|
|
|
||||||
|
|
@ -103,6 +103,12 @@ int snd_pcm_generic_channel_info(snd_pcm_t *pcm, snd_pcm_channel_info_t *info)
|
||||||
return snd_pcm_channel_info_shm(pcm, info, -1);
|
return snd_pcm_channel_info_shm(pcm, info, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int snd_pcm_generic_channel_info_slave(snd_pcm_t *pcm, snd_pcm_channel_info_t *info)
|
||||||
|
{
|
||||||
|
snd_pcm_generic_t *generic = pcm->private_data;
|
||||||
|
return snd_pcm_channel_info(generic->slave, info);
|
||||||
|
}
|
||||||
|
|
||||||
int snd_pcm_generic_status(snd_pcm_t *pcm, snd_pcm_status_t * status)
|
int snd_pcm_generic_status(snd_pcm_t *pcm, snd_pcm_status_t * status)
|
||||||
{
|
{
|
||||||
snd_pcm_generic_t *generic = pcm->private_data;
|
snd_pcm_generic_t *generic = pcm->private_data;
|
||||||
|
|
|
||||||
|
|
@ -34,6 +34,7 @@ int snd_pcm_generic_sw_params(snd_pcm_t *pcm, snd_pcm_sw_params_t *params);
|
||||||
int snd_pcm_generic_hw_refine(snd_pcm_t *pcm, snd_pcm_hw_params_t *params);
|
int snd_pcm_generic_hw_refine(snd_pcm_t *pcm, snd_pcm_hw_params_t *params);
|
||||||
int snd_pcm_generic_hw_params(snd_pcm_t *pcm, snd_pcm_hw_params_t *params);
|
int snd_pcm_generic_hw_params(snd_pcm_t *pcm, snd_pcm_hw_params_t *params);
|
||||||
int snd_pcm_generic_channel_info(snd_pcm_t *pcm, snd_pcm_channel_info_t * info);
|
int snd_pcm_generic_channel_info(snd_pcm_t *pcm, snd_pcm_channel_info_t * info);
|
||||||
|
int snd_pcm_generic_channel_info_slave(snd_pcm_t *pcm, snd_pcm_channel_info_t * info);
|
||||||
int snd_pcm_generic_status(snd_pcm_t *pcm, snd_pcm_status_t * status);
|
int snd_pcm_generic_status(snd_pcm_t *pcm, snd_pcm_status_t * status);
|
||||||
snd_pcm_state_t snd_pcm_generic_state(snd_pcm_t *pcm);
|
snd_pcm_state_t snd_pcm_generic_state(snd_pcm_t *pcm);
|
||||||
int snd_pcm_generic_prepare(snd_pcm_t *pcm);
|
int snd_pcm_generic_prepare(snd_pcm_t *pcm);
|
||||||
|
|
|
||||||
|
|
@ -126,7 +126,7 @@ static snd_pcm_ops_t snd_pcm_hooks_ops = {
|
||||||
.hw_params = snd_pcm_hooks_hw_params,
|
.hw_params = snd_pcm_hooks_hw_params,
|
||||||
.hw_free = snd_pcm_hooks_hw_free,
|
.hw_free = snd_pcm_hooks_hw_free,
|
||||||
.sw_params = snd_pcm_generic_sw_params,
|
.sw_params = snd_pcm_generic_sw_params,
|
||||||
.channel_info = snd_pcm_generic_channel_info,
|
.channel_info = snd_pcm_generic_channel_info_slave,
|
||||||
.dump = snd_pcm_hooks_dump,
|
.dump = snd_pcm_hooks_dump,
|
||||||
.nonblock = snd_pcm_generic_nonblock,
|
.nonblock = snd_pcm_generic_nonblock,
|
||||||
.async = snd_pcm_generic_async,
|
.async = snd_pcm_generic_async,
|
||||||
|
|
|
||||||
|
|
@ -945,7 +945,7 @@ static snd_pcm_ops_t snd_pcm_plug_ops = {
|
||||||
.hw_params = snd_pcm_plug_hw_params,
|
.hw_params = snd_pcm_plug_hw_params,
|
||||||
.hw_free = snd_pcm_plug_hw_free,
|
.hw_free = snd_pcm_plug_hw_free,
|
||||||
.sw_params = snd_pcm_generic_sw_params,
|
.sw_params = snd_pcm_generic_sw_params,
|
||||||
.channel_info = snd_pcm_generic_channel_info,
|
.channel_info = snd_pcm_generic_channel_info_slave,
|
||||||
.dump = snd_pcm_plug_dump,
|
.dump = snd_pcm_plug_dump,
|
||||||
.nonblock = snd_pcm_generic_nonblock,
|
.nonblock = snd_pcm_generic_nonblock,
|
||||||
.async = snd_pcm_generic_async,
|
.async = snd_pcm_generic_async,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue