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
@@ -105,8 +105,10 @@ AudioOutputSPDIF::AudioOutputSPDIF(int dout_pin, int port, int dma_buf_count)
.use_apll = true, // Audio PLL is needed for low clock jitter
.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
};
if (i2s_driver_install((i2s_port_t)portNo, &i2s_config_spdif, 0, NULL) != ESP_OK) {
audioLogger->println(F("ERROR: Unable to install I2S drivers"));
@@ -151,7 +153,9 @@ bool AudioOutputSPDIF::SetPinout(int bclk, int wclk, int dout)
{
#if defined(ESP32)
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 = bclk,
.ws_io_num = wclk,
.data_out_num = dout,