alsa: properly treat ESTRPIPE as system suspend
authorLennart Poettering <lennart@poettering.net>
Mon, 3 Aug 2009 22:23:43 +0000 (00:23 +0200)
committerLennart Poettering <lennart@poettering.net>
Mon, 3 Aug 2009 22:23:43 +0000 (00:23 +0200)
src/modules/alsa/alsa-sink.c
src/modules/alsa/alsa-source.c

index 2a734e3..1c38430 100644 (file)
@@ -340,8 +340,8 @@ static int try_recover(struct userdata *u, const char *call, int err) {
     if (err == -EPIPE)
         pa_log_debug("%s: Buffer underrun!", call);
 
-    if (err == -EBADFD)
-        pa_log_debug("%s: Stream suspended!", call);
+    if (err == -ESTRPIPE)
+        pa_log_debug("%s: System suspended!", call);
 
     if ((err = snd_pcm_recover(u->pcm_handle, err, 1)) < 0) {
         pa_log("%s: %s", call, pa_alsa_strerror(err));
index ed9c148..9a51f85 100644 (file)
@@ -333,6 +333,9 @@ static int try_recover(struct userdata *u, const char *call, int err) {
     if (err == -EPIPE)
         pa_log_debug("%s: Buffer overrun!", call);
 
+    if (err == -ESTRPIPE)
+        pa_log_debug("%s: System suspended!", call);
+
     if ((err = snd_pcm_recover(u->pcm_handle, err, 1)) < 0) {
         pa_log("%s: %s", call, pa_alsa_strerror(err));
         return -1;