From e327f092507ea005415b9056427462263a679176 Mon Sep 17 00:00:00 2001 From: Liam Girdwood Date: Fri, 3 Jun 2022 11:54:39 +0100 Subject: [PATCH] ipc: blob: Add a Kconfig option for the blob loader Save memory when not used. Signed-off-by: Liam Girdwood --- src/audio/CMakeLists.txt | 4 +++- src/audio/Kconfig | 19 +++++++++++++++++++ zephyr/CMakeLists.txt | 7 ++++++- 3 files changed, 28 insertions(+), 2 deletions(-) diff --git a/src/audio/CMakeLists.txt b/src/audio/CMakeLists.txt index fc4e5df59..d14acfd5f 100644 --- a/src/audio/CMakeLists.txt +++ b/src/audio/CMakeLists.txt @@ -4,10 +4,12 @@ if(NOT CONFIG_LIBRARY) add_local_sources(sof host-legacy.c component.c - data_blob.c buffer.c channel_map.c ) + if(CONFIG_COMP_BLOB) + add_local_sources(sof data_blob.c) + endif() if(CONFIG_COMP_SRC) add_subdirectory(src) endif() diff --git a/src/audio/Kconfig b/src/audio/Kconfig index 1936e115c..04a780fe5 100644 --- a/src/audio/Kconfig +++ b/src/audio/Kconfig @@ -45,6 +45,14 @@ config COMP_UP_DOWN_MIXER Downmixing for mono output: 4.0, Quatro, 3.1, 2 -> 1 +config COMP_BLOB + bool "Large IPC data as compound message blobs" + default y + help + Select to support sending large data blobs to firmware as + multiple IPC messages. Not all components or modules need + this. If unsure, say yes. + config COMP_SRC bool "SRC component" default y @@ -104,6 +112,7 @@ endif # SRC config COMP_FIR bool "FIR component" select MATH_FIR + select COMP_BLOB default y help Select for FIR component. FIR performance can differ between DSP @@ -115,6 +124,7 @@ config COMP_FIR config COMP_IIR bool "IIR component" + select COMP_BLOB default y select MATH_IIR_DF2T help @@ -163,6 +173,7 @@ endif # COMP_KPB config COMP_GOOGLE_HOTWORD_DETECT bool "Google hotword detector component" + select COMP_BLOB default n help Select for Google hotword detector component. It uses the Google @@ -172,6 +183,7 @@ config COMP_GOOGLE_HOTWORD_DETECT config COMP_GOOGLE_RTC_AUDIO_PROCESSING bool "Google Real Time Communication Audio processing" + select COMP_BLOB default n help Select for Google real-time communication audio processing. It @@ -197,6 +209,7 @@ config COMP_SEL config COMP_CROSSOVER bool "Crossover Filter component" + select COMP_BLOB default n help Select for Crossover Filter component. A crossover can be used to @@ -208,6 +221,7 @@ config COMP_DRC select CORDIC_FIXED select NUMBERS_NORM select MATH_DECIBELS + select COMP_BLOB default n help Select for Dynamic Range Compressor (DRC) component. A DRC can be used @@ -228,6 +242,7 @@ config COMP_MULTIBAND_DRC depends on COMP_IIR && COMP_CROSSOVER && COMP_DRC bool "Multiband Dynamic Range Compressor component" select CORDIC_FIXED + select COMP_BLOB default n help Select for Multiband Dynamic Range Compressor (DRC) component. It @@ -244,6 +259,7 @@ config COMP_DCBLOCK config MAXIM_DSM depends on CAVS && !CAVS_VERSION_1_5 bool "Maxim DSM component" + select COMP_BLOB default n help Select for Maxim DSM(Dynamic Speaker Management) component. @@ -392,6 +408,7 @@ config COMP_TDFB select MATH_IIR_DF2T select SQRT_FIXED select CORDIC_FIXED + select COMP_BLOB default y help Select for time domain fixed beamformer (TDFB) component. The @@ -424,6 +441,7 @@ rsource "module_adapter/Kconfig" config COMP_IGO_NR bool "IGO NR component" + select COMP_BLOB default n help This option enables Intelligo non-speech noise reduction. The feature links to a proprietary @@ -432,6 +450,7 @@ config COMP_IGO_NR config COMP_RTNR bool "RTNR component" + select COMP_BLOB default n help Select for Realtek noise reduction/suppression(NR/NS) component. diff --git a/zephyr/CMakeLists.txt b/zephyr/CMakeLists.txt index dbc25a353..050e2376a 100644 --- a/zephyr/CMakeLists.txt +++ b/zephyr/CMakeLists.txt @@ -503,7 +503,6 @@ zephyr_library_sources( ${SOF_AUDIO_PATH}/pcm_converter/pcm_converter_generic.c ${SOF_AUDIO_PATH}/buffer.c ${SOF_AUDIO_PATH}/component.c - ${SOF_AUDIO_PATH}/data_blob.c ${SOF_AUDIO_PATH}/pipeline/pipeline-graph.c ${SOF_AUDIO_PATH}/pipeline/pipeline-params.c ${SOF_AUDIO_PATH}/pipeline/pipeline-schedule.c @@ -526,6 +525,12 @@ zephyr_library_sources( schedule.c ) +if(CONFIG_COMP_BLOB) + zephyr_library_sources( + ${SOF_AUDIO_PATH}/data_blob.c + ) +endif() + if(CONFIG_ZEPHYR_NATIVE_DRIVERS) zephyr_library_sources( ${SOF_AUDIO_PATH}/host-zephyr.c