From b4e135dc5009cd4760dc72da5888468f1281dfba Mon Sep 17 00:00:00 2001 From: FedericoBusero <35894905+FedericoBusero@users.noreply.github.com> Date: Sun, 16 Oct 2022 17:43:54 +0200 Subject: [PATCH 1/3] Fix ULP on ESP32 CONFIG_IDF_TARGET_ESP32 is not yet defined before #include "AudioOutputULP.h" --- src/AudioOutputULP.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/AudioOutputULP.cpp b/src/AudioOutputULP.cpp index d8f4e027..7dd3715c 100644 --- a/src/AudioOutputULP.cpp +++ b/src/AudioOutputULP.cpp @@ -18,9 +18,12 @@ along with this program. If not, see . */ -#if CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32S3 +#ifdef ESP32 #include "AudioOutputULP.h" + +#if CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32S3 + #include #include #include @@ -260,3 +263,4 @@ bool AudioOutputULP::stop() } #endif +#endif From 550ab782d35c39cebf0278e8778f90f21453cf6e Mon Sep 17 00:00:00 2001 From: FedericoBusero <35894905+FedericoBusero@users.noreply.github.com> Date: Sun, 16 Oct 2022 17:45:01 +0200 Subject: [PATCH 2/3] AudioOutputULP: Fix DAC2 stereo in case of DAC1+DAC2 --- src/AudioOutputULP.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/AudioOutputULP.cpp b/src/AudioOutputULP.cpp index 7dd3715c..1b3c6d76 100644 --- a/src/AudioOutputULP.cpp +++ b/src/AudioOutputULP.cpp @@ -169,7 +169,7 @@ bool AudioOutputULP::begin() { RTC_SLOW_MEM[dacTableStart1 + i * 2] = create_I_WR_REG(RTC_IO_PAD_DAC1_REG,19,26,i); //dac1: 0x1D4C0121 | (i << 10) RTC_SLOW_MEM[dacTableStart1 + 1 + i * 2] = create_I_BXI(retAddress1); // 0x80000000 + retAddress1 * 4 - RTC_SLOW_MEM[dacTableStart2 + i * 2] = create_I_WR_REG(RTC_IO_PAD_DAC1_REG,19,26,i); //dac2: 0x1D4C0122 | (i << 10) + RTC_SLOW_MEM[dacTableStart2 + i * 2] = create_I_WR_REG(RTC_IO_PAD_DAC2_REG,19,26,i); //dac2: 0x1D4C0122 | (i << 10) RTC_SLOW_MEM[dacTableStart2 + 1 + i * 2] = create_I_BXI(retAddress2); // 0x80000000 + retAddress2 * 4 } break; From d3e18fd8badf4fbd9dac0eab9169405f2c49e7f0 Mon Sep 17 00:00:00 2001 From: FedericoBusero <35894905+FedericoBusero@users.noreply.github.com> Date: Tue, 25 Apr 2023 21:42:55 +0200 Subject: [PATCH 3/3] ULP - no ESP32S2 / S3 On ESP32S2 it compiles, but no audio is coming out On ESP32S3 DAC is not supported --- src/AudioOutputULP.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/AudioOutputULP.cpp b/src/AudioOutputULP.cpp index 1b3c6d76..99eecfa0 100644 --- a/src/AudioOutputULP.cpp +++ b/src/AudioOutputULP.cpp @@ -22,7 +22,7 @@ #include "AudioOutputULP.h" -#if CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32S3 +#if CONFIG_IDF_TARGET_ESP32 #include #include