Skip to content

Commit

Permalink
ESP32 I2S info when mclk_multiple=384
Browse files Browse the repository at this point in the history
  • Loading branch information
pschatzmann committed Sep 1, 2024
1 parent 6cbeb35 commit d8c3a52
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/AudioI2S/I2SESP32V1.h
Original file line number Diff line number Diff line change
Expand Up @@ -204,13 +204,15 @@ class I2SDriverESP32V1 {
TRACED();
i2s_std_clk_config_t clk_cfg =
I2S_STD_CLK_DEFAULT_CONFIG((uint32_t)cfg.sample_rate);
if (cfg.bits_per_sample == 24) {
// mclk_multiple' should be the multiple of 3 while using 24-bit
clk_cfg.mclk_multiple = I2S_MCLK_MULTIPLE_384;
}
if (cfg.mclk_multiple > 0){
clk_cfg.mclk_multiple = cfg.mclk_multiple;
}
} else {
if (cfg.bits_per_sample == 24) {
// mclk_multiple' should be the multiple of 3 while using 24-bit
clk_cfg.mclk_multiple = I2S_MCLK_MULTIPLE_384;
LOGI("mclk_multiple=384");
}
}
return clk_cfg;
}

Expand Down

0 comments on commit d8c3a52

Please sign in to comment.