alsa: try to resume after suspend before recovering

Fixes no audio after suspending with some audio drivers.

See #2001
This commit is contained in:
Julian Bouzas 2022-02-10 16:37:27 -05:00
parent f123b58f1f
commit e34d9d209a

View file

@ -1646,6 +1646,9 @@ static int alsa_recover(struct state *state, int err)
case SND_PCM_STATE_SUSPENDED:
spa_log_info(state->log, "%s: recover from state %s",
state->props.device, snd_pcm_state_name(st));
res = snd_pcm_resume(state->hndl);
if (res >= 0)
return res;
err = -ESTRPIPE;
break;
default: