Uh oh!
There was an error while loading. Please reload this page.
audio: host-zephyr: make component usable from user-space - #10799
Conversation
kv2019i
commented
May 21, 2026
For context, part of #10558 |
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
This PR updates the Zephyr host audio component to consistently pass an allocation context/heap into memory allocation APIs, enabling the component to run correctly in both kernel and user-space.
Changes:
- Add
alloc_ctxtostruct host_datato carry allocation context information. - Use
hd->alloc_ctx.heapwhen allocating/freeing DMA scatter-gather elements and DMA-related configs. - Initialize
hd->alloc_ctx.heapfor user-space low-latency builds viazephyr_ll_user_heap().
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/audio/host-zephyr.c | Routes allocations/frees through hd->alloc_ctx.heap and sets user-space heap under CONFIG_SOF_USERSPACE_LL. |
| src/audio/copier/host_copier.h | Adds struct mod_alloc_ctx alloc_ctx to struct host_data. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Ensure an allocation context object is passed correctly whenever memory is allocated in the component. This allows to run the component both in kernel and user space. Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
d20c1b8 to
ade5256Comparekv2019i
commented
May 21, 2026
V2 pushed:
|
| dev->ipc_config = *config; | ||
| hd = rzalloc(SOF_MEM_FLAG_USER, sizeof(*hd)); | ||
| hd = sof_heap_alloc(heap, SOF_MEM_FLAG_USER, sizeof(*hd), 0); |
There was a problem hiding this comment.
I'd use NULL here directly just like you do in host_free()
kv2019i
commented
May 25, 2026
Anymore reviews anyone, I'll proceed with merge end-of-day if no new comments. |
Uh oh!
There was an error while loading. Please reload this page.
Ensure an allocation context object is passed correctly whenever memory is allocated in the component. This allows to run the component both in kernel and user space.