@@ -638,10 +638,10 @@ bool TasmotaI2S::startI2SChannel(bool tx, bool rx) {
638
638
case I2S_MODE_STD:
639
639
{
640
640
i2s_std_slot_config_t _slot_cfg = {
641
- .data_bit_width = ( i2s_data_bit_width_t )bps ,
641
+ .data_bit_width = rx_data_bit_width ,
642
642
.slot_bit_width = (i2s_slot_bit_width_t )audio_i2s.Settings ->rx .slot_bit_width ,
643
- .slot_mode = ( i2s_slot_mode_t )channels ,
644
- .slot_mask = (i2s_std_slot_mask_t )audio_i2s. Settings -> rx . slot_mask ,
643
+ .slot_mode = rx_slot_mode ,
644
+ .slot_mask = (i2s_std_slot_mask_t )_rx_slot_mask ,
645
645
.ws_width = audio_i2s.Settings ->rx .ws_width ,
646
646
.ws_pol = audio_i2s.Settings ->rx .ws_pol ,
647
647
.bit_shift = audio_i2s.Settings ->rx .bit_shift ,
@@ -669,7 +669,9 @@ bool TasmotaI2S::startI2SChannel(bool tx, bool rx) {
669
669
},
670
670
},
671
671
};
672
-
672
+ if (audio_i2s.Settings ->rx .apll == 1 ){
673
+ rx_std_cfg.clk_cfg .clk_src = I2S_CLK_SRC_APLL;
674
+ }
673
675
err = i2s_channel_init_std_mode (_rx_handle, &rx_std_cfg);
674
676
AddLog (LOG_LEVEL_DEBUG, " I2S: RX i2s_channel_init_std_mode with err:%i" , err);
675
677
AddLog (LOG_LEVEL_DEBUG, " I2S: RX channel in standard mode with %u bit width on %i channel(s) initialized" , bps, rx_slot_mode);
0 commit comments