mirror of https://github.com/thesofproject/sof.git
selector: convert to Zephyr native initialisation
Use SOF_MODULE_INIT() to register selector with the Zephyr initialisation framework. Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
This commit is contained in:
parent
dba274da89
commit
674aed94c2
|
@ -21,6 +21,7 @@
|
||||||
#include <sof/debug/panic.h>
|
#include <sof/debug/panic.h>
|
||||||
#include <sof/ipc/msg.h>
|
#include <sof/ipc/msg.h>
|
||||||
#include <rtos/alloc.h>
|
#include <rtos/alloc.h>
|
||||||
|
#include <rtos/init.h>
|
||||||
#include <sof/lib/memory.h>
|
#include <sof/lib/memory.h>
|
||||||
#include <sof/lib/uuid.h>
|
#include <sof/lib/uuid.h>
|
||||||
#include <sof/list.h>
|
#include <sof/list.h>
|
||||||
|
@ -571,6 +572,7 @@ UT_STATIC void sys_comp_selector_init(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
DECLARE_MODULE(sys_comp_selector_init);
|
DECLARE_MODULE(sys_comp_selector_init);
|
||||||
|
SOF_MODULE_INIT(selector, sys_comp_selector_init);
|
||||||
#else
|
#else
|
||||||
static void build_config(struct comp_data *cd, struct module_config *cfg)
|
static void build_config(struct comp_data *cd, struct module_config *cfg)
|
||||||
{
|
{
|
||||||
|
@ -957,4 +959,5 @@ static struct module_interface selector_interface = {
|
||||||
};
|
};
|
||||||
|
|
||||||
DECLARE_MODULE_ADAPTER(selector_interface, selector_uuid, selector_tr);
|
DECLARE_MODULE_ADAPTER(selector_interface, selector_uuid, selector_tr);
|
||||||
|
SOF_MODULE_INIT(selector, sys_comp_module_selector_interface_init);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -184,11 +184,6 @@ static void sys_module_init(void)
|
||||||
|
|
||||||
void sys_comp_host_init(void);
|
void sys_comp_host_init(void);
|
||||||
void sys_comp_mux_init(void);
|
void sys_comp_mux_init(void);
|
||||||
#if CONFIG_IPC_MAJOR_3
|
|
||||||
void sys_comp_selector_init(void);
|
|
||||||
#else
|
|
||||||
void sys_comp_module_selector_interface_init(void);
|
|
||||||
#endif
|
|
||||||
void sys_comp_switch_init(void);
|
void sys_comp_switch_init(void);
|
||||||
void sys_comp_tone_init(void);
|
void sys_comp_tone_init(void);
|
||||||
void sys_comp_module_eq_fir_interface_init(void);
|
void sys_comp_module_eq_fir_interface_init(void);
|
||||||
|
@ -258,12 +253,6 @@ int task_main_start(struct sof *sof)
|
||||||
|
|
||||||
int start_complete(void)
|
int start_complete(void)
|
||||||
{
|
{
|
||||||
if (IS_ENABLED(CONFIG_COMP_SEL))
|
|
||||||
#if CONFIG_IPC_MAJOR_3
|
|
||||||
sys_comp_selector_init();
|
|
||||||
#else
|
|
||||||
sys_comp_module_selector_interface_init();
|
|
||||||
#endif
|
|
||||||
if (IS_ENABLED(CONFIG_COMP_SWITCH))
|
if (IS_ENABLED(CONFIG_COMP_SWITCH))
|
||||||
sys_comp_switch_init();
|
sys_comp_switch_init();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue