Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
ef4abee
audio: module_adapter: skip zero-rate sinks in DP period calc
singalsu Sep 11, 2026
9592c5c
sink: guard sink_get_free_frames against zero frame size
singalsu Sep 11, 2026
0b3092f
vregion: include llext/symbol.h for EXPORT_SYMBOL
singalsu Sep 11, 2026
35e8aa2
audio: pipeline: guard against NULL source or sink in pipeline_copy()
singalsu Sep 9, 2026
a73894b
audio: mfcc: set DP schedule period from FFT hop cadence
singalsu Sep 11, 2026
0e8d4a8
math: audio: add PCAN (Per-Channel AGC Normalization) support
singalsu Sep 23, 2026
b7bb8a9
audio: mfcc: add 8-bit PCAN feature extraction support
singalsu Sep 24, 2026
2830d90
audio: mfcc: tune: add PCAN profiles and export configuration
singalsu Sep 24, 2026
66a18a3
audio: microwakeword: implement mww component
singalsu Sep 24, 2026
4e6b45b
rimage: config: include microWakeWord (MWW) module in platform manifests
singalsu Aug 27, 2026
e5e0e01
audio: microwakeword: tune: add model training, dataset, and test run…
singalsu Sep 23, 2026
e1bc6e5
tools: topology2: add microWakeWord (MWW) Wake-on-Voice topologies
singalsu Sep 24, 2026
0cfa21d
[DNM] tools: ctl: mww: add runtime model bytes controls
singalsu Sep 24, 2026
99444e5
[DNM] platform: cavs: initialize DP scheduler during platform_init
singalsu Aug 24, 2026
7de0245
[DNM] audio: buffers: add support for DP-to-DP component binding
singalsu Sep 8, 2026
d303212
[DNM] audio: kpb: add polling drain notify and handle sink loss
singalsu Sep 11, 2026
3ffd0ab
[DNM] audio: microwakeword: use kpb polling notify for keyword trigger
singalsu Sep 11, 2026
07b0548
[DNM] boards: Enable modules for static build keyword detect
singalsu Sep 24, 2026
68f74c9
audio: microwakeword: gate host output in D0i3
ujfalusi Sep 25, 2026
ebbe7c8
audio: mww: support virtual detect sink
singalsu Sep 25, 2026
c87661e
tools: topology2: simplify ADL MWW detection path
singalsu Sep 25, 2026
b6a739c
tools: topology2: refactor MWW KPB topologies to common mono pipeline
singalsu Sep 28, 2026
e4d83e8
ipc: ipc4: helper: fix NULL dereference when binding to DP module
singalsu Sep 28, 2026
f3c4e0a
audio: pipeline: initialize LL tasks for DP-only pipelines
singalsu Sep 28, 2026
0e05216
audio: microwakeword: fix Copilot review items
singalsu Sep 28, 2026
9972bbf
tools: topology2: align DMIC copier formats with NHLT for ADL MWW
singalsu Sep 29, 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
6 changes: 5 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

cmake_minimum_required(VERSION 3.13)


if("${CMAKE_CURRENT_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_BINARY_DIR}")
message(FATAL_ERROR
" In-source builds are not supported.\n"
Expand Down Expand Up @@ -58,7 +59,10 @@ set(CMAKE_ASM_FLAGS -DASSEMBLY)
# that may be exported / installed
add_library(sof_public_headers INTERFACE)

target_include_directories(sof_public_headers INTERFACE ${PROJECT_SOURCE_DIR}/src/include)
target_include_directories(sof_public_headers INTERFACE
${PROJECT_SOURCE_DIR}/src/include
${PROJECT_SOURCE_DIR}/../tflite-micro
)

# interface library that is used only as container for sof binary options
# other targets can use it to build with the same options
Expand Down
3 changes: 3 additions & 0 deletions app/boards/intel_adsp/Kconfig.defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@ config L3_HEAP
config ZEPHYR_DP_SCHEDULER
default y

config DP_TO_DP_BIND
default y

config ZEPHYR_NATIVE_DRIVERS
default y

Expand Down
59 changes: 28 additions & 31 deletions app/boards/intel_adsp_ace30_ptl.conf
Original file line number Diff line number Diff line change
Expand Up @@ -5,33 +5,45 @@ CONFIG_RIMAGE_SIGNING_SCHEMA="ptl"
CONFIG_IPC_MAJOR_4=y

# SOF / audio pipeline and module settings
CONFIG_COMP_TESTER=m
CONFIG_COMP_TESTER=n
CONFIG_COMP_SRC_IPC4_FULL_MATRIX=y
CONFIG_FORMAT_CONVERT_HIFI3=n

# SOF / audio modules / mocks
# This mock is part of official sof-bin releases because the CI that
# tests it can't use extra CONFIGs. See #9410, #8722 and #9386
CONFIG_COMP_GOOGLE_RTC_AUDIO_PROCESSING=m
CONFIG_GOOGLE_RTC_AUDIO_PROCESSING_MOCK=y
CONFIG_COMP_STFT_PROCESS=y
CONFIG_COMP_GOOGLE_RTC_AUDIO_PROCESSING=n
CONFIG_COMP_STFT_PROCESS=n
CONFIG_SOF_STAGING=y
CONFIG_CPP=y
CONFIG_STD_CPP17=y
CONFIG_COMP_TENSORFLOW=n
CONFIG_COMP_MFCC=y
CONFIG_COMP_MFCC_PCAN=y
CONFIG_COMP_MFCC_DEBUG_TRACE=y
CONFIG_COMP_MWW=y
CONFIG_COMP_MWW_PCAN=y
CONFIG_COMP_MWW_DEBUG_TRACE=y
CONFIG_COMP_MWW_MODEL_FROM_CONTROL=n
CONFIG_AMS=y
CONFIG_STACK_SIZE_EDF=32768
# Standard hda-generic components, built statically.
CONFIG_COMP_DRC=y
CONFIG_COMP_MULTIBAND_DRC=y
CONFIG_PCM_CONVERTER_FORMAT_S24_3LE=y

# SOF / infrastructure
CONFIG_KCPS_DYNAMIC_CLOCK_CONTROL=n
# Match cavs25 static-mww build: 15 ms default IDC timeout is too tight
# for CREATE_PIPELINE forwarded to a secondary core while the DP scheduler
# and TFLM tensor-arena setup are in flight.
CONFIG_IDC_TIMEOUT_US=100000
CONFIG_PROBE=y
CONFIG_PROBE_DMA_MAX=2
CONFIG_SOF_TELEMETRY=y
CONFIG_SOF_TELEMETRY_IO_PERFORMANCE_MEASUREMENTS=y
CONFIG_SOF_TELEMETRY_PERFORMANCE_MEASUREMENTS=y
CONFIG_COLD_STORE_EXECUTE_DRAM=y

# SOF / loadable modules
# SOF / loadable modules -- disabled for cavs25-style static build.
CONFIG_INTEL_MODULES=y
CONFIG_LIBRARY_AUTH_SUPPORT=y
CONFIG_LIBRARY_MANAGER=y
CONFIG_LIBRARY_BASE_ADDRESS=0xa0688000
CONFIG_LIBRARY_BUILD_LIB=y
CONFIG_LIBRARY_DEFAULT_MODULAR=y
CONFIG_LIBRARY_MANAGER=n

# SOF / logging
CONFIG_SOF_LOG_LEVEL_INF=y
Expand All @@ -43,12 +55,8 @@ CONFIG_SOF_LOG_LEVEL_INF=y
CONFIG_DEBUG_COREDUMP_BACKEND_INTEL_ADSP_MEM_WINDOW=y
CONFIG_DEBUG_COREDUMP_MEMORY_DUMP_MIN=y
CONFIG_COUNTER=y
CONFIG_HEAP_MEM_POOL_SIZE=8192
CONFIG_LLEXT=y
CONFIG_LLEXT_STORAGE_WRITABLE=y
CONFIG_LLEXT_EXPERIMENTAL=y
CONFIG_LLEXT_EDK=n
CONFIG_MODULES=y
CONFIG_HEAP_MEM_POOL_SIZE=32768
CONFIG_COMMON_LIBC_MALLOC_ARENA_SIZE=32768

# Zephyr / device drivers
CONFIG_DAI_INIT_PRIORITY=70
Expand All @@ -72,14 +80,3 @@ CONFIG_PM_DEVICE_RUNTIME_ASYNC=n
CONFIG_LOG_BACKEND_ADSP=n
CONFIG_LOG_FLUSH_SLEEP_US=5000
CONFIG_WINSTREAM_CONSOLE=n

# Userspace options
CONFIG_USERSPACE=y
CONFIG_DYNAMIC_THREAD=y
CONFIG_DYNAMIC_THREAD_ALLOC=y
CONFIG_DYNAMIC_THREAD_PREFER_ALLOC=y
CONFIG_SOF_STACK_SIZE=8192
CONFIG_SOF_USERSPACE_PROXY=y
CONFIG_MAX_THREAD_BYTES=3

CONFIG_MAX_DOMAIN_PARTITIONS=32
13 changes: 12 additions & 1 deletion app/boards/intel_adsp_cavs25.conf
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,26 @@ CONFIG_COMP_ARIA=y
CONFIG_COMP_CROSSOVER=y
CONFIG_COMP_DRC=y
CONFIG_COMP_MFCC=y
CONFIG_COMP_MFCC_PCAN=y
CONFIG_COMP_MULTIBAND_DRC=y
CONFIG_COMP_VOLUME_WINDOWS_FADE=y
CONFIG_FORMAT_CONVERT_HIFI3=n
CONFIG_SOF_STAGING=y
CONFIG_CPP=y
CONFIG_STD_CPP17=y
CONFIG_COMP_MWW=y
CONFIG_COMP_MWW_PCAN=y
CONFIG_COMP_MWW_DEBUG_TRACE=y
CONFIG_STACK_SIZE_EDF=32768
CONFIG_PCM_CONVERTER_FORMAT_S16LE=y
CONFIG_PCM_CONVERTER_FORMAT_S24LE=y
CONFIG_PCM_CONVERTER_FORMAT_S32LE=y
CONFIG_PCM_CONVERTER_FORMAT_S24_3LE=y

# SOF / infrastructure
CONFIG_AMS=y
CONFIG_IDC_TIMEOUT_US=100000
CONFIG_P4WQ_INIT_STAGE_EARLY=y
CONFIG_LP_MEMORY_BANKS=1
CONFIG_HP_MEMORY_BANKS=30

Expand All @@ -35,7 +45,8 @@ CONFIG_SOF_LOG_LEVEL_INF=y
# choices have to be selected per board.
CONFIG_DEBUG_COREDUMP_BACKEND_INTEL_ADSP_MEM_WINDOW=y
CONFIG_DEBUG_COREDUMP_MEMORY_DUMP_MIN=y
CONFIG_HEAP_MEM_POOL_SIZE=8192
CONFIG_HEAP_MEM_POOL_SIZE=32768
CONFIG_COMMON_LIBC_MALLOC_ARENA_SIZE=32768

# Zephyr / device drivers
CONFIG_DAI_INIT_PRIORITY=70
Expand Down
1 change: 1 addition & 0 deletions src/arch/host/configs/library_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ CONFIG_COMP_IIR=y
CONFIG_COMP_IGO_NR=y
CONFIG_COMP_LEVEL_MULTIPLIER=y
CONFIG_COMP_MFCC=y
CONFIG_COMP_MFCC_PCAN=y
CONFIG_COMP_MODULE_ADAPTER=y
CONFIG_COMP_MULTIBAND_DRC=y
CONFIG_COMP_MUX=y
Expand Down
3 changes: 3 additions & 0 deletions src/audio/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ if(NOT CONFIG_COMP_MODULE_SHARED_LIBRARY_BUILD)
if(CONFIG_COMP_MFCC)
add_subdirectory(mfcc)
endif()
if(CONFIG_COMP_MWW)
add_subdirectory(microwakeword)
endif()
if(CONFIG_COMP_MIXER)
add_subdirectory(mixer)
endif()
Expand Down
1 change: 1 addition & 0 deletions src/audio/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ rsource "eq_iir/Kconfig"
rsource "google/Kconfig"
rsource "igo_nr/Kconfig"
rsource "mfcc/Kconfig"
rsource "microwakeword/Kconfig"
rsource "mixer/Kconfig"
rsource "mixin_mixout/Kconfig"
rsource "module_adapter/Kconfig"
Expand Down
43 changes: 32 additions & 11 deletions src/audio/buffers/audio_buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,16 @@
int audio_buffer_attach_secondary_buffer(struct sof_audio_buffer *buffer, bool at_input,
struct sof_audio_buffer *secondary_buffer)
{
#ifdef CONFIG_DP_TO_DP_BIND
/* check per-side: allow attaching on both sides (needed for DP-to-DP) */
if (at_input && buffer->secondary_buffer_sink)
return -EINVAL;
if (!at_input && buffer->secondary_buffer_source)
return -EINVAL;
#else
if (buffer->secondary_buffer_sink || buffer->secondary_buffer_source)
return -EINVAL;
#endif

/* secondary buffer must share audio params with the primary buffer */
secondary_buffer->audio_stream_params = buffer->audio_stream_params;
Expand All @@ -48,6 +56,18 @@ int audio_buffer_sync_secondary_buffer(struct sof_audio_buffer *buffer, size_t l
struct sof_source *data_src;
struct sof_sink *data_dst;

#ifdef CONFIG_DP_TO_DP_BIND
if (buffer->secondary_buffer_sink && buffer->secondary_buffer_source) {
/*
* DP-to-DP case: a single shared ring_buffer is attached on both sides.
* The source DP writes directly to the ring_buffer sink API, and the
* sink DP reads directly from the ring_buffer source API.
* No copying is needed during the LL cycle.
*/
return 0;
}
#endif

if (buffer->secondary_buffer_sink) {
/*
* audio_buffer sink API is shadowed, that means there's a secondary_buffer
Expand Down Expand Up @@ -95,7 +115,12 @@ void audio_buffer_free(struct sof_audio_buffer *buffer)
CORE_CHECK_STRUCT(buffer);
#if CONFIG_PIPELINE_2_0
audio_buffer_free(buffer->secondary_buffer_sink);
#ifdef CONFIG_DP_TO_DP_BIND
if (buffer->secondary_buffer_source != buffer->secondary_buffer_sink)
audio_buffer_free(buffer->secondary_buffer_source);
#else
audio_buffer_free(buffer->secondary_buffer_source);
#endif
#endif /* CONFIG_PIPELINE_2_0 */
/* "virtual destructor": free the buffer internals and buffer memory */
buffer->ops->free(buffer);
Expand Down Expand Up @@ -203,18 +228,14 @@ uint32_t audio_buffer_sink_get_lft(struct sof_sink *sink)
return us_in_buffer;

/*
* TODO, Currently there's no DP to DP connection
* >>> the code below is never accessible and won't work because of cache incoherence <<<
*
* to make DP to DP connection possible:
* NOTE: DP-to-DP connections are now supported via a single shared ring_buffer
* attached as secondary buffer on both sides of a comp_buffer.
*
* 1) module data must be ALWAYS located in non cached memory alias, allowing
* cross core access to params like period (needed below) and calling
* module_get_deadline for the next module, regardless of cores the modules are
* running on
* 2) comp_buffer must be removed from all pipeline code, replaced with a generic abstract
* class audio_buffer - allowing using comp_buffer and ring_buffer without current
* "hybrid buffer" solution
* Future improvements:
* 1) module data should be in non-cached memory alias for reliable
* cross-core access to params like period and deadlines
* 2) comp_buffer should be replaced with generic audio_buffer
* throughout pipeline code (Pipeline 2.0)
*/
}

Expand Down
14 changes: 13 additions & 1 deletion src/audio/buffers/ring_buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ static inline void ring_buffer_writeback_shared(struct ring_buffer *ring_buffer,
dcache_writeback_region(ptr, size);
}


/**
* @brief remove the queue from the list, free memory
*/
Expand All @@ -101,6 +100,19 @@ static void ring_buffer_free(struct sof_audio_buffer *audio_buffer)

sof_ctx_free(alloc, (__sparse_force void *)ring_buffer->_data_buffer);
sof_ctx_free(alloc, ring_buffer);

#ifdef CONFIG_DP_TO_DP_BIND
/*
* When CONFIG_DP_TO_DP_BIND is enabled, ipc_comp_connect() takes an extra vregion
* reference for each ring_buffer created from a module vregion. Drop that
* reference here and free the allocation context only when the vregion refcount
* reaches zero.
*/
if (alloc && alloc->vreg) {
if (!vregion_put(alloc->vreg))
rfree(alloc);
}
#endif
}

static void ring_buffer_reset(struct sof_audio_buffer *audio_buffer)
Expand Down
Loading