- fixed the unlink_{hw,app}_ptr of slaves.

- removed the invalid unlink_ptr assersion.
This commit is contained in:
Takashi Iwai 2003-01-27 11:19:04 +00:00
parent 2cd18ddc57
commit 0c156a3c89
2 changed files with 5 additions and 1 deletions

View file

@ -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:

View file

@ -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;