From 0c156a3c892e9220106c9e953639e20a0f5b92d7 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Mon, 27 Jan 2003 11:19:04 +0000 Subject: [PATCH] - fixed the unlink_{hw,app}_ptr of slaves. - removed the invalid unlink_ptr assersion. --- src/pcm/pcm.c | 2 +- src/pcm/pcm_plug.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/pcm/pcm.c b/src/pcm/pcm.c index 1bae7e07..2a90b774 100644 --- a/src/pcm/pcm.c +++ b/src/pcm/pcm.c @@ -6291,7 +6291,7 @@ static void snd_pcm_unlink_ptr(snd_pcm_t *pcm, snd_pcm_rbptr_t *pcm_rbptr, goto __found; } } - assert(0); + /* assert(0); */ return; __found: diff --git a/src/pcm/pcm_plug.c b/src/pcm/pcm_plug.c index e8a5f4ae..1798b6ff 100644 --- a/src/pcm/pcm_plug.c +++ b/src/pcm/pcm_plug.c @@ -70,6 +70,8 @@ static int snd_pcm_plug_close(snd_pcm_t *pcm) return -EINVAL; } 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); if (err < 0) result = err; @@ -313,6 +315,8 @@ static void snd_pcm_plug_clear(snd_pcm_t *pcm) snd_pcm_t *slave = plug->req_slave; /* Clear old plugins */ 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); plug->slave = slave; pcm->fast_ops = slave->fast_ops; -- 2.47.1