summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnant Agrawal <Anant_Agrawal@mentor.com>2016-11-25 16:43:34 +0530
committerTakashi Iwai <tiwai@suse.de>2016-11-28 20:17:03 +0100
commit876563c824bdecbf771a0e7bda472b0a1c19d900 (patch)
treede8b2cc9bbaf8aa9e39e28b9c71d9917b9ee9b83
parent2dd78251ff0c4009b478574cca7aef2eb05c2279 (diff)
downloadalsa-lib-876563c824bdecbf771a0e7bda472b0a1c19d900.tar.gz
pcm: dshare: Fix endless playback of buffer
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>
-rw-r--r--src/pcm/pcm_dshare.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/pcm/pcm_dshare.c b/src/pcm/pcm_dshare.c
index 01f5eed8..29cd6c6d 100644
--- a/src/pcm/pcm_dshare.c
+++ b/src/pcm/pcm_dshare.c
@@ -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;