mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
alsa-pcm: try to recover in all cases
Even if we can't get the current status, still try to recover the device. See #347
This commit is contained in:
parent
398dc3055b
commit
c1ea63fa7a
1 changed files with 2 additions and 1 deletions
|
|
@ -620,7 +620,7 @@ static int alsa_recover(struct state *state, int err)
|
|||
if (SPA_UNLIKELY((res = snd_pcm_status(state->hndl, status)) < 0)) {
|
||||
spa_log_error(state->log, NAME" %p: snd_pcm_status error: %s",
|
||||
state, snd_strerror(res));
|
||||
return res;
|
||||
goto recover;
|
||||
}
|
||||
|
||||
st = snd_pcm_status_get_state(status);
|
||||
|
|
@ -652,6 +652,7 @@ static int alsa_recover(struct state *state, int err)
|
|||
break;
|
||||
}
|
||||
|
||||
recover:
|
||||
if (SPA_UNLIKELY((res = snd_pcm_recover(state->hndl, err, true)) < 0)) {
|
||||
spa_log_error(state->log, NAME" %p: snd_pcm_recover error: %s",
|
||||
state, snd_strerror(res));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue