Skip to content

audio: make comp_drivers_get() accessible from user-space#10992

Open
kv2019i wants to merge 1 commit into
thesofproject:mainfrom
kv2019i:202607-comp-drivers-get-for-user
Open

audio: make comp_drivers_get() accessible from user-space#10992
kv2019i wants to merge 1 commit into
thesofproject:mainfrom
kv2019i:202607-comp-drivers-get-for-user

Conversation

@kv2019i

@kv2019i kv2019i commented Jul 13, 2026

Copy link
Copy Markdown
Collaborator

Make comp_drivers_get() usable from user-space when SOF is built with CONFIG_SOF_USERSPACE_LL.

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>
Copilot AI review requested due to automatic review settings July 13, 2026 16:58
@kv2019i kv2019i requested review from lyakh, tmleman and wjablon1 July 13, 2026 16:58
@kv2019i

kv2019i commented Jul 13, 2026

Copy link
Copy Markdown
Collaborator Author

For context, related to #10558

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 when CONFIG_SOF_USERSPACE_LL is 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 thread src/audio/component.c
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
Comment thread src/audio/component.c
{
return &cd;
}
EXPORT_SYMBOL(comp_drivers_get);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I don't see it being called from any LLEXT-loaded code, should we skip exporting it until actually needed?

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.

3 participants