From e8f0cd36d85e51fe3fd8b39bb9abfa484cbd1dc9 Mon Sep 17 00:00:00 2001 From: FedericoBusero <35894905+FedericoBusero@users.noreply.github.com> Date: Wed, 24 Aug 2022 20:50:52 +0200 Subject: [PATCH 1/2] Fix compilation error in Arduino core 1.0.6 --- src/AudioOutputI2S.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/AudioOutputI2S.cpp b/src/AudioOutputI2S.cpp index c4e0c3aa..621db592 100644 --- a/src/AudioOutputI2S.cpp +++ b/src/AudioOutputI2S.cpp @@ -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) From 581cf7e7f8849542045f6986b1781503ee3ea323 Mon Sep 17 00:00:00 2001 From: FedericoBusero <35894905+FedericoBusero@users.noreply.github.com> Date: Wed, 24 Aug 2022 20:52:57 +0200 Subject: [PATCH 2/2] Fix compilation error in arduino core 1.0.6 --- src/AudioOutputSPDIF.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/AudioOutputSPDIF.cpp b/src/AudioOutputSPDIF.cpp index 1d1ec2f3..1823b5d8 100644 --- a/src/AudioOutputSPDIF.cpp +++ b/src/AudioOutputSPDIF.cpp @@ -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,