[pulseaudio-discuss] [PATCH 5/7] alsa-sink: Check for after-avail is redundant

Peter Meerwald pmeerw at pmeerw.net
Thu Oct 23 08:35:48 PDT 2014


From: Peter Meerwald <p.meerwald at bct-electronic.com>

after-avail is always false at this point

Signed-off-by: Peter Meerwald <pmeerw at pmeerw.net>
---
 src/modules/alsa/alsa-sink.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/modules/alsa/alsa-sink.c b/src/modules/alsa/alsa-sink.c
index c8654fb..01c3a66 100644
--- a/src/modules/alsa/alsa-sink.c
+++ b/src/modules/alsa/alsa-sink.c
@@ -648,7 +648,7 @@ static int mmap_write(struct userdata *u, pa_usec_t *sleep_usec, bool polled, bo
 
             if (PA_UNLIKELY((sframes = snd_pcm_mmap_commit(u->pcm_handle, offset, frames)) < 0)) {
 
-                if (!after_avail && (int) sframes == -EAGAIN)
+                if ((int) sframes == -EAGAIN)
                     break;
 
                 if ((r = try_recover(u, "snd_pcm_mmap_commit", (int) sframes)) == 0)
-- 
1.7.9.5



More information about the pulseaudio-discuss mailing list