From 387fb06aa0a78dbfbe0ad105af1cfa8aeaab15f2 Mon Sep 17 00:00:00 2001 From: laokaiyao Date: Mon, 7 Mar 2022 14:42:34 +0800 Subject: [PATCH] i2s: fixed DAC no output issue Closes https://github.com/espressif/esp-idf/issues/6470 --- components/soc/src/hal/i2s_hal.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/soc/src/hal/i2s_hal.c b/components/soc/src/hal/i2s_hal.c index 5179b31720..c3d7e480a4 100644 --- a/components/soc/src/hal/i2s_hal.c +++ b/components/soc/src/hal/i2s_hal.c @@ -198,7 +198,7 @@ void i2s_hal_config_param(i2s_hal_context_t *hal, const i2s_config_t *i2s_config i2s_ll_set_rx_short_sync(hal->dev, 0); i2s_ll_set_tx_msb_shift(hal->dev, 1); i2s_ll_set_rx_msb_shift(hal->dev, 1); - if (i2s_config->communication_format & I2S_COMM_FORMAT_I2S_LSB) { + if (i2s_config->communication_format & I2S_COMM_FORMAT_I2S_LSB || i2s_config->communication_format & I2S_COMM_FORMAT_I2S_MSB) { if (i2s_config->mode & I2S_MODE_TX) { i2s_ll_set_tx_msb_shift(hal->dev, 0); } @@ -220,7 +220,7 @@ void i2s_hal_config_param(i2s_hal_context_t *hal, const i2s_config_t *i2s_config if (i2s_config->mode & I2S_MODE_RX) { i2s_ll_set_rx_short_sync(hal->dev, 1); } - } + } } }