The right channel data is in the high position, so the I2S_TX_MSB_RIGHT & I2S_RX_MSB_RIGHT bits should be set.
Merges https://github.com/espressif/esp-idf/pull/3717
closes https://github.com/espressif/esp-idf/issues/3399
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
}
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;