alsa: properly treat ESTRPIPE as system suspend

This commit is contained in:
Lennart Poettering 2009-08-04 00:23:43 +02:00
parent 3e2ab9b22e
commit 9b2534b6d0
2 changed files with 5 additions and 2 deletions

View 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));

View 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;