Skip to contentSkip to conversation

alsa-lib: alsa dshare endless playback of buffer

PATCH Applied [email protected] 2 participants 2 messages Nov 25, 2016 – Nov 28, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 alsa-lib: alsa dshare endless playback of buffer

From: Anant Agrawal <[email protected]>

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.

---

src/pcm/pcm_dshare.c +1 -0
@@ -195,6 +195,7 @@
 		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;
Applied
#1 lore raw
Quoted 8 lines · On Fri, 25 Nov 2016 12:13:34 +0100, [email protected] wrote:

From: Anant Agrawal <[email protected]>

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.

Applied, thanks.

Takashi

Quoted 13 lines

---

src/pcm/pcm_dshare.c +1 -0
@@ -195,6 +195,7 @@
 		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;