Merge branch 'bugfix/i2s_tx_mono_issue_v4.4' into 'release/v4.4'

fix(i2s): fixed i2s incorrect tx mono slot (v4.4)

See merge request espressif/esp-idf!28450
pull/13426/head
morris 2024-01-15 14:44:41 +08:00
commit f6a76d8e09
1 zmienionych plików z 5 dodań i 0 usunięć

Wyświetl plik

@ -244,8 +244,13 @@ void i2s_hal_tx_set_channel_style(i2s_hal_context_t *hal, const i2s_hal_config_t
uint32_t chan_num = 2;
uint32_t chan_bits = hal_cfg->chan_bits;
uint32_t data_bits = hal_cfg->sample_bits;
#if SOC_I2S_SUPPORTS_TDM
bool is_mono = (hal_cfg->chan_fmt == I2S_CHANNEL_FMT_ALL_RIGHT) ||
(hal_cfg->chan_fmt == I2S_CHANNEL_FMT_ALL_LEFT);
#else
bool is_mono = (hal_cfg->chan_fmt == I2S_CHANNEL_FMT_ONLY_RIGHT) ||
(hal_cfg->chan_fmt == I2S_CHANNEL_FMT_ONLY_LEFT);
#endif
/* Set channel number and valid data bits */
#if SOC_I2S_SUPPORTS_TDM