pcm: fix the fast_ops pcm argument for fast_ops

The fast_ops callback invocation must always pass the fast_op_arg
as the pcm argument. Plugins expect that.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
Jaroslav Kysela 2022-11-14 14:34:46 +01:00
parent 78b20e3caa
commit 425e4d1fbe
4 changed files with 7 additions and 6 deletions

View file

@ -1705,7 +1705,7 @@ int snd_pcm_link(snd_pcm_t *pcm1, snd_pcm_t *pcm2)
assert(pcm1);
assert(pcm2);
if (pcm1->fast_ops->link)
err = pcm1->fast_ops->link(pcm1, pcm2);
err = pcm1->fast_ops->link(pcm1->fast_op_arg, pcm2);
else
err = -ENOSYS;
return err;
@ -1722,7 +1722,7 @@ int snd_pcm_unlink(snd_pcm_t *pcm)
assert(pcm);
if (pcm->fast_ops->unlink)
err = pcm->fast_ops->unlink(pcm);
err = pcm->fast_ops->unlink(pcm->fast_op_arg);
else
err = -ENOSYS;
return err;