From ca26b3574ffc282df2eb15117c6292e56317e714 Mon Sep 17 00:00:00 2001 From: Kai Vehmanen Date: Wed, 15 Apr 2026 13:52:05 +0300 Subject: [PATCH] audio: make comp_drivers_get() accessible from user-space Make comp_drivers_get() usable from user-space when SOF is built with CONFIG_SOF_USERSPACE_LL. Signed-off-by: Kai Vehmanen --- src/audio/component.c | 8 ++++++++ src/include/sof/audio/component_ext.h | 4 ++++ 2 files changed, 12 insertions(+) diff --git a/src/audio/component.c b/src/audio/component.c index 8a6d35776971..62cbdac689f7 100644 --- a/src/audio/component.c +++ b/src/audio/component.c @@ -38,6 +38,14 @@ LOG_MODULE_REGISTER(component, CONFIG_SOF_LOG_LEVEL); static APP_SYSUSER_BSS SHARED_DATA struct comp_driver_list cd; +#ifdef CONFIG_SOF_USERSPACE_LL +struct comp_driver_list *comp_drivers_get(void) +{ + return &cd; +} +EXPORT_SYMBOL(comp_drivers_get); +#endif + SOF_DEFINE_REG_UUID(component); DECLARE_TR_CTX(comp_tr, SOF_UUID(component_uuid), LOG_LEVEL_INFO); diff --git a/src/include/sof/audio/component_ext.h b/src/include/sof/audio/component_ext.h index 70324175fea8..8532664488df 100644 --- a/src/include/sof/audio/component_ext.h +++ b/src/include/sof/audio/component_ext.h @@ -424,10 +424,14 @@ static inline void comp_make_shared(struct comp_dev *dev) dev->is_shared = true; } +#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 #if CONFIG_IPC_MAJOR_4 static inline int comp_ipc4_bind_remote(struct comp_dev *dev, struct bind_info *bind_data)