From a295c2a2910cd2105bd9265617eebf0cdefe6542 Mon Sep 17 00:00:00 2001 From: Mike Brady <4265913+mikebrady@users.noreply.github.com> Date: Sun, 3 Apr 2022 10:35:48 +0100 Subject: [PATCH] Improve the logic for supressing clicks when the alsa disable_standby_mode is active. --- audio_alsa.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/audio_alsa.c b/audio_alsa.c index 373b1db9..e019ea56 100644 --- a/audio_alsa.c +++ b/audio_alsa.c @@ -1923,15 +1923,13 @@ static void flush(void) { // debug(2,"audio_alsa flush called."); pthread_cleanup_debug_mutex_lock(&alsa_mutex, 10000, 1); if (alsa_backend_state != abm_disconnected) { // must be playing or connected... + // do nothing for a flush if config.keep_dac_busy is true if (config.keep_dac_busy == 0) { - // debug(1,"flush is actually a close"); - do_close(); - } else { - // debug(1,"flush is a real flush"); sub_flush(); } - } else + } else { debug(3, "alsa: flush() -- called on a disconnected alsa backend"); + } debug_mutex_unlock(&alsa_mutex, 3); pthread_cleanup_pop(0); // release the mutex }