mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-10-31 22:25:35 -04:00
pcm: plug plugin - fast_ops may be changed when sw_params are set
Link: https://github.com/alsa-project/alsa-lib/issues/372 Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
parent
d4992c36cc
commit
19e6349182
1 changed files with 13 additions and 1 deletions
|
|
@ -1065,6 +1065,18 @@ static int snd_pcm_plug_hw_free(snd_pcm_t *pcm)
|
|||
return err;
|
||||
}
|
||||
|
||||
static int snd_pcm_plug_sw_params(snd_pcm_t *pcm, snd_pcm_sw_params_t * params)
|
||||
{
|
||||
snd_pcm_plug_t *plug = pcm->private_data;
|
||||
snd_pcm_t *slave = plug->gen.slave;
|
||||
int err = snd_pcm_sw_params(slave, params);
|
||||
if (err >= 0) {
|
||||
pcm->fast_ops = slave->fast_ops;
|
||||
pcm->fast_op_arg = slave->fast_op_arg;
|
||||
}
|
||||
return err;
|
||||
}
|
||||
|
||||
static void snd_pcm_plug_dump(snd_pcm_t *pcm, snd_output_t *out)
|
||||
{
|
||||
snd_pcm_plug_t *plug = pcm->private_data;
|
||||
|
|
@ -1078,7 +1090,7 @@ static const snd_pcm_ops_t snd_pcm_plug_ops = {
|
|||
.hw_refine = snd_pcm_plug_hw_refine,
|
||||
.hw_params = snd_pcm_plug_hw_params,
|
||||
.hw_free = snd_pcm_plug_hw_free,
|
||||
.sw_params = snd_pcm_generic_sw_params,
|
||||
.sw_params = snd_pcm_plug_sw_params,
|
||||
.channel_info = snd_pcm_generic_channel_info,
|
||||
.dump = snd_pcm_plug_dump,
|
||||
.nonblock = snd_pcm_generic_nonblock,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue