From fa6b2c6c33249e429f1783f8beec35b2ae8a52cf Mon Sep 17 00:00:00 2001 From: Adrian Bonislawski Date: Mon, 11 Feb 2019 13:01:16 +0100 Subject: [PATCH] Kconfig: make Tone component a config option Signed-off-by: Adrian Bonislawski --- src/arch/host/CMakeLists.txt | 1 + src/arch/host/config.h.in | 1 + src/audio/CMakeLists.txt | 6 +++++- src/audio/Kconfig | 6 ++++++ src/include/sof/audio/component.h | 4 ++++ 5 files changed, 17 insertions(+), 1 deletion(-) 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