From 4d860f77885355f1f32733844d45565af01b2b67 Mon Sep 17 00:00:00 2001 From: pschatzmann Date: Fri, 8 Nov 2024 09:41:17 +0100 Subject: [PATCH] DriverTDM support for RXTX_MODE --- src/AudioTools/CoreAudio/AudioI2S/I2SESP32V1.h | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/AudioTools/CoreAudio/AudioI2S/I2SESP32V1.h b/src/AudioTools/CoreAudio/AudioI2S/I2SESP32V1.h index 16dc4268a..465921f69 100644 --- a/src/AudioTools/CoreAudio/AudioI2S/I2SESP32V1.h +++ b/src/AudioTools/CoreAudio/AudioI2S/I2SESP32V1.h @@ -415,21 +415,19 @@ class I2SDriverESP32V1 { }, }; - if (cfg.rx_tx_mode == TX_MODE) { + if (cfg.rx_tx_mode == TX_MODE || cfg.rx_tx_mode == RXTX_MODE) { if (i2s_channel_init_tdm_mode(tx_chan, &tdm_cfg) != ESP_OK) { LOGE("i2s_channel_init_tdm_tx_mode %s", "tx"); return false; } } - if (cfg.rx_tx_mode == RX_MODE) { + if (cfg.rx_tx_mode == RX_MODE || cfg.rx_tx_mode == RXTX_MODE) { if (i2s_channel_init_tdm_mode(rx_chan, &tdm_cfg) != ESP_OK) { LOGE("i2s_channel_init_tdm_tx_mode %s", "rx"); return false; } - return true; } - LOGE("Only RX and TX is supported for TDM") - return false; + return true; } protected: