Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
b8566a5
lib-manager: llext: remove entry point functions
lyakh Aug 15, 2025
f898331
modules: Allocate memory containers in chunks
Aug 10, 2025
72cfa7f
modules: Add high water mark to module_adapter_heap_usage()
Aug 11, 2025
e0c36d0
cmocka: Fix mixer test before it breaks due to blob handler dependency
Aug 14, 2025
a771100
modules: Add mod_data_blob_handler_new() to module API
Aug 12, 2025
46d93e0
modules: Add mod_fast_get() and mod_fast_put()
Aug 12, 2025
96d50eb
modules: Add safeguard to mod_alloc() and friends
Aug 15, 2025
4e91bd7
Audio: SRC: Take mod_fast_get() and mod_fast_put() into use
Aug 12, 2025
aa6dfea
Audio: Aria: All memory allocations through module API
Aug 7, 2025
8106c66
Audio: ASRC: Memory, blob, and fast_get allocs to module API
Aug 7, 2025
46bf9ed
Audio: Copier: All memory allocations through module API
Aug 7, 2025
7426388
Audio: crossover: All memory allocations through module API
Aug 11, 2025
c3191ea
Audio: multiband_drc: Memory, blob, and fast_get allocs to module API
Aug 13, 2025
b42cde0
Audio: DRC: Memory, blob, and fast_get allocs to module API
Aug 13, 2025
92dce88
component: split a function into two
lyakh Aug 21, 2025
6abe512
alloc: add functions to use a private heap
lyakh Aug 22, 2025
d69f184
audio: dp: create the thread early
lyakh Jul 25, 2025
ee55de8
schedule: dp: start the task early
lyakh Jul 30, 2025
5564255
audio: dp: terminate component tasks late
lyakh Aug 7, 2025
c8bec35
audio: src: remove unused functions
lyakh Aug 15, 2025
b162946
ipc4: (cosmetic) simplify a condition
lyakh Sep 26, 2025
8440f2b
llext: add support for adding LLEXT memory to a memory domain
lyakh Sep 26, 2025
38ae794
module-adapter: allocate control objects on an own heap
lyakh Aug 22, 2025
1599d72
module-adapter: move mod_alloc() allocations to the module heap
lyakh Aug 22, 2025
c8cec30
module-adapter: move stream parameters to the module heap
lyakh Aug 22, 2025
bf0af82
ring-buffer: allocate on module heap
lyakh Sep 26, 2025
adb2a57
ring-buffer: allocate the data buffer on module heap
lyakh Sep 26, 2025
7b60552
fast-get: allocate on specific heap
lyakh Sep 26, 2025
d802fd6
fast-get: convert to syscalls
lyakh Sep 26, 2025
29541eb
boards: intel-adsp: (cosmetic) reorder for proper grouping
lyakh Oct 2, 2025
645b878
audio: module-adapter: initialize resources in a function
lyakh Oct 2, 2025
614ad33
schedule: dp: support executing IPCs on the thread
lyakh Oct 2, 2025
c4cd002
module-adapter: switch to DP signaling
lyakh Oct 2, 2025
4258fd9
module: make 4 functions inline
lyakh Sep 26, 2025
1c0016b
buffer: allocate on specific heap
lyakh Sep 26, 2025
e20921d
module: add an allocation function with flags
lyakh Oct 6, 2025
54196f9
mod_alloc: convert to syscalls
lyakh Sep 26, 2025
a7c1f3b
module: add a missing header
lyakh Oct 2, 2025
2bef373
probe: fix a variable size structure member
lyakh Oct 2, 2025
dc54374
zephyr: move threads to use SOF heap
lyakh Oct 8, 2025
3aecb83
llext: add a function to remove a memory domain
lyakh Oct 8, 2025
a1d33f6
dp: convert to user-space
lyakh Oct 8, 2025
d2449ac
library-manager: (cosmetic) make a function static
lyakh Oct 8, 2025
be3f83f
west.yml: update to a Zephyr PR
lyakh Oct 8, 2025
66cc6d0
audio: src: simplify src_is_ready_to_process()
lyakh Sep 29, 2025
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
2 changes: 1 addition & 1 deletion app/boards/intel_adsp_ace15_mtpm.conf
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ CONFIG_WATCHDOG=y
CONFIG_TIMESLICE_PER_THREAD=y
CONFIG_THREAD_RUNTIME_STATS=y
CONFIG_SCHED_THREAD_USAGE=y
CONFIG_MM_DRV_INTEL_VIRTUAL_REGION_COUNT=2

# Zephyr / device drivers
CONFIG_CLOCK_CONTROL=y
Expand All @@ -103,6 +102,7 @@ CONFIG_INTEL_ADSP_IPC=y
CONFIG_INTEL_ADSP_TIMER=y
CONFIG_MEMORY_WIN_2_SIZE=12288
CONFIG_MM_DRV_INTEL_ADSP_TLB_REMAP_UNUSED_RAM=y
CONFIG_MM_DRV_INTEL_VIRTUAL_REGION_COUNT=2
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=38400000
CONFIG_SYS_CLOCK_TICKS_PER_SEC=12000

Expand Down
2 changes: 1 addition & 1 deletion app/boards/intel_adsp_ace20_lnl.conf
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ CONFIG_LLEXT_STORAGE_WRITABLE=y
CONFIG_LLEXT_EXPERIMENTAL=y
CONFIG_MODULES=y
CONFIG_TIMING_FUNCTIONS=y
CONFIG_MM_DRV_INTEL_VIRTUAL_REGION_COUNT=2

# Zephyr / device drivers
CONFIG_CLOCK_CONTROL=y
Expand All @@ -82,6 +81,7 @@ CONFIG_INTEL_ADSP_IPC=y
CONFIG_INTEL_ADSP_TIMER=y
CONFIG_MEMORY_WIN_2_SIZE=12288
CONFIG_MM_DRV_INTEL_ADSP_TLB_REMAP_UNUSED_RAM=y
CONFIG_MM_DRV_INTEL_VIRTUAL_REGION_COUNT=2
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=38400000
CONFIG_SYS_CLOCK_TICKS_PER_SEC=12000

Expand Down
3 changes: 2 additions & 1 deletion app/boards/intel_adsp_ace30_ptl.conf
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ CONFIG_LLEXT=y
CONFIG_LLEXT_STORAGE_WRITABLE=y
CONFIG_LLEXT_EXPERIMENTAL=y
CONFIG_MODULES=y
CONFIG_MM_DRV_INTEL_VIRTUAL_REGION_COUNT=2

# Zephyr / device drivers
CONFIG_CLOCK_CONTROL=y
Expand All @@ -83,6 +82,7 @@ CONFIG_INTEL_ADSP_IPC=y
CONFIG_INTEL_ADSP_TIMER=y
CONFIG_MEMORY_WIN_2_SIZE=12288
CONFIG_MM_DRV_INTEL_ADSP_TLB_REMAP_UNUSED_RAM=y
CONFIG_MM_DRV_INTEL_VIRTUAL_REGION_COUNT=2
CONFIG_SYS_CLOCK_TICKS_PER_SEC=12000

# Zephyr / power settings
Expand All @@ -95,6 +95,7 @@ CONFIG_PM_DEVICE_SYSTEM_MANAGED=y
CONFIG_PM_PREWAKEUP_CONV_MODE_CEIL=y
CONFIG_POWER_DOMAIN=y
CONFIG_POWER_DOMAIN_INTEL_ADSP=y
CONFIG_USERSPACE=y

# Zephyr / logging
CONFIG_LOG=y
Expand Down
2 changes: 1 addition & 1 deletion app/boards/intel_adsp_ace30_wcl.conf
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ CONFIG_LLEXT=y
CONFIG_LLEXT_STORAGE_WRITABLE=y
CONFIG_LLEXT_EXPERIMENTAL=y
CONFIG_MODULES=y
CONFIG_MM_DRV_INTEL_VIRTUAL_REGION_COUNT=2

# Zephyr / device drivers
CONFIG_CLOCK_CONTROL=y
Expand All @@ -68,6 +67,7 @@ CONFIG_DMA_INTEL_ADSP_GPDMA=n
CONFIG_INTEL_ADSP_IPC=y
CONFIG_INTEL_ADSP_TIMER=y
CONFIG_MM_DRV_INTEL_ADSP_TLB_REMAP_UNUSED_RAM=y
CONFIG_MM_DRV_INTEL_VIRTUAL_REGION_COUNT=2
CONFIG_SYS_CLOCK_TICKS_PER_SEC=12000

# Zephyr / power settings
Expand Down
5 changes: 5 additions & 0 deletions app/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,8 @@ CONFIG_SCHED_CPU_MASK=y
CONFIG_SYS_CLOCK_TICKS_PER_SEC=15000
CONFIG_DAI=y
CONFIG_HEAP_MEM_POOL_SIZE=2048

# Support dynamic thread stack allocation
CONFIG_DYNAMIC_THREAD=y
CONFIG_DYNAMIC_THREAD_ALLOC=y
CONFIG_DYNAMIC_THREAD_PREFER_ALLOC=y
14 changes: 3 additions & 11 deletions src/audio/aria/aria.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
#include <sof/audio/pipeline.h>
#include <rtos/panic.h>
#include <sof/ipc/msg.h>
#include <rtos/alloc.h>
#include <rtos/cache.h>
#include <rtos/init.h>
#include <sof/lib/notifier.h>
Expand Down Expand Up @@ -126,7 +125,7 @@ static int aria_init(struct processing_module *mod)
list_init(&dev->bsource_list);
list_init(&dev->bsink_list);

cd = rzalloc(SOF_MEM_FLAG_USER, sizeof(*cd));
cd = mod_zalloc(mod, sizeof(*cd));
if (!cd) {
return -ENOMEM;
}
Expand All @@ -145,10 +144,9 @@ static int aria_init(struct processing_module *mod)
}
mod_data->private = cd;

buf = rballoc(SOF_MEM_FLAG_USER, req_mem);
buf = mod_alloc(mod, req_mem);

if (!buf) {
rfree(cd);
comp_err(dev, "allocation failed for size %d", req_mem);
return -ENOMEM;
}
Expand All @@ -158,10 +156,6 @@ static int aria_init(struct processing_module *mod)

static int aria_free(struct processing_module *mod)
{
struct aria_data *cd = module_get_private_data(mod);

rfree(cd->data_addr);
rfree(cd);
return 0;
}

Expand Down Expand Up @@ -320,10 +314,8 @@ static const struct module_interface aria_interface = {
#include <module/module/llext.h>
#include <rimage/sof/user/manifest.h>

SOF_LLEXT_MOD_ENTRY(aria, &aria_interface);

static const struct sof_man_module_manifest mod_manifest __section(".module") __used =
SOF_LLEXT_MODULE_MANIFEST("ARIA", aria_llext_entry, 1, SOF_REG_UUID(aria), 8);
SOF_LLEXT_MODULE_MANIFEST("ARIA", &aria_interface, 1, SOF_REG_UUID(aria), 8);

SOF_LLEXT_BUILDINFO;

Expand Down
51 changes: 20 additions & 31 deletions src/audio/asrc/asrc.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#include <sof/audio/ipc-config.h>
#include <rtos/panic.h>
#include <sof/ipc/msg.h>
#include <rtos/alloc.h>
#include <rtos/init.h>
#include <sof/lib/uuid.h>
#include <sof/math/numbers.h>
Expand Down Expand Up @@ -217,7 +216,7 @@ static int asrc_init(struct processing_module *mod)
return -EINVAL;
}

cd = rzalloc(SOF_MEM_FLAG_USER, sizeof(*cd));
cd = mod_alloc(mod, sizeof(*cd));
if (!cd)
return -ENOMEM;

Expand All @@ -242,7 +241,7 @@ static int asrc_init(struct processing_module *mod)
return 0;
}

static int asrc_initialize_buffers(struct asrc_farrow *src_obj)
static int asrc_initialize_buffers(struct processing_module *mod, struct asrc_farrow *src_obj)
{
int32_t *buf_32;
int16_t *buf_16;
Expand All @@ -261,7 +260,7 @@ static int asrc_initialize_buffers(struct asrc_farrow *src_obj)
buffer_size = src_obj->buffer_length * sizeof(int32_t);

for (ch = 0; ch < src_obj->num_channels; ch++) {
buf_32 = rzalloc(SOF_MEM_FLAG_USER, buffer_size);
buf_32 = mod_zalloc(mod, buffer_size);

if (!buf_32)
return -ENOMEM;
Expand All @@ -272,7 +271,7 @@ static int asrc_initialize_buffers(struct asrc_farrow *src_obj)
buffer_size = src_obj->buffer_length * sizeof(int16_t);

for (ch = 0; ch < src_obj->num_channels; ch++) {
buf_16 = rzalloc(SOF_MEM_FLAG_USER, buffer_size);
buf_16 = mod_zalloc(mod, buffer_size);

if (!buf_16)
return -ENOMEM;
Expand All @@ -284,7 +283,7 @@ static int asrc_initialize_buffers(struct asrc_farrow *src_obj)
return 0;
}

static void asrc_release_buffers(struct asrc_farrow *src_obj)
static void asrc_release_buffers(struct processing_module *mod, struct asrc_farrow *src_obj)
{
int32_t *buf_32;
int16_t *buf_16;
Expand All @@ -299,7 +298,7 @@ static void asrc_release_buffers(struct asrc_farrow *src_obj)

if (buf_32) {
src_obj->ring_buffers32[ch] = NULL;
rfree(buf_32);
mod_free(mod, buf_32);
}
}
else
Expand All @@ -308,23 +307,17 @@ static void asrc_release_buffers(struct asrc_farrow *src_obj)

if (buf_16) {
src_obj->ring_buffers16[ch] = NULL;
rfree(buf_16);
mod_free(mod, buf_16);
}
}
}

static int asrc_free(struct processing_module *mod)
{
struct comp_data *cd = module_get_private_data(mod);
struct comp_dev *dev = mod->dev;

comp_dbg(dev, "asrc_free()");

rfree(cd->buf);
asrc_release_buffers(cd->asrc_obj);
asrc_free_polyphase_filter(cd->asrc_obj);
rfree(cd->asrc_obj);
rfree(cd);
return 0;
}

Expand Down Expand Up @@ -614,8 +607,7 @@ static int asrc_prepare(struct processing_module *mod,
cd->buf_size = (cd->source_frames_max + cd->sink_frames_max) *
frame_bytes;

cd->buf = rzalloc(SOF_MEM_FLAG_USER,
cd->buf_size);
cd->buf = mod_zalloc(mod, cd->buf_size);
if (!cd->buf) {
cd->buf_size = 0;
comp_err(dev, "asrc_prepare(), allocation fail for size %d",
Expand All @@ -632,16 +624,15 @@ static int asrc_prepare(struct processing_module *mod,

/* Get required size and allocate memory for ASRC */
sample_bits = sample_bytes * 8;
ret = asrc_get_required_size(dev, &cd->asrc_size,
ret = asrc_get_required_size(mod, &cd->asrc_size,
audio_stream_get_channels(&sourceb->stream),
sample_bits);
if (ret) {
comp_err(dev, "asrc_prepare(), get_required_size_bytes failed");
goto err_free_buf;
}

cd->asrc_obj = rzalloc(SOF_MEM_FLAG_USER,
cd->asrc_size);
cd->asrc_obj = mod_zalloc(mod, cd->asrc_size);
if (!cd->asrc_obj) {
comp_err(dev, "asrc_prepare(), allocation fail for size %d",
cd->asrc_size);
Expand All @@ -659,7 +650,7 @@ static int asrc_prepare(struct processing_module *mod,
fs_sec = cd->source_rate;
}

ret = asrc_initialise(dev, cd->asrc_obj, audio_stream_get_channels(&sourceb->stream),
ret = asrc_initialise(mod, cd->asrc_obj, audio_stream_get_channels(&sourceb->stream),
fs_prim, fs_sec,
ASRC_IOF_INTERLEAVED, ASRC_IOF_INTERLEAVED,
ASRC_BM_LINEAR, cd->frames, sample_bits,
Expand All @@ -670,7 +661,7 @@ static int asrc_prepare(struct processing_module *mod,
}

/* Allocate ring buffers */
ret = asrc_initialize_buffers(cd->asrc_obj);
ret = asrc_initialize_buffers(mod, cd->asrc_obj);

/* check for errors */
if (ret) {
Expand Down Expand Up @@ -698,12 +689,12 @@ static int asrc_prepare(struct processing_module *mod,
return 0;

err_free_asrc:
asrc_release_buffers(cd->asrc_obj);
rfree(cd->asrc_obj);
asrc_release_buffers(mod, cd->asrc_obj);
mod_free(mod, cd->asrc_obj);
cd->asrc_obj = NULL;

err_free_buf:
rfree(cd->buf);
mod_free(mod, cd->buf);
cd->buf = NULL;

err:
Expand Down Expand Up @@ -865,10 +856,10 @@ static int asrc_reset(struct processing_module *mod)
asrc_dai_stop_timestamp(cd);

/* Free the allocations those were done in prepare() */
asrc_release_buffers(cd->asrc_obj);
asrc_free_polyphase_filter(cd->asrc_obj);
rfree(cd->asrc_obj);
rfree(cd->buf);
asrc_release_buffers(mod, cd->asrc_obj);
asrc_free_polyphase_filter(mod, cd->asrc_obj);
mod_free(mod, cd->asrc_obj);
mod_free(mod, cd->buf);
cd->asrc_obj = NULL;
cd->buf = NULL;

Expand All @@ -892,10 +883,8 @@ static const struct module_interface asrc_interface = {
#include <module/module/llext.h>
#include <rimage/sof/user/manifest.h>

SOF_LLEXT_MOD_ENTRY(asrc, &asrc_interface);

static const struct sof_man_module_manifest mod_manifest[] __section(".module") __used = {
SOF_LLEXT_MODULE_MANIFEST("ASRC", asrc_llext_entry, 1, SOF_REG_UUID(asrc4), 2),
SOF_LLEXT_MODULE_MANIFEST("ASRC", &asrc_interface, 1, SOF_REG_UUID(asrc4), 2),
};

SOF_LLEXT_BUILDINFO;
Expand Down
Loading