ESP32: Fix compilation of I2S in Arduino ESP32 core 1.0.6 (#565)

This commit is contained in:
FedericoBusero authored and GitHub committed 2022-08-24 12:49:24 -07:00
1 parent 6d3b8665f4
commit e24223e3d5
2 files changed
+8

No files matched your search

+4
View File
@@ -88,7 +88,9 @@ bool AudioOutputI2S::SetPinout()
return false; // Not allowed
i2s_pin_config_t pins = {
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(4, 4, 0)
.mck_io_num = 0, // Unused
#endif
.bck_io_num = bclkPin,
.ws_io_num = wclkPin,
.data_out_num = doutPin,
@@ -229,8 +231,10 @@ bool AudioOutputI2S::begin(bool txDAC)
.use_apll = use_apll, // Use audio PLL
.tx_desc_auto_clear = true, // Silence on underflow
.fixed_mclk = 0, // Unused
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(4, 4, 0)
.mclk_multiple = I2S_MCLK_MULTIPLE_DEFAULT, // Unused
.bits_per_chan = I2S_BITS_PER_CHAN_DEFAULT // Use bits per sample
#endif
};
audioLogger->printf("+%d %p\n", portNo, &i2s_config_dac);
if (i2s_driver_install((i2s_port_t)portNo, &i2s_config_dac, 0, NULL) != ESP_OK)