File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed
src/AudioTools/CoreAudio/AudioI2S Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -289,30 +289,27 @@ class I2SDriverESP32V1 {
289
289
soc_periph_i2s_clk_src_t getClockSource (I2SConfigESP32V1 &cfg){
290
290
soc_periph_i2s_clk_src_t result = I2S_CLK_SRC_DEFAULT;
291
291
// use mclk pin as input in slave mode if supported
292
- bool is_pin_mck_input = false ;
292
+ bool is_pin_mck_output = true ;
293
293
if (cfg.pin_mck != -1 ) {
294
294
if (!cfg.is_master ) {
295
295
#if SOC_I2S_HW_VERSION_2
296
296
LOGI (" pin_mclk is input" );
297
297
result = I2S_CLK_SRC_EXTERNAL;
298
- is_pin_mck_input = true ;
298
+ is_pin_mck_output = false ;
299
299
#else
300
300
LOGE (" pin_mclk as input not supported" );
301
301
#endif
302
302
}
303
303
304
- if (!is_pin_mck_input) {
304
+ // select APLL clock if possible
305
+ if (is_pin_mck_output && cfg.use_apll ) {
305
306
// select clock source
306
307
#if SOC_I2S_SUPPORTS_APLL
307
- if (cfg.use_apll ) {
308
308
result = I2S_CLK_SRC_APLL;
309
309
LOGI (" clk_src is I2S_CLK_SRC_APLL" );
310
- }
311
310
#elif SOC_I2S_SUPPORTS_PLL_F160M
312
- if (cfg.use_apll ) {
313
311
result = I2S_CLK_SRC_PLL_160M;
314
312
LOGI (" clk_src is I2S_CLK_SRC_PLL_160M" );
315
- }
316
313
#endif
317
314
}
318
315
}
You can’t perform that action at this time.
0 commit comments