]> git.alsa-project.org Git - alsa-lib.git/commitdiff
pcm: dshare: Fix endless playback of buffer
authorAnant Agrawal <Anant_Agrawal@mentor.com>
Fri, 25 Nov 2016 11:13:34 +0000 (16:43 +0530)
committerTakashi Iwai <tiwai@suse.de>
Mon, 28 Nov 2016 19:17:03 +0000 (20:17 +0100)
On snd_pcm_drain() the slave PCM driven via plugin DSHARE is not filled with
silence. Result is endless playback of buffer content until pcm is closed.
In ALSA pcm dshare plugin, called do_silence method to fix the issue.

Signed-off-by: Anant Agrawal <Anant_Agrawal@mentor.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
src/pcm/pcm_dshare.c

index 01f5eed8f97a1f020a298ac789018f4c1bc49e9d..29cd6c6da1d049dd8b9f97f916cb6942a2e9557c 100644 (file)
@@ -186,6 +186,7 @@ static int snd_pcm_dshare_sync_ptr0(snd_pcm_t *pcm, snd_pcm_uframes_t slave_hw_p
                dshare->avail_max = avail;
        if (avail >= pcm->stop_threshold) {
                snd_timer_stop(dshare->timer);
+               do_silence(pcm);
                gettimestamp(&dshare->trigger_tstamp, pcm->tstamp_type);
                if (dshare->state == SND_PCM_STATE_RUNNING) {
                        dshare->state = SND_PCM_STATE_XRUN;