]> code.delx.au - pulseaudio/commitdiff
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 2a734e3555d0375f71a0861b25c241677db64a88..1c38430f22b36fa2ad2f3add191dee19b0152a38 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 ed9c148045dbb1b5dfcd3a94cae70f042a002c74..9a51f85729d17691f46d88189a26f1c3f4bca344 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;