From 10a5e92e424235d8c440ee907a025ade5b3612a2 Mon Sep 17 00:00:00 2001 From: Andy Ross Date: Tue, 12 Dec 2023 10:31:47 -0800 Subject: [PATCH] google_audio_processing: Clean up MOCK kconfig The mock facility for AEC got folded into CONFIG_STUBS which is a more general tunable. But it was done with a kconfig "select" and not a default, which meant that it was no longer possible to disable the mock when AEC was enabled without changing COMP_STUBS globally, which hurts debugging. Put the handling in a default on the variable instead, now it can be overridden by later stages of kconfig (like the board conf file or the command line of xtensa-build-zephyr.py). Also enable MOCK explicitly in two spots (library build_all_ipc3) where AEC was being built out of the SOF upstream code alone and was relying on MOCK=y being automatically selected. That doesn't build anymore, the default is to build the real feature. Signed-off-by: Andy Ross --- app/stub_build_all_ipc3.conf | 1 + src/arch/host/configs/library_defconfig | 1 + src/audio/google/Kconfig | 3 +-- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/stub_build_all_ipc3.conf b/app/stub_build_all_ipc3.conf index 77c47241cde5..951cbb0a6c51 100644 --- a/app/stub_build_all_ipc3.conf +++ b/app/stub_build_all_ipc3.conf @@ -1,5 +1,6 @@ CONFIG_COMP_STUBS=y CONFIG_COMP_GOOGLE_RTC_AUDIO_PROCESSING=y +CONFIG_GOOGLE_RTC_AUDIO_PROCESSING_MOCK=y CONFIG_COMP_TONE=n CONFIG_COMP_CROSSOVER=y CONFIG_COMP_DRC=y diff --git a/src/arch/host/configs/library_defconfig b/src/arch/host/configs/library_defconfig index 071e30808f3c..b6839e25f250 100644 --- a/src/arch/host/configs/library_defconfig +++ b/src/arch/host/configs/library_defconfig @@ -4,6 +4,7 @@ CONFIG_COMP_DCBLOCK=y CONFIG_COMP_DRC=y CONFIG_COMP_FIR=y CONFIG_COMP_GOOGLE_RTC_AUDIO_PROCESSING=y +CONFIG_GOOGLE_RTC_AUDIO_PROCESSING_MOCK=y CONFIG_COMP_IIR=y CONFIG_COMP_MFCC=y CONFIG_COMP_MODULE_ADAPTER=y diff --git a/src/audio/google/Kconfig b/src/audio/google/Kconfig index 9d61a11064b5..942255653198 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 @@ -75,7 +74,7 @@ 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.