Skip to content

Commit ce47912

Browse files
committed
ESP32: fix compilation for S3/C6 I2S
1 parent 856364d commit ce47912

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

internal/MozziGuts_impl_ESP32.hpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,15 @@ namespace MozziPrivate {
4343

4444
//# include <driver/i2s.h> // for I2S-based output modes, including - technically - internal DAC
4545
#include<driver/i2s_std.h>
46+
47+
////// FIX BAD IDF MACRO AS PER: https://github.com/espressif/arduino-esp32/issues/10975
48+
////// TODO: REMOVE WHEN FIX PROPAGATED TO ARDUINO-ESP32
49+
#if SOC_I2S_HW_VERSION_2
50+
#undef I2S_STD_CLK_DEFAULT_CONFIG
51+
#define I2S_STD_CLK_DEFAULT_CONFIG(rate) \
52+
{ .sample_rate_hz = rate, .clk_src = I2S_CLK_SRC_DEFAULT, .ext_clk_freq_hz = 0, .mclk_multiple = I2S_MCLK_MULTIPLE_256, }
53+
#endif
54+
/////// END FIX
4655
/*
4756
#elif MOZZI_IS(MOZZI_AUDIO_MODE, MOZZI_OUTPUT_INTERNAL_DAC)
4857
#include<driver/dac_continuous.h>

0 commit comments

Comments
 (0)