commit 440c29a48baee8e864752653f5cca6ea842cfd1e from: Omar Polo date: Fri May 12 21:49:16 2023 UTC alsa: handle xrun due to pausing amused implements pausing as not sending audio at all until resuming, i.e. by doing an underrun. ALSA is more strict than sndio, by default at least, and so we need to call snd_pcm_recover() before we can play again. commit - e89b829ac8e30fd8c5ff9dca70a52aeadecfff04 commit + 440c29a48baee8e864752653f5cca6ea842cfd1e blob - fe6c8acb9722c865545c5a6e0950f4ae2b0905b5 blob + 768c7c7b80ed2fcbb6b05e4bcc63d5fd23729c73 --- audio_alsa.c +++ audio_alsa.c @@ -126,7 +126,8 @@ audio_write(const void *buf, size_t len) avail = snd_pcm_avail_update(pcm); if (avail < 0) { if (avail == -EPIPE) { - log_warnx("alsa xrun occurred"); + log_debug("alsa xrun occurred"); + snd_pcm_recover(pcm, -EPIPE, 1); return 0; } log_warnx("snd_pcm_avail_update failure: %s",