Kconfig: make Switch component a config option

Signed-off-by: Adrian Bonislawski <adrian.bonislawski@linux.intel.com>
This commit is contained in:
Adrian Bonislawski 2019-02-11 15:05:44 +01:00 committed by Marcin Maka
parent cb423b19ae
commit eb7310859e
5 changed files with 17 additions and 1 deletions

View File

@ -16,6 +16,7 @@ set(CONFIG_COMP_IIR 1)
set(CONFIG_COMP_TONE 1) set(CONFIG_COMP_TONE 1)
set(CONFIG_COMP_MIXER 1) set(CONFIG_COMP_MIXER 1)
set(CONFIG_COMP_MUX 1) set(CONFIG_COMP_MUX 1)
set(CONFIG_COMP_SWITCH 1)
configure_file ( configure_file (
"${PROJECT_SOURCE_DIR}/src/arch/host/config.h.in" "${PROJECT_SOURCE_DIR}/src/arch/host/config.h.in"

View File

@ -7,3 +7,4 @@
#define CONFIG_COMP_TONE @CONFIG_COMP_TONE@ #define CONFIG_COMP_TONE @CONFIG_COMP_TONE@
#define CONFIG_COMP_MIXER @CONFIG_COMP_MIXER@ #define CONFIG_COMP_MIXER @CONFIG_COMP_MIXER@
#define CONFIG_COMP_MUX @CONFIG_COMP_MUX@ #define CONFIG_COMP_MUX @CONFIG_COMP_MUX@
#define CONFIG_COMP_SWITCH @CONFIG_COMP_SWITCH@

View File

@ -1,6 +1,5 @@
if(NOT BUILD_HOST) if(NOT BUILD_HOST)
add_local_sources(sof add_local_sources(sof
switch.c
dai.c dai.c
host.c host.c
pipeline.c pipeline.c
@ -52,6 +51,11 @@ if(NOT BUILD_HOST)
mux.c mux.c
) )
endif() endif()
if(CONFIG_COMP_SWITCH)
add_local_sources(sof
switch.c
)
endif()
return() return()
endif() endif()

View File

@ -42,4 +42,10 @@ config COMP_MUX
help help
Select for MUX component Select for MUX component
config COMP_SWITCH
bool "Switch component"
default y
help
Select for Switch component
endmenu endmenu

View File

@ -507,7 +507,11 @@ void sys_comp_mux_init(void);
#else #else
static inline void sys_comp_mux_init(void) {} static inline void sys_comp_mux_init(void) {}
#endif #endif
#ifdef CONFIG_COMP_SWITCH
void sys_comp_switch_init(void); void sys_comp_switch_init(void);
#else
static inline void sys_comp_switch_init(void) {}
#endif
#ifdef CONFIG_COMP_VOLUME #ifdef CONFIG_COMP_VOLUME
void sys_comp_volume_init(void); void sys_comp_volume_init(void);
#else #else