Skip to content

audio: host-zephyr: make component usable from user-space#10799

Open
kv2019i wants to merge 1 commit into
thesofproject:mainfrom
kv2019i:202605-host-zephyr-user
Open

audio: host-zephyr: make component usable from user-space#10799
kv2019i wants to merge 1 commit into
thesofproject:mainfrom
kv2019i:202605-host-zephyr-user

Conversation

@kv2019i
Copy link
Copy Markdown
Collaborator

@kv2019i kv2019i commented May 21, 2026

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.

Copilot AI review requested due to automatic review settings May 21, 2026 10:02
@kv2019i
Copy link
Copy Markdown
Collaborator Author

kv2019i commented May 21, 2026

For context, part of #10558

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_ctx to struct host_data to carry allocation context information.
  • Use hd->alloc_ctx.heap when allocating/freeing DMA scatter-gather elements and DMA-related configs.
  • Initialize hd->alloc_ctx.heap for user-space low-latency builds via zephyr_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.

Comment thread src/audio/host-zephyr.c Outdated
Comment thread src/audio/host-zephyr.c Outdated
Comment thread src/audio/host-zephyr.c
@kv2019i kv2019i requested review from jsarha and lyakh May 21, 2026 13:37
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>
@kv2019i kv2019i force-pushed the 202605-host-zephyr-user branch from d20c1b8 to ade5256 Compare May 21, 2026 14:23
@kv2019i
Copy link
Copy Markdown
Collaborator Author

kv2019i commented May 21, 2026

V2 pushed:

  • address copilot comments, not functional changes to code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants