From 4e5805dec3d956bd2c4c095b5457f203dd3b4347 Mon Sep 17 00:00:00 2001 From: Cao Sen Miao Date: Mon, 29 Mar 2021 14:54:17 +0800 Subject: [PATCH] i2s: fix i2s left/right channels swapped issue, Closes https://github.com/espressif/esp-idf/issues/6625 --- components/driver/i2s.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/driver/i2s.c b/components/driver/i2s.c index 90931b121d..80140c751b 100644 --- a/components/driver/i2s.c +++ b/components/driver/i2s.c @@ -947,7 +947,7 @@ static esp_err_t i2s_param_config(i2s_port_t i2s_num, const i2s_config_t *i2s_co I2S[i2s_num]->conf.rx_start = 0; if (i2s_config->mode & I2S_MODE_TX) { - I2S[i2s_num]->conf.tx_msb_right = 0; + I2S[i2s_num]->conf.tx_msb_right = 1; I2S[i2s_num]->conf.tx_right_first = 0; I2S[i2s_num]->conf.tx_slave_mod = 0; // Master @@ -959,7 +959,7 @@ static esp_err_t i2s_param_config(i2s_port_t i2s_num, const i2s_config_t *i2s_co } if (i2s_config->mode & I2S_MODE_RX) { - I2S[i2s_num]->conf.rx_msb_right = 0; + I2S[i2s_num]->conf.rx_msb_right = 1; I2S[i2s_num]->conf.rx_right_first = 0; I2S[i2s_num]->conf.rx_slave_mod = 0; // Master I2S[i2s_num]->fifo_conf.rx_fifo_mod_force_en = 1;