Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
a75c7a3
esp32p4: add SOF static audio pipeline and ESP32-P4 platform support
lrgirdwo Sep 6, 2026
dad6817
esp32p4: enable LL scheduler periodic logging and trigger pipeline on…
lrgirdwo Sep 6, 2026
f625127
esp32p4: configure deferred logging and system clock resolution
lrgirdwo Sep 6, 2026
c093cc3
esp32p4: enable periodic kernel timer and automatic binary creation
lrgirdwo Sep 6, 2026
1137056
esp32p4: export ALSA kcontrols for Playback EQ, DRC, Capture TDFB, an…
lrgirdwo Sep 6, 2026
820da78
esp32p4: load default DSP configurations for EQ and DRC with runtime …
lrgirdwo Sep 6, 2026
3246c8c
esp32p4: configure IPC4 base module config for static pipeline compon…
lrgirdwo Sep 6, 2026
1d549c8
esp32p4: fix static pipeline stream routing, IPC3 configs, and termin…
lrgirdwo Sep 6, 2026
9e3fe02
esp32p4: document static pipeline topology, ALSA controls, and MCPS p…
lrgirdwo Sep 6, 2026
b40acef
esp32p4: add RISC-V SIMD / DSP math optimizations for EQ and DRC
lrgirdwo Sep 6, 2026
fbf0487
esp32p4: add block-accelerated EQ IIR and branchless saturation on RI…
lrgirdwo Sep 6, 2026
0cb3861
esp32p4: add RISC-V SIMD / vector optimizations for volume module
lrgirdwo Sep 6, 2026
f873f4a
esp32p4: add native single-precision floating-point pipeline with har…
lrgirdwo Sep 6, 2026
dd5c107
esp32p4: add capture pipeline controls, float TDFB support, and MCPS …
lrgirdwo Sep 7, 2026
2d12e88
pipeline: introduce declarative static topology definition and loader
lrgirdwo Sep 7, 2026
7dedd63
math: add single-precision float FIR filtering routines
lrgirdwo Sep 8, 2026
6e32bc2
audio: pcm_converter: optimize integer conversions and add float atte…
lrgirdwo Sep 8, 2026
e723487
audio: dcblock: add single-precision float filter acceleration
lrgirdwo Sep 8, 2026
a704361
audio: eq_fir: add single-precision float FIR filtering support
lrgirdwo Sep 8, 2026
16718e8
audio: crossover: add float Linkwitz-Riley 4th order processing
lrgirdwo Sep 8, 2026
90dd786
audio: multiband_drc: add single-precision float multiband compressor
lrgirdwo Sep 8, 2026
137853a
audio: mixer: add float stream mixing, muxing, and mixin/mixout support
lrgirdwo Sep 8, 2026
536fb80
audio: tdfb: add single-precision float beamformer acceleration
lrgirdwo Sep 8, 2026
c6823f0
audio: src: add single-precision float polyphase sample rate conversion
lrgirdwo Sep 8, 2026
f6e5a9e
audio: tone: add single-precision float synthesis and format negotiation
lrgirdwo Sep 8, 2026
27d0988
audio: asrc: implement float FIR filtering and 4-way unrolled ILP
lrgirdwo Sep 8, 2026
0d2016c
audio: up_down_mixer: add ANSI C and RISC-V upmix and downmix routines
lrgirdwo Sep 8, 2026
e9136fd
audio: level_multiplier: add float scaling and kcontrol volume support
lrgirdwo Sep 8, 2026
c9614e6
audio: selector: add float matrix processing and enum control support
lrgirdwo Sep 8, 2026
a1dd7f5
pipeline: static_loader: support selector components, enum controls, …
lrgirdwo Sep 8, 2026
dda797e
platform: esp32p4: add static test pipeline with tone, level, and sel…
lrgirdwo Sep 8, 2026
2bb6f5a
doc: esp32p4: document float and SIMD performance deltas per module
lrgirdwo Sep 8, 2026
5531c5b
app: esp32p4: add Pallas and Ceres board identity, GDMA descriptors, …
lrgirdwo Sep 9, 2026
264d7a7
audio: dai-zephyr & usb_audio: support multi-period burst copy, pre-b…
lrgirdwo Sep 9, 2026
61c60ed
platform: esp32p4: support S16_LE static pipeline, auto master/slave …
lrgirdwo Sep 9, 2026
f6bde4a
platform: esp32p4: support dynamic period calculation, runtime interf…
lrgirdwo Sep 10, 2026
6a0f013
platform: esp32p4: add DMIC Injector Switch kcontrol, shell commands,…
lrgirdwo Sep 10, 2026
2127aa8
audio: bt: add ESP32-C6 Bluetooth LE Audio pipeline endpoint and stat…
lrgirdwo Sep 10, 2026
518b0e6
audio: bt: add high-quality audio format presets, dynamic kcontrol, a…
lrgirdwo Sep 11, 2026
09cfd52
manifest: update zephyr and hal_espressif to point to lgirdwood forks
lrgirdwo Sep 11, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions Kconfig.sof
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,7 @@ rsource "Kconfig.xtos"

rsource "src/Kconfig"

if ZEPHYR_SOF_MODULE
rsource "Kconfig.zephyr-log"
endif
rsource "Kconfig.zephyr-log"

menu "Debug"

Expand Down
42 changes: 40 additions & 2 deletions app/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,49 @@ cmake_minimum_required(VERSION 3.21.0)
find_package(Zephyr HINTS $ENV{ZEPHYR_BASE})
project(sample_sof)

add_subdirectory(../zephyr sof_zephyr)

target_sources(app PRIVATE
src/main.c
../src/debug/shell/esp32_shell.c
)

target_sources_ifdef(CONFIG_USB_DEVICE_STACK_NEXT app PRIVATE
src/usbd_init.c
)

zephyr_library_include_directories(app PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/../src/arch/xtensa/include
target_include_directories(app PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/src
${CMAKE_CURRENT_SOURCE_DIR}/../src/include
${CMAKE_CURRENT_SOURCE_DIR}/../zephyr/include
${CMAKE_CURRENT_SOURCE_DIR}/../src/platform/esp32p4/include
${PROJECT_BINARY_DIR}/include/generated
)

target_link_libraries(app PRIVATE SOF modules_sof)
if(TARGET uuid_reg_h)
add_dependencies(app uuid_reg_h modules_sof)
endif()

if(CONFIG_XTENSA)
target_include_directories(app PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/../src/arch/xtensa/include
)
endif()

function(sof_append_relative_path_definitions target)
get_target_property(sources ${target} SOURCES)
foreach(src ${sources})
get_filename_component(ABS_PATH ${src} ABSOLUTE)
file(RELATIVE_PATH rel ${PROJECT_SOURCE_DIR} ${ABS_PATH})
set_property(
SOURCE ${src}
APPEND
PROPERTY COMPILE_DEFINITIONS
RELATIVE_FILE="${rel}")
endforeach()
endfunction()

sof_append_relative_path_definitions(app)


5 changes: 5 additions & 0 deletions app/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ choice COMPILER_CODEGEN_VLIW
endchoice

source "Kconfig.zephyr"
source "samples/subsys/usb/common/Kconfig.sample_usbd"

if !ZEPHYR_SOF_MODULE
rsource "../zephyr/Kconfig"
endif

if SOC_FAMILY_INTEL_ADSP
rsource "boards/intel_adsp/Kconfig.defconfig"
Expand Down
92 changes: 92 additions & 0 deletions app/boards/esp32p4_function_ev_board_esp32p4_hpcore.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
# Target Platform & SOF Core
CONFIG_PLATFORM_ESP32P4=y
CONFIG_SOF_FULL_ZEPHYR_APPLICATION=y
CONFIG_ZEPHYR_NATIVE_DRIVERS=y
CONFIG_SYS_HEAP_BIG_ONLY=y
CONFIG_BUILD_OUTPUT_BIN=y

# Zephyr DAI Drivers for ESP32
CONFIG_DAI=y
CONFIG_DAI_ESPRESSIF_I2S=y
CONFIG_DAI_ESPRESSIF_PDM=y
CONFIG_PINCTRL=y
CONFIG_DMA=y
CONFIG_DMA_ESP32_MAX_DESCRIPTOR_NUM=64

# Audio Processing Modules
CONFIG_COMP_VOLUME=y
CONFIG_COMP_IIR=y
CONFIG_COMP_FIR=y
CONFIG_COMP_DRC=y
CONFIG_COMP_CROSSOVER=y
CONFIG_COMP_DCBLOCK=y
CONFIG_COMP_MULTIBAND_DRC=y
CONFIG_COMP_TDFB=y
CONFIG_COMP_USB_AUDIO=y
CONFIG_COMP_BT_AUDIO=y
CONFIG_COMP_TONE=y
CONFIG_COMP_LEVEL_MULTIPLIER=y
CONFIG_COMP_SEL=y
CONFIG_COMP_MUX=y
CONFIG_COMP_MIXER=y
CONFIG_FILTER_RISCV_SIMD=y
CONFIG_DRC_RISCV_SIMD=y
CONFIG_EQ_IIR_RISCV_SIMD=y
CONFIG_VOLUME_RISCV_SIMD=y

# USB Device Stack Next & UAC2 Class
CONFIG_USB_DEVICE_STACK_NEXT=y
CONFIG_CDC_ACM_SERIAL_INITIALIZE_AT_BOOT=n
CONFIG_USBD_AUDIO2_CLASS=y
CONFIG_UDC_ENABLE_SOF=y
CONFIG_UDC_DWC2_DMA=n
CONFIG_UDC_DWC2_PTI=y
CONFIG_UDC_BUF_COUNT=64
CONFIG_UDC_BUF_POOL_SIZE=16384

# USB Device Identification
CONFIG_SAMPLE_USBD_VID=0x303A
CONFIG_SAMPLE_USBD_PID=0x4002
CONFIG_SAMPLE_USBD_MANUFACTURER="Espressif"
CONFIG_SAMPLE_USBD_PRODUCT="ESP32-P4 Dual UAC2 Audio"

# System Resources & Memory
CONFIG_MAIN_STACK_SIZE=4096
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096
CONFIG_USBD_THREAD_STACK_SIZE=4096
CONFIG_UDC_DWC2_STACK_SIZE=4096
CONFIG_UDC_WORKQUEUE_STACK_SIZE=4096
CONFIG_ISR_STACK_SIZE=4096
CONFIG_HW_STACK_PROTECTION=n
CONFIG_HEAP_MEM_POOL_SIZE=16384
CONFIG_TICKLESS_KERNEL=n
CONFIG_SYS_CLOCK_TICKS_PER_SEC=1000

# Logging & UART Console
CONFIG_LOG=y
CONFIG_LOG_DEFAULT_LEVEL=3
CONFIG_LOG_MAX_LEVEL=4
CONFIG_SOF_LOG_LEVEL_INF=y
CONFIG_DAI_LOG_LEVEL_INF=y
CONFIG_USBD_UAC2_LOG_LEVEL_INF=y
CONFIG_UDC_DRIVER_LOG_LEVEL_INF=y
CONFIG_LOG_MODE_DEFERRED=y
CONFIG_LOG_BUFFER_SIZE=4096
CONFIG_LOG_MODE_OVERFLOW=y
CONFIG_LOG_BACKEND_UART=y
CONFIG_SHELL_LOG_BACKEND=y
CONFIG_PRINTK=y
CONFIG_LOG_PRINTK=n
CONFIG_EARLY_CONSOLE=y

# Interactive Shell
CONFIG_SHELL=y
CONFIG_SHELL_STACK_SIZE=8192
CONFIG_SHELL_BACKENDS=y
CONFIG_SHELL_BACKEND_SERIAL=y
CONFIG_SHELL_PROMPT_UART="sof:~$ "

# SOF Low Latency Scheduler Statistics Logging (Every 1s)
CONFIG_SCHEDULE_LL_STATS_LOG=y
CONFIG_SCHEDULE_LL_STATS_LOG_EVERY_OTHER_WINDOW=n
CONFIG_SCHEDULE_LL_STATS_LOG_WINDOW_SIZE=10
175 changes: 175 additions & 0 deletions app/boards/esp32p4_function_ev_board_esp32p4_hpcore.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,175 @@
#include <zephyr/dt-bindings/usb/audio.h>
#include <zephyr/dt-bindings/pinctrl/esp32p4-pinctrl.h>

/ {
chosen {
zephyr,console = &uart0;
zephyr,shell-uart = &uart0;
};

uac2_card: usb_audio2 {
compatible = "zephyr,uac2";
status = "okay";
full-speed;
audio-function = <AUDIO_FUNCTION_IO_BOX>;

uac_aclk: aclk {
compatible = "zephyr,uac2-clock-source";
clock-type = "internal-programmable";
frequency-control = "host-programmable";
sampling-frequencies = <48000>;
sof-synchronized;
};

pdm_aclk: pdm_aclk {
compatible = "zephyr,uac2-clock-source";
clock-type = "internal-programmable";
frequency-control = "host-programmable";
sampling-frequencies = <48000>;
sof-synchronized;
};

/* ===== Playback from Host (ISO OUT) ===== */
i2s_out_terminal: i2s_out_terminal {
compatible = "zephyr,uac2-input-terminal";
clock-source = <&uac_aclk>;
terminal-type = <USB_TERMINAL_STREAMING>;
front-left;
front-right;
};

i2s_fu: i2s_fu {
compatible = "zephyr,uac2-feature-unit";
data-source = <&i2s_out_terminal>;
mute-control = "host-programmable";
volume-control = "host-programmable";
};

pb_eq_fu: pb_eq_fu {
compatible = "zephyr,uac2-feature-unit";
data-source = <&i2s_fu>;
mute-control = "host-programmable";
};

pb_drc_fu: pb_drc_fu {
compatible = "zephyr,uac2-feature-unit";
data-source = <&pb_eq_fu>;
mute-control = "host-programmable";
};

i2s_speaker: i2s_speaker {
compatible = "zephyr,uac2-output-terminal";
data-source = <&pb_drc_fu>;
clock-source = <&uac_aclk>;
terminal-type = <OUTPUT_TERMINAL_SPEAKER>;
assoc-terminal = <&i2s_mic>;
};

/* ===== Capture to Host (ISO IN) ===== */
i2s_mic: i2s_mic {
compatible = "zephyr,uac2-input-terminal";
clock-source = <&uac_aclk>;
terminal-type = <INPUT_TERMINAL_MICROPHONE>;
front-left;
front-right;
};

cap_tdfb_fu: cap_tdfb_fu {
compatible = "zephyr,uac2-feature-unit";
data-source = <&i2s_mic>;
mute-control = "host-programmable";
};

cap_eq_fu: cap_eq_fu {
compatible = "zephyr,uac2-feature-unit";
data-source = <&cap_tdfb_fu>;
mute-control = "host-programmable";
};

i2s_in_fu: i2s_in_fu {
compatible = "zephyr,uac2-feature-unit";
data-source = <&cap_eq_fu>;
mute-control = "host-programmable";
volume-control = "host-programmable";
};

i2s_in_terminal: i2s_in_terminal {
compatible = "zephyr,uac2-output-terminal";
data-source = <&i2s_in_fu>;
clock-source = <&uac_aclk>;
terminal-type = <USB_TERMINAL_STREAMING>;
};

/* Audio Streaming Interfaces */
as_i2s_out: as_i2s_out {
compatible = "zephyr,uac2-audio-streaming";
linked-terminal = <&i2s_out_terminal>;
subslot-size = <2>;
bit-resolution = <16>;
};

as_i2s_in: as_i2s_in {
compatible = "zephyr,uac2-audio-streaming";
linked-terminal = <&i2s_in_terminal>;
subslot-size = <2>;
bit-resolution = <16>;
};
};

/* ESP32 DAI Nodes */
dai_i2s0: dai@500c6000 {
compatible = "espressif,esp32-dai-i2s";
status = "okay";
reg = <0x500c6000 0x1000>;
interrupt-parent = <&intc>;
interrupts = <10 1 0>;
dai-index = <0>;
pinctrl-0 = <&i2s0_default>;
pinctrl-names = "default";
fifo-depth = <32>;
};

dai_pdm0: dai@500c7000 {
compatible = "espressif,esp32-dai-pdm";
status = "okay";
reg = <0x500c7000 0x1000>;
interrupt-parent = <&intc>;
interrupts = <11 1 0>;
dai-index = <1>;
pinctrl-0 = <&i2s1_default>;
pinctrl-names = "default";
fifo-depth = <32>;
};
};

&pinctrl {
i2s0_default: i2s0_default {
group1 {
pinmux = <ESP32_PINMUX(21, ESP_I2S0_O_BCK_IN, ESP_I2S0_O_BCK_OUT)>,
<ESP32_PINMUX(22, ESP_I2S0_O_WS_IN, ESP_I2S0_O_WS_OUT)>,
<ESP32_PINMUX(23, ESP_NOSIG, ESP_I2S0_O_SD_OUT)>;
};
group2 {
pinmux = <ESP32_PINMUX(20, ESP_I2S0_I_SD_IN, ESP_NOSIG)>;
};
};

i2s1_default: i2s1_default {
group1 {
pinmux = <ESP32_PINMUX(4, ESP_I2S1_O_BCK_IN, ESP_NOSIG)>,
<ESP32_PINMUX(5, ESP_NOSIG, ESP_I2S1_O_SD_OUT)>,
<ESP32_PINMUX(6, ESP_I2S1_O_WS_IN, ESP_NOSIG)>;
};
group2 {
pinmux = <ESP32_PINMUX(3, ESP_I2S1_I_SD_IN, ESP_NOSIG)>;
};
};
};

&spi2 {
status = "disabled";
};

&i2c0 {
status = "disabled";
};
Loading
Loading