audio: make comp_drivers_get() accessible from user-space#10992
Open
kv2019i wants to merge 1 commit into
Open
Conversation
Make comp_drivers_get() usable from user-space when SOF is built with CONFIG_SOF_USERSPACE_LL. Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Collaborator
Author
|
For context, related to #10558 |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR makes the comp_drivers_get() accessor usable from user-space when SOF is built with CONFIG_SOF_USERSPACE_LL, by turning it into an exported symbol and avoiding the sof_get() dependency from user mode.
Changes:
- Add a non-inline
comp_drivers_get()declaration in the public header whenCONFIG_SOF_USERSPACE_LLis enabled. - Provide an exported implementation of
comp_drivers_get()returning the shared driver-list storage (cd) for user-space builds.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/include/sof/audio/component_ext.h | Switch comp_drivers_get() from inline-only to a user-space compatible declaration when enabled. |
| src/audio/component.c | Add/export the comp_drivers_get() implementation for CONFIG_SOF_USERSPACE_LL. |
Comment on lines
+427
to
+434
| #ifdef CONFIG_SOF_USERSPACE_LL | ||
| struct comp_driver_list *comp_drivers_get(void); | ||
| #else | ||
| static inline struct comp_driver_list *comp_drivers_get(void) | ||
| { | ||
| return sof_get()->comp_drivers; | ||
| } | ||
| #endif |
Comment on lines
+41
to
+47
| #ifdef CONFIG_SOF_USERSPACE_LL | ||
| struct comp_driver_list *comp_drivers_get(void) | ||
| { | ||
| return &cd; | ||
| } | ||
| EXPORT_SYMBOL(comp_drivers_get); | ||
| #endif |
lyakh
reviewed
Jul 14, 2026
| { | ||
| return &cd; | ||
| } | ||
| EXPORT_SYMBOL(comp_drivers_get); |
Collaborator
There was a problem hiding this comment.
I don't see it being called from any LLEXT-loaded code, should we skip exporting it until actually needed?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Make comp_drivers_get() usable from user-space when SOF is built with CONFIG_SOF_USERSPACE_LL.