From 3ede7e4c01e0c429d4b6ac7a3eb25d7e6753ba21 Mon Sep 17 00:00:00 2001 From: Colin Guthrie Date: Sun, 6 Jun 2010 21:19:34 +0100 Subject: [PATCH] alsa: Fix assertion on mmap_write (triggered via a52 plugin) --- src/modules/alsa/alsa-sink.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/modules/alsa/alsa-sink.c b/src/modules/alsa/alsa-sink.c index 35a806c..2995c3c 100644 --- a/src/modules/alsa/alsa-sink.c +++ b/src/modules/alsa/alsa-sink.c @@ -610,6 +610,9 @@ static int mmap_write(struct userdata *u, pa_usec_t *sleep_usec, pa_bool_t polle if (PA_UNLIKELY((sframes = snd_pcm_mmap_commit(u->pcm_handle, offset, frames)) < 0)) { + if (!after_avail && (int) sframes == -EAGAIN) + break; + if ((r = try_recover(u, "snd_pcm_mmap_commit", (int) sframes)) == 0) continue; -- 2.7.4