Skip to content

Commit 07166b2

Browse files
committed
I2S: apll seems to double the frequency
1 parent 86b28ad commit 07166b2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/AudioTools/CoreAudio/AudioI2S/I2SESP32V1.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,10 +274,12 @@ class I2SDriverESP32V1 {
274274
} else {
275275
if (cfg.bits_per_sample == 24) {
276276
// mclk_multiple' should be the multiple of 3 while using 24-bit
277-
clk_cfg.mclk_multiple = I2S_MCLK_MULTIPLE_384;
277+
// using the apll seems to double the frequency
278+
clk_cfg.mclk_multiple = cfg.use_apll ? I2S_MCLK_MULTIPLE_192: I2S_MCLK_MULTIPLE_384;
278279
LOGI("mclk_multiple=384");
279280
} else {
280281
// when use_appll is true, the multiple of 128 gives 256kHz
282+
// using the apll seems to double the frequency
281283
clk_cfg.mclk_multiple = cfg.use_apll ? I2S_MCLK_MULTIPLE_128 : I2S_MCLK_MULTIPLE_256;
282284
LOGI("mclk_multiple=%d", clk_cfg.mclk_multiple);
283285
}

0 commit comments

Comments
 (0)