Skip to content

Commit ca26b35

Browse files
committed
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 <kai.vehmanen@linux.intel.com>
1 parent cf8d4a0 commit ca26b35

2 files changed

Lines changed: 12 additions & 0 deletions

File tree

‎src/audio/component.c‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,14 @@ LOG_MODULE_REGISTER(component, CONFIG_SOF_LOG_LEVEL);
3838

3939
static APP_SYSUSER_BSS SHARED_DATA struct comp_driver_list cd;
4040

41+
#ifdef CONFIG_SOF_USERSPACE_LL
42+
struct comp_driver_list *comp_drivers_get(void)
43+
{
44+
return &cd;
45+
}
46+
EXPORT_SYMBOL(comp_drivers_get);
47+
#endif
48+
4149
SOF_DEFINE_REG_UUID(component);
4250

4351
DECLARE_TR_CTX(comp_tr, SOF_UUID(component_uuid), LOG_LEVEL_INFO);

‎src/include/sof/audio/component_ext.h‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -424,10 +424,14 @@ static inline void comp_make_shared(struct comp_dev *dev)
424424
dev->is_shared = true;
425425
}
426426

427+
#ifdef CONFIG_SOF_USERSPACE_LL
428+
struct comp_driver_list *comp_drivers_get(void);
429+
#else
427430
static inline struct comp_driver_list *comp_drivers_get(void)
428431
{
429432
return sof_get()->comp_drivers;
430433
}
434+
#endif
431435

432436
#if CONFIG_IPC_MAJOR_4
433437
static inline int comp_ipc4_bind_remote(struct comp_dev *dev, struct bind_info *bind_data)

0 commit comments

Comments
 (0)