Skip to content

Commit 96e3c3c

Browse files
author
Andriy Malyshenko
committed
Set correct mute flag on DAC restore
1 parent dd85389 commit 96e3c3c

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

components/custom_board/tas5805m/tas5805m.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -324,18 +324,15 @@ esp_err_t tas5805m_ctrl(audio_hal_codec_mode_t mode,
324324
audio_hal_ctrl_t ctrl_state) {
325325
esp_err_t ret;
326326
if (ctrl_state == AUDIO_HAL_CTRL_STOP) {
327-
// set deepsleep
328327
ESP_LOGI(TAG, "%s: Setting to DEEP_SLEEP", __func__);
329328
ret = tas5805m_set_state(TAS5805M_CTRL_DEEP_SLEEP);
330-
//ret = tas5805m_write_byte(TAS5805M_DEVICE_CTRL_2_REGISTER,
331-
// TAS5805M_CTRL_DEEP_SLEEP + 0x08*mute);
332329

333330
} else {
334331
ESP_LOGI(TAG, "%s: Setting to HI_Z", __func__);
335332
ret = tas5805m_set_state(TAS5805M_CTRL_HI_Z);
336333
vTaskDelay(1 / portTICK_PERIOD_MS);
337334
ESP_LOGI(TAG, "%s: Setting to PLAY", __func__);
338-
ret |= tas5805m_set_state(TAS5805M_CTRL_PLAY);
335+
ret |= tas5805m_set_state(tas5805m_state.mute ? TAS5805M_CTRL_MUTE : TAS5805M_CTRL_PLAY);
339336
}
340337

341338
return ret;

0 commit comments

Comments
 (0)