]> git.alsa-project.org Git - alsa-lib.git/commitdiff
- fixed the unlink_{hw,app}_ptr of slaves.
authorTakashi Iwai <tiwai@suse.de>
Mon, 27 Jan 2003 11:19:04 +0000 (11:19 +0000)
committerTakashi Iwai <tiwai@suse.de>
Mon, 27 Jan 2003 11:19:04 +0000 (11:19 +0000)
- removed the invalid unlink_ptr assersion.

src/pcm/pcm.c
src/pcm/pcm_plug.c

index 1bae7e078434c9afa31e766b2f6447cdfe064c55..2a90b7749e4e92c65ecc6c77c48a8fdcefec2fd0 100644 (file)
@@ -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:
index e8a5f4aef2912dd33e55bdca68a9938e3f642ecf..1798b6ff8835876b792b0ac38e2dd9178e566ea1 100644 (file)
@@ -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;