Skip to content

Commit

Permalink
Fix I2S channels swapping issues (espressif#3399)
Browse files Browse the repository at this point in the history
  • Loading branch information
andySigler authored Apr 15, 2021
1 parent 881c75b commit b4fe7d8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions components/driver/i2s.c
Original file line number Diff line number Diff line change
Expand Up @@ -939,7 +939,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
Expand All @@ -951,7 +951,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;
Expand Down

0 comments on commit b4fe7d8

Please sign in to comment.