diff --git a/src/arch/host/CMakeLists.txt b/src/arch/host/CMakeLists.txt index dded769f3..733cf6145 100644 --- a/src/arch/host/CMakeLists.txt +++ b/src/arch/host/CMakeLists.txt @@ -13,6 +13,7 @@ set(CONFIG_COMP_VOLUME 1) set(CONFIG_COMP_SRC 1) set(CONFIG_COMP_FIR 1) set(CONFIG_COMP_IIR 1) +set(CONFIG_COMP_TONE 1) configure_file ( "${PROJECT_SOURCE_DIR}/src/arch/host/config.h.in" diff --git a/src/arch/host/config.h.in b/src/arch/host/config.h.in index dac7b16fa..5d14bf491 100644 --- a/src/arch/host/config.h.in +++ b/src/arch/host/config.h.in @@ -4,3 +4,4 @@ #define CONFIG_COMP_SRC @CONFIG_COMP_SRC@ #define CONFIG_COMP_FIR @CONFIG_COMP_FIR@ #define CONFIG_COMP_IIR @CONFIG_COMP_IIR@ +#define CONFIG_COMP_TONE @CONFIG_COMP_TONE@ diff --git a/src/audio/CMakeLists.txt b/src/audio/CMakeLists.txt index 67b7abdce..aa6399623 100644 --- a/src/audio/CMakeLists.txt +++ b/src/audio/CMakeLists.txt @@ -1,6 +1,5 @@ if(NOT BUILD_HOST) add_local_sources(sof - tone.c mixer.c mux.c switch.c @@ -40,6 +39,11 @@ if(NOT BUILD_HOST) iir.c ) endif() + if(CONFIG_COMP_TONE) + add_local_sources(sof + tone.c + ) + endif() return() endif() diff --git a/src/audio/Kconfig b/src/audio/Kconfig index 50ca77304..bd94bbf1a 100644 --- a/src/audio/Kconfig +++ b/src/audio/Kconfig @@ -24,4 +24,10 @@ config COMP_IIR help Select for IIR component +config COMP_TONE + bool "Tone component" + default y + help + Select for Tone component + endmenu diff --git a/src/include/sof/audio/component.h b/src/include/sof/audio/component.h index 8b77b53bf..6c04db392 100644 --- a/src/include/sof/audio/component.h +++ b/src/include/sof/audio/component.h @@ -510,7 +510,11 @@ void sys_comp_src_init(void); #else static inline void sys_comp_src_init(void) {} #endif +#ifdef CONFIG_COMP_TONE void sys_comp_tone_init(void); +#else +static inline void sys_comp_tone_init(void) {} +#endif #ifdef CONFIG_COMP_IIR void sys_comp_eq_iir_init(void); #else