Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
dd3aa38
scripts: create symlink for community base FW binary
lrgirdwo Oct 8, 2025
4ac9396
alloc: add a simple virtual page allocator
lrgirdwo Oct 8, 2025
122270f
alloc: add pre-allocated continuous virtual regions
lrgirdwo Oct 8, 2025
7821809
alloc: add support to build pacovr or vmh
lrgirdwo Oct 8, 2025
875620a
WIP: pipeline: pacovr: Add support for pacovr allocations per pipeline
lrgirdwo Oct 8, 2025
2146f88
WIP: module: pacovr: Add support for pacovr allocations per module
lrgirdwo Oct 8, 2025
7b3286b
Audio: Aria: All memory allocations through module API
Aug 7, 2025
b5822b0
Audio: ASRC: Memory, blob, and fast_get allocs to module API
Aug 7, 2025
9aa385d
Audio: Copier: All memory allocations through module API
Aug 7, 2025
43b1f83
audio: copier: Fix resource leak from DMA sync code error handling
Sep 5, 2025
8851c36
Audio: crossover: All memory allocations through module API
Aug 11, 2025
680c025
Audio: multiband_drc: Memory, blob, and fast_get allocs to module API
Aug 13, 2025
1e9f4d4
Audio: DRC: Memory, blob, and fast_get allocs to module API
Aug 13, 2025
67a7749
Audio: FIR: Memory, blob, and fast_get allocs to module API
Aug 19, 2025
07ee21b
Audio: IIR: Memory, blob, and fast_get allocs to module API
Aug 19, 2025
e0b85f6
Audio: Google ctc: Memory, blob, and fast_get allocs to module API
Aug 19, 2025
042b5a8
Audio: Google rtc: Memory, blob, and fast_get allocs to module API
Aug 19, 2025
d378698
Audio: igo_nr: Memory, blob, and fast_get allocs to module API
Aug 19, 2025
148ed35
Math: Make mod_alloc() versions of all heap using functions
Aug 21, 2025
1b07960
Audio: mfcc: Memory, blob, and fast_get allocs to module API
Aug 21, 2025
8ed8f80
cmocka: Add mocks for mod_balloc_align() and mod_alloc_align()
Aug 22, 2025
76a08e2
cmocka: math: Test using module memory API math function
Aug 23, 2025
0605018
Math: Remove directly heap using math functions
Aug 24, 2025
203d33e
audio: mixer: Memory, blob, and fast_get allocs to module API
Aug 24, 2025
e2a7f39
Audio: mixin_mixout: Memory, blob, and fast_get allocs to module API
Aug 24, 2025
cf10334
Audio: Mux: Memory, blob, and fast_get allocs to module API
Aug 24, 2025
b31f450
Audio: NXP: Memory, blob, and fast_get allocs to module API
Aug 25, 2025
8c3cb8b
Audio: RTNR: Memory, blob, and fast_get allocs to module API
Aug 25, 2025
948abc3
Audio: Selector: Memory, blob, and fast_get allocs to module API
Aug 25, 2025
74c8aef
Audio: TDFB: Memory, blob, and fast_get allocs to module API
Aug 25, 2025
99bc09a
Audio: Template_comp: Memory, blob, and fast_get allocs to module API
Aug 25, 2025
a67449f
modules: tensorflow: Memory, blob, and fast_get allocs to module API
Aug 25, 2025
58edf47
Audio: up_down_mixer: Memory, blob, and fast_get allocs to module API
Aug 25, 2025
c1a139e
audio: volume: Memory, blob, and fast_get allocs to module API
Aug 25, 2025
9e7da64
Math: auditory: Add mod_psy_free_mel_filterbank()
Aug 26, 2025
d8ac86f
cmocka: math: auditiory: Fix memory leaks
Aug 26, 2025
bbbc38e
cmocka: math: fft: Fix memory leaks
Aug 26, 2025
90c29af
cmocka: math: matrix: Fix memory leaks
Aug 26, 2025
d499403
Math: DCT: Add mod_dct_free_16()
Aug 26, 2025
7f90a49
cmocka: math: dct: Fix memory leaks
Aug 26, 2025
137de51
cmocka: module_adapter_test: Fix memory freeing error
Aug 26, 2025
4e34f3b
cmocka: volume: Fix memory leaks
Aug 26, 2025
2ab641c
cmocka: mux_copy: Fix memory leaks
Aug 26, 2025
6be199d
cmocka: demux_copy: Fix memory leaks
Aug 26, 2025
a040c24
cmocka: pipeline: Fix memory leaks
Aug 26, 2025
5f4b113
vregions: refactor and rename API. To be squashed.
lrgirdwo Oct 15, 2025
d81de38
vregions: dp schedule update
lrgirdwo Oct 15, 2025
6eedcc8
zephyr/lib/vpages.c: Compile fix, remove idle assert on non existing …
Oct 8, 2025
e7ca28c
audio: module_adapter: Set the pipeline pointer during module init
ranj063 Oct 8, 2025
2447465
src/audio/src/src_ipc4.c: comp_dgb > info
Oct 10, 2025
655374d
module_adapter: generic: Introduce mod_generic_init
dbaluta Oct 16, 2025
3c9c05f
module_adapter: generic: Fix use after free
dbaluta Oct 12, 2025
9bb77f5
Revert "audio: module_adapter: Set the pipeline pointer during module…
Oct 22, 2025
79f5155
module_adapter: generic: Call mod_free_all() if module_init() fails
Oct 21, 2025
afbcb12
module_adapter: generic: Clean up and optimize mod_free_all()
Oct 20, 2025
eded27a
common.h: Make IS_ALIGNED() safe for testing with alignment == 0
Oct 22, 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
10 changes: 10 additions & 0 deletions scripts/xtensa-build-zephyr.py
Original file line number Diff line number Diff line change
Expand Up @@ -1150,6 +1150,16 @@ def install_platform(platform, sof_output_dir, platf_build_environ, platform_wco

os.makedirs(alias_key_dir, exist_ok=True)
symlink_or_copy(install_key_dir, output_fwname, alias_key_dir, alias_fwname)

# Also create the "plain" sof-<platform>.ri symlink in the
# sof/<vendor>/sof-ipc4/<platform> directory, so that when
# copying the entire sof/<vendor>/sof-ipc4 directory to
# the target, all platforms are there.
alias_vendor_dir = pathlib.Path(sof_output_dir, p_alias).parent
alias_ipc4_dir = pathlib.Path(alias_vendor_dir, p_alias)
alias_install_key_dir = alias_ipc4_dir / "community"
os.makedirs(alias_ipc4_dir, exist_ok=True)
symlink_or_copy(alias_install_key_dir, alias_fwname, alias_ipc4_dir, alias_fwname)
else:
# non deployable builds and IPC3 deployable builds are using the same symlink scheme
# The production key is usually different
Expand Down
10 changes: 2 additions & 8 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_balloc(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
47 changes: 19 additions & 28 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_zalloc(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 Down
Loading