From 47e61c6c84738a142c786348714a25632573b4c3 Mon Sep 17 00:00:00 2001 From: Andy Ross Date: Thu, 7 Mar 2024 08:28:29 -0800 Subject: [PATCH] google_aec: Clean up kconfig handling Put the AEC tunables inside an if COMP_GOOGLE_RTC_AUDIO_PROCESSING for hygine. This prevents them from appearing in .config files of SOF builds where AEC was never enabled at all. Set MOCK via a default instead of select. Select is unoverridable, it forces the MOCK to be used whenever COMP_STUBS=y, but it's more flexible to allow the app to pick and choose which components get stubbed (STUBS is often set at the platform layer). Signed-off-by: Andy Ross --- src/audio/google/Kconfig | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/audio/google/Kconfig b/src/audio/google/Kconfig index 46a9ce7d7d0f..f5bdfe033a1b 100644 --- a/src/audio/google/Kconfig +++ b/src/audio/google/Kconfig @@ -15,7 +15,6 @@ config COMP_GOOGLE_HOTWORD_DETECT config COMP_GOOGLE_RTC_AUDIO_PROCESSING bool "Google Real Time Communication Audio processing" select COMP_BLOB - select GOOGLE_RTC_AUDIO_PROCESSING_MOCK if COMP_STUBS default n help Select for Google real-time communication audio processing. It @@ -24,6 +23,8 @@ config COMP_GOOGLE_RTC_AUDIO_PROCESSING This component takes raw microphones input and playback reference and outputs an echo-free microphone signal. +if COMP_GOOGLE_RTC_AUDIO_PROCESSING + config COMP_GOOGLE_RTC_AUDIO_PROCESSING_SAMPLE_RATE_HZ depends on COMP_GOOGLE_RTC_AUDIO_PROCESSING int "Sample rate for Google Real Time Communication Audio processing" @@ -79,10 +80,12 @@ config COMP_GOOGLE_RTC_AUDIO_PROCESSING_MIC_HEADROOM_LINEAR config GOOGLE_RTC_AUDIO_PROCESSING_MOCK bool "Google Real Time Communication Audio processing mock" - default n + default y if COMP_STUBS depends on COMP_GOOGLE_RTC_AUDIO_PROCESSING help Mock Google real-time communication audio processing. It allows for compilation check and basic audio flow checking. +endif # COMP_GOOGLE_RTC_AUDIO_PROCESSING + endmenu