Merge branch 'fix-alsa-sink' into 'master'

alsa-sink: Failed to open the PCM device but the state has advanced

See merge request pulseaudio/pulseaudio!866
This commit is contained in:
zhouyong 2026-04-21 08:15:17 +00:00
commit d3c163505d

View file

@ -2005,8 +2005,16 @@ static void thread_func(void *userdata) {
if (work_done) {
if (u->first) {
int err;
pa_log_info("Starting playback.");
snd_pcm_start(u->pcm_handle);
if ((err = snd_pcm_start(u->pcm_handle)) < 0) {
if ((err = try_recover(u, "snd_pcm_start", err)) < 0)
goto fail;
/* Recovery resets startup state; retry in next loop iteration. */
continue;
}
#ifdef USE_SMOOTHER_2
pa_smoother_2_resume(u->smoother, pa_rtclock_now());