Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
ba1bc4d
[DNM] Audio: Buffers: Add support for DP-to-DP component binding
singalsu Feb 19, 2026
1651dce
scripts: llext: support relocatable link bypass
lrgirdwo Jun 16, 2026
c1a8cde
library_manager: llext: implement page-level VMA allocator for reloca…
lrgirdwo Jun 16, 2026
7c138cd
config: llext: enable SLID-based symbol linking for relocatable modules
lrgirdwo Jun 16, 2026
ba349a6
lib: cpp: export operator new/delete and __cxa_pure_virtual for LLEXT
lrgirdwo Aug 16, 2026
8df4364
zephyr: llext: link non-relocatable modules -Bsymbolic-functions
lrgirdwo Aug 16, 2026
a919aa1
scripts: llext_link_helper: always use fixed-address section layout
lrgirdwo Aug 16, 2026
64fdb16
library_manager: llext: fix section rebase, layout packing, and expor…
lrgirdwo Aug 16, 2026
6058a9f
lib: ams: export producer API for LLEXT modules
lrgirdwo Aug 16, 2026
e25a8b6
scripts: xtensa-build-zephyr: create per-UUID symlinks in install_lib()
lrgirdwo Aug 16, 2026
28a4698
scripts: tensorflow-clone: checkout required library commits
singalsu Aug 26, 2026
3d69495
platform: cavs: initialize DP scheduler during platform_init
singalsu Aug 24, 2026
9ceb549
audio: microwakeword: implement mww component
singalsu Aug 27, 2026
713ccbb
docs: microwakeword: add README with architecture and known issues
singalsu Aug 27, 2026
2040595
audio: microwakeword: update default strawberry model
singalsu Aug 27, 2026
fed90e3
audio: microwakeword: tune: add model training and verification toolc…
singalsu Aug 27, 2026
f4a9080
tools: topology2: add IPC4 ABI manifest and KPB IPC4 UUID definitions
singalsu Aug 27, 2026
1cc09ce
audio: mfcc: add mel40 and mel40_10ms profiles for microWakeWord fron…
singalsu Aug 27, 2026
174428c
tools: topology: add testbench topologies for mel40_10ms MFCC
singalsu Aug 27, 2026
6d642ec
tools: topology2: add microWakeWord (MWW) Wake-on-Voice topologies an…
singalsu Aug 27, 2026
bcbe260
rimage: config: include microWakeWord (MWW) module in platform manifests
singalsu Aug 27, 2026
1041ba7
platform: cavs25: enable microWakeWord (MWW) statically on cAVS 2.5
singalsu Aug 27, 2026
28a11a0
config: intel_adsp: enable microWakeWord (MWW) LLEXT module on ACE pl…
singalsu Aug 27, 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
7 changes: 7 additions & 0 deletions app/boards/intel_adsp_ace15_mtpm.conf
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ CONFIG_FORMAT_CONVERT_HIFI3=n
CONFIG_SAMPLE_KEYPHRASE=y
CONFIG_COMP_PHASE_VOCODER=y
CONFIG_COMP_STFT_PROCESS=y
CONFIG_SOF_STAGING=y
CONFIG_CPP=y
CONFIG_STD_CPP17=y
CONFIG_COMP_TENSORFLOW=n
CONFIG_COMP_MWW=m
CONFIG_STACK_SIZE_EDF=32768

# SOF / audio modules / mocks
# This mock is part of official sof-bin releases because the CI that
Expand Down Expand Up @@ -57,6 +63,7 @@ CONFIG_LLEXT=y
CONFIG_LLEXT_STORAGE_WRITABLE=y
CONFIG_LLEXT_EXPERIMENTAL=y
CONFIG_LLEXT_EDK=n
CONFIG_LLEXT_HEAP_SIZE=64
CONFIG_MODULES=y
CONFIG_TIMING_FUNCTIONS=y
CONFIG_WATCHDOG=y
Expand Down
32 changes: 30 additions & 2 deletions app/boards/intel_adsp_ace30_ptl.conf
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,21 @@ CONFIG_FORMAT_CONVERT_HIFI3=n
CONFIG_COMP_GOOGLE_RTC_AUDIO_PROCESSING=m
CONFIG_GOOGLE_RTC_AUDIO_PROCESSING_MOCK=y
CONFIG_COMP_STFT_PROCESS=y
CONFIG_SOF_STAGING=y
CONFIG_COMP_KPB=y
CONFIG_CPP=y
CONFIG_STD_CPP17=y
# tflmcly (stock keyword model) is not yet GNU-toolchain-clean on aphid
# (undefined sof_ut_log/__assert_no_args/abs); not required by mww, which
# builds its own independent TFLM lib copy. Disabled here to unblock the
# aphid mww LLEXT build.
CONFIG_COMP_TENSORFLOW=n
CONFIG_COMP_MFCC=y
CONFIG_COMP_MWW=m
CONFIG_AMS=y
CONFIG_STACK_SIZE_EDF=32768
CONFIG_COMP_VOLUME=y
CONFIG_COMP_GAIN=y

# SOF / infrastructure
CONFIG_KCPS_DYNAMIC_CLOCK_CONTROL=n
Expand All @@ -29,7 +44,7 @@ CONFIG_COLD_STORE_EXECUTE_DRAM=y
CONFIG_INTEL_MODULES=y
CONFIG_LIBRARY_AUTH_SUPPORT=y
CONFIG_LIBRARY_MANAGER=y
CONFIG_LIBRARY_BASE_ADDRESS=0xa0688000
CONFIG_LIBRARY_BASE_ADDRESS=0xa0700000
CONFIG_LIBRARY_BUILD_LIB=y
CONFIG_LIBRARY_DEFAULT_MODULAR=y

Expand All @@ -38,11 +53,19 @@ CONFIG_SOF_LOG_LEVEL_INF=y

# Zephyr / OS features
CONFIG_COUNTER=y
CONFIG_HEAP_MEM_POOL_SIZE=8192
CONFIG_HEAP_MEM_POOL_SIZE=32768
CONFIG_COMMON_LIBC_MALLOC_ARENA_SIZE=32768
CONFIG_LLEXT=y
CONFIG_LLEXT_STORAGE_WRITABLE=y
CONFIG_LLEXT_EXPERIMENTAL=y
CONFIG_LLEXT_EDK=n

# Default LLEXT metadata heap (CONFIG_LLEXT_HEAP_SIZE, 8 KB) is sized for
# small extensions with few STB_GLOBAL-only exported symbols. mww.llext
# links in TFLM, whose template-instantiated vtables/typeinfo are emitted
# STB_WEAK -- now included in ext->sym_tab after the llext_load.c fix -- and
# blows past 8 KB (Failed to allocate extension symbol table, ret -12).
CONFIG_LLEXT_HEAP_SIZE=256
CONFIG_MODULES=y

# Zephyr / device drivers
Expand Down Expand Up @@ -78,3 +101,8 @@ CONFIG_SOF_USERSPACE_PROXY=y
CONFIG_MAX_THREAD_BYTES=3

CONFIG_MAX_DOMAIN_PARTITIONS=32

# Debug: get faulting virtual address for openmodules-load panic
# CONFIG_XTENSA_ADSP_FATAL_BREADCRUMB_DATA_VADDR=y
CONFIG_SYS_HEAP_RUNTIME_STATS=y
CONFIG_SOF_ZEPHYR_HEAP_SIZE=0x80000
11 changes: 10 additions & 1 deletion app/boards/intel_adsp_cavs25.conf
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@ CONFIG_COMP_MFCC=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
# cavs2.5 has no LLEXT/module-manager support (see CONFIG_LIBRARY_MANAGER=n
# below), so build mww in statically rather than as an LLEXT module.
CONFIG_COMP_MWW=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
Expand All @@ -33,7 +41,8 @@ CONFIG_SOF_LOG_LEVEL_INF=y
CONFIG_DEBUG_COREDUMP=y
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 app/llext_relocatable.conf
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
CONFIG_LLEXT_TYPE_ELF_RELOCATABLE=y
CONFIG_LLEXT_EXPORT_BUILTINS_BY_SLID=y
3 changes: 3 additions & 0 deletions scripts/llext_offset_calc.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ def get_elf_size(elf_name):
if section.header['sh_addr'] + section.header['sh_size'] > end:
end = section.header['sh_addr'] + section.header['sh_size']

if start == 0xffffffff:
return 0

size = end - start

return size
Expand Down
67 changes: 47 additions & 20 deletions scripts/tensorflow-clone.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2025 Intel Corporation. All rights reserved.
# Copyright(c) 2025-2026 Intel Corporation. All rights reserved.

# fail immediately on any errors
set -e
Expand All @@ -14,8 +14,7 @@ declare -a REPOS=(
"https://github.com/google/ruy"
)

# Commit ID to check for (optional). If specified, the script will update
# the repository if this commit ID is not found. Leave empty to skip.
# Commit ID to check out. If specified, the script will checkout this commit.
declare -a COMMIT_ID=(
"cdedfb1a1044eb774915de21b63a1b6aa93276f6"
"e86d97b6237f88ab5925c0b41e3e3589a1560d86"
Expand All @@ -25,7 +24,10 @@ declare -a COMMIT_ID=(
)

# Directory where repositories will be cloned/updated.
BASE_DIR="$HOME/work/sof" # Or any other desired location
# Default to the parent directory containing the SOF workspace.
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
SOF_PARENT_DIR="$(cd "$SCRIPT_DIR/../.." && pwd)"
BASE_DIR="${1:-"$SOF_PARENT_DIR"}"

# Function to check if a commit ID exists in a repository
check_commit() {
Expand All @@ -36,40 +38,65 @@ check_commit() {
return 0 # Skip check if no commit ID is provided
fi

if ! git -C "$repo_dir" rev-parse --quiet --verify "$commit_id" >/dev/null 2>&1; then
return 1 # Commit ID not found
if ! git -C "$repo_dir" rev-parse --quiet --verify "$commit_id^{commit}" >/dev/null 2>&1; then
return 1 # Commit ID not found locally
else
return 0 # Commit ID found
return 0 # Commit ID found locally
fi
}


# Function to update the repository
update_repo() {
local repo_dir="$1"
echo "Updating repository: $repo_dir"
git -C "$repo_dir" fetch --all
git -C "$repo_dir" pull
git -C "$repo_dir" fetch --all --tags --prune
}

# Function to checkout the required commit ID
checkout_commit() {
local repo_dir="$1"
local commit_id="$2"
local repo_name="$3"

if [ -z "$commit_id" ]; then
return 0
fi

local current_commit
current_commit=$(git -C "$repo_dir" rev-parse HEAD)

local target_commit
target_commit=$(git -C "$repo_dir" rev-parse "$commit_id^{commit}")

if [ "$current_commit" != "$target_commit" ]; then
echo "Checking out $commit_id in $repo_name..."
git -C "$repo_dir" checkout -q "$commit_id"
else
echo "Repository $repo_name is already at commit $commit_id."
fi
}

# Main script logic
mkdir -p "$BASE_DIR"

for ((i = 0; i < ${#REPOS[@]}; i++)); do
echo "Counter: $i, Value: ${REPOS[i]}"
repo_url=${REPOS[i]}

repo_name=$(basename "$repo_url" .git) # Extract repo name
repo_url="${REPOS[i]}"
commit_id="${COMMIT_ID[i]}"
repo_name=$(basename "$repo_url" .git)
repo_dir="$BASE_DIR/$repo_name"

if [ ! -d "$repo_dir" ]; then
echo "Cloning repository: $repo_url"
echo "=== [$((i + 1))/${#REPOS[@]}] $repo_name ==="

if [ ! -d "$repo_dir/.git" ]; then
echo "Cloning repository: $repo_url -> $repo_dir"
git clone "$repo_url" "$repo_dir" || { echo "git clone failed for $repo_url"; exit 1; }
elif ! check_commit "$repo_dir" "${COMMIT_ID[i]}"; then
fi

if ! check_commit "$repo_dir" "$commit_id"; then
update_repo "$repo_dir"
else
echo "Repository $repo_name is up to date."
fi

checkout_commit "$repo_dir" "$commit_id" "$repo_name"
done

echo "All repositories processed."
echo "All repositories processed and checked out to required commits."
4 changes: 4 additions & 0 deletions scripts/xtensa-build-zephyr.py
Original file line number Diff line number Diff line change
Expand Up @@ -1174,6 +1174,10 @@ def install_lib(platform, sof_output_dir, abs_build_dir, platform_wconfig):
symlink_or_copy(lib_install_dir, lib_name,
lib_dir, alias_libname)

for uuid in lib_uuids.get(key, []):
linkname = uuid + '.bin'
symlink_or_copy(lib_install_dir, lib_name, sof_lib_dir, linkname)

def install_platform(platform, sof_output_dir, platf_build_environ, platform_wconfig):

# Keep in sync with caller
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
73 changes: 61 additions & 12 deletions src/audio/buffers/audio_buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@
int audio_buffer_attach_secondary_buffer(struct sof_audio_buffer *buffer, bool at_input,
struct sof_audio_buffer *secondary_buffer)
{
if (buffer->secondary_buffer_sink || buffer->secondary_buffer_source)
/* 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;

/* secondary buffer must share audio params with the primary buffer */
Expand All @@ -48,6 +51,54 @@ int audio_buffer_sync_secondary_buffer(struct sof_audio_buffer *buffer, size_t l
struct sof_source *data_src;
struct sof_sink *data_dst;

if (buffer->secondary_buffer_sink && buffer->secondary_buffer_source) {
/*
* DP-to-DP case: both secondary buffers present.
* Data flows: input_ring_buffer -> comp_buffer -> output_ring_buffer
*
* This buffer is visited twice during each LL cycle:
* - In the input loop (sink DP module via comp_dev_for_each_producer) with
* limit == SIZE_MAX. In a DP-to-DP connection, input to sink DP is fed
* via output_ring_buffer; the intermediate comp_buffer transfer is driven
* by the output loop. Hence, this call is a no-op.
* - In the output loop (source DP module via comp_dev_for_each_consumer) with
* limit == source_get_min_available(downstream). This executes the 2-step
* cascade with rate-limiting properly applied on the output transfer.
*/
if (limit == SIZE_MAX)
return 0;

/*
* Step 1: copy from input secondary buffer to primary (comp_buffer).
* No limit on input side - copy all available data.
*/
data_src = audio_buffer_get_source(buffer->secondary_buffer_sink);
data_dst = &buffer->_sink_api;

size_t data_available = source_get_data_available(data_src);
size_t free_size = sink_get_free_size(data_dst);
size_t to_copy = MIN(data_available, free_size);

err = source_to_sink_copy(data_src, data_dst, true, to_copy);
if (err)
return err;

/*
* Step 2: copy from primary (comp_buffer) to output secondary buffer.
* Apply the limit to the output side to control how much data
* is made available to the downstream DP module per LL cycle.
*/
data_src = &buffer->_source_api;
data_dst = audio_buffer_get_sink(buffer->secondary_buffer_source);

data_available = source_get_data_available(data_src);
free_size = sink_get_free_size(data_dst);
to_copy = MIN(MIN(data_available, free_size), limit);

err = source_to_sink_copy(data_src, data_dst, true, to_copy);
return err;
}

if (buffer->secondary_buffer_sink) {
/*
* audio_buffer sink API is shadowed, that means there's a secondary_buffer
Expand Down Expand Up @@ -203,18 +254,16 @@ 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 dual ring_buffers
* attached as secondary buffers on both sides of a comp_buffer.
* Data cascades: ring_buf_src -> comp_buffer -> ring_buf_sink
* with syncing during each LL cycle.
*
* 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
7 changes: 6 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,12 @@ 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);

/* matches vregion_get() in ipc_comp_connect() for each ring_buffer */
if (alloc && alloc->vreg) {
if (!vregion_put(alloc->vreg))
rfree(alloc);
}
}

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