Skip to content

Commit 6cbeb35

Browse files
committed
esp32 i2s: mclk_multiple
1 parent 915b73a commit 6cbeb35

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

src/AudioI2S/I2SConfigESP32V1.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ class I2SConfigESP32V1 : public AudioInfo {
6767
bool use_apll = I2S_USE_APLL;
6868
/// Select left or right channel when channels == 1
6969
I2SChannelSelect channel_format = I2SChannelSelect::Default;
70+
/// masterclock multiple (-1 = use default)
71+
int mclk_multiple = -1;
7072

7173
void logInfo(const char* source="") {
7274
AudioInfo::logInfo(source);

src/AudioI2S/I2SESP32V1.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,9 @@ class I2SDriverESP32V1 {
208208
// mclk_multiple' should be the multiple of 3 while using 24-bit
209209
clk_cfg.mclk_multiple = I2S_MCLK_MULTIPLE_384;
210210
}
211+
if (cfg.mclk_multiple > 0){
212+
clk_cfg.mclk_multiple = cfg.mclk_multiple;
213+
}
211214
return clk_cfg;
212215
}
213216

0 commit comments

Comments
 (0)