Skip to content

Commit d2083fe

Browse files
committed
audio: check mute before audio init
Booting with mute active often results in the I2C bus being completely defunct, causing log spam of I2C errors. The mute check was previously moved after audio init in commit 20780c4 ("audio: initialize amp before mute check") so that WAS locate would work even if the device is waiting to be unmuted. Unfortunately it seems prohibitively difficult to make that work reliably, so to not spend any more time debugging that, the move check is moved back before audio init. This is not ideal, but I've spent way too much time on debugging this issue already, and I rather avoid the log spam. The mute check was moved after audio init to solve #319, but Willow connects to WAS before the mute check, and commands sent from WAS actually execute, there just won't be any audio output. In case of WAS locate, the display would still light up. Fixes: #415
1 parent 41d3703 commit d2083fe

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

main/audio.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1009,15 +1009,15 @@ esp_err_t init_audio(void)
10091009
char *wake_word = config_get_char("wake_word", DEFAULT_WAKE_WORD);
10101010
esp_err_t ret = ESP_OK;
10111011

1012+
check_mute();
1013+
10121014
hdl_ahc = audio_board_codec_init();
10131015
gpio_set_level(get_pa_enable_gpio(), 0);
10141016
ret = audio_hal_ctrl_codec(hdl_ahc, AUDIO_HAL_CODEC_MODE_DECODE, AUDIO_HAL_CTRL_START);
10151017
ESP_LOGI(TAG, "audio_hal_ctrl_codec: %s", esp_err_to_name(ret));
10161018
init_esp_audio();
10171019
volume_set(-1);
10181020

1019-
check_mute();
1020-
10211021
hdl_aha = audio_board_adc_init();
10221022

10231023
init_audio_response();

0 commit comments

Comments
 (0)