mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-03 09:01:52 -05:00
- fixed the unlink_{hw,app}_ptr of slaves.
- removed the invalid unlink_ptr assersion.
This commit is contained in:
parent
2cd18ddc57
commit
0c156a3c89
2 changed files with 5 additions and 1 deletions
|
|
@ -6291,7 +6291,7 @@ static void snd_pcm_unlink_ptr(snd_pcm_t *pcm, snd_pcm_rbptr_t *pcm_rbptr,
|
||||||
goto __found;
|
goto __found;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
assert(0);
|
/* assert(0); */
|
||||||
return;
|
return;
|
||||||
|
|
||||||
__found:
|
__found:
|
||||||
|
|
|
||||||
|
|
@ -70,6 +70,8 @@ static int snd_pcm_plug_close(snd_pcm_t *pcm)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
if (plug->close_slave) {
|
if (plug->close_slave) {
|
||||||
|
snd_pcm_unlink_hw_ptr(pcm, plug->req_slave);
|
||||||
|
snd_pcm_unlink_appl_ptr(pcm, plug->req_slave);
|
||||||
err = snd_pcm_close(plug->req_slave);
|
err = snd_pcm_close(plug->req_slave);
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
result = err;
|
result = err;
|
||||||
|
|
@ -313,6 +315,8 @@ static void snd_pcm_plug_clear(snd_pcm_t *pcm)
|
||||||
snd_pcm_t *slave = plug->req_slave;
|
snd_pcm_t *slave = plug->req_slave;
|
||||||
/* Clear old plugins */
|
/* Clear old plugins */
|
||||||
if (plug->slave != slave) {
|
if (plug->slave != slave) {
|
||||||
|
snd_pcm_unlink_hw_ptr(pcm, plug->slave);
|
||||||
|
snd_pcm_unlink_appl_ptr(pcm, plug->slave);
|
||||||
snd_pcm_close(plug->slave);
|
snd_pcm_close(plug->slave);
|
||||||
plug->slave = slave;
|
plug->slave = slave;
|
||||||
pcm->fast_ops = slave->fast_ops;
|
pcm->fast_ops = slave->fast_ops;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue