From 94ec577dcd005b3a5472ab332948a88dc1bd2279 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Mon, 8 Feb 2021 11:48:32 +0100 Subject: [PATCH] alsa: make sure _recover() works from SUSPENDED Pass -ESTRPIPE to _recover() when our state is SUSPENDED so that it always attempts to resume, regardless of the error code. --- spa/plugins/alsa/alsa-pcm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/spa/plugins/alsa/alsa-pcm.c b/spa/plugins/alsa/alsa-pcm.c index a92d646ae..599776434 100644 --- a/spa/plugins/alsa/alsa-pcm.c +++ b/spa/plugins/alsa/alsa-pcm.c @@ -761,6 +761,7 @@ static int alsa_recover(struct state *state, int err) case SND_PCM_STATE_SUSPENDED: spa_log_info(state->log, NAME" %p: recover from state %s", state, snd_pcm_state_name(st)); + err = -ESTRPIPE; break; default: spa_log_error(state->log, NAME" %p: recover from error state %s",