src: convert to Zephyr native initialisation

Use SOF_MODULE_INIT() to register src with the Zephyr
initialisation framework.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
This commit is contained in:
Guennadi Liakhovetski 2023-01-24 14:59:33 +01:00 committed by Kai Vehmanen
parent efa132a9c8
commit ad3e2e4ab1
2 changed files with 3 additions and 11 deletions

View File

@ -18,6 +18,7 @@
#include <sof/debug/panic.h>
#include <sof/ipc/msg.h>
#include <rtos/alloc.h>
#include <rtos/init.h>
#include <sof/lib/memory.h>
#include <sof/lib/uuid.h>
#include <sof/list.h>
@ -1044,6 +1045,7 @@ static struct module_interface src_interface = {
};
DECLARE_MODULE_ADAPTER(src_interface, src_uuid, src_tr);
SOF_MODULE_INIT(src, sys_comp_module_src_interface_init);
#elif CONFIG_IPC_MAJOR_3
static struct comp_dev *src_new(const struct comp_driver *drv,
@ -1255,6 +1257,7 @@ UT_STATIC void sys_comp_src_init(void)
}
DECLARE_MODULE(sys_comp_src_init);
SOF_MODULE_INIT(src, sys_comp_src_init);
#else
#error "No or invalid IPC MAJOR version selected."
#endif

View File

@ -183,14 +183,11 @@ static void sys_module_init(void)
*/
void sys_comp_host_init(void);
void sys_comp_src_init(void);
void sys_comp_mux_init(void);
void sys_comp_chain_dma_init(void);
#if CONFIG_IPC_MAJOR_3
void sys_comp_src_init(void);
void sys_comp_selector_init(void);
#else
void sys_comp_module_src_interface_init(void);
void sys_comp_module_selector_interface_init(void);
#endif
void sys_comp_switch_init(void);
@ -262,14 +259,6 @@ int task_main_start(struct sof *sof)
int start_complete(void)
{
if (IS_ENABLED(CONFIG_COMP_SRC)) {
#if CONFIG_IPC_MAJOR_3
sys_comp_src_init();
#else
sys_comp_module_src_interface_init();
#endif
}
if (IS_ENABLED(CONFIG_COMP_SEL))
#if CONFIG_IPC_MAJOR_3
sys_comp_selector_init();