From f18cf73d698b08018c234872472beb2d731f8f77 Mon Sep 17 00:00:00 2001 From: Seppo Ingalsuo Date: Fri, 4 Oct 2024 12:36:25 +0300 Subject: [PATCH] Arch: host: Cleanup mixer vs. mixin/mixout component build The build of mixin/mixout didn't work for static library IPC4 testbench build because Kconfig for mixer has "depends on IPC_MAJOR_3". Therefore the if(CONFIG_COMP_MIXER) with IPC version dependent sources was never true. It's replaced with normal component build handling for CONFIG_COMP_MIXER and CONFIG_COMP_MIXIN_MIXOUT. The confusing looking "set(mixer_src ..." from begin of CMakeLists.txt is moved to end where shared libraries of audio modules are built. The default configuration of SOF plugin is changed to CONFIG_COMP_MIXIN_MIXOUT=y to make sure the correct mixer is built for it. Signed-off-by: Seppo Ingalsuo --- src/arch/host/configs/plugin_ipc4_defconfig | 2 +- src/audio/CMakeLists.txt | 20 +++++++++++--------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/src/arch/host/configs/plugin_ipc4_defconfig b/src/arch/host/configs/plugin_ipc4_defconfig index 43529dc87726..0398ea947dda 100644 --- a/src/arch/host/configs/plugin_ipc4_defconfig +++ b/src/arch/host/configs/plugin_ipc4_defconfig @@ -12,7 +12,7 @@ CONFIG_COMP_GAIN=y CONFIG_COMP_VOLUME_WINDOWS_FADE=y CONFIG_COMP_MODULES_SO=y CONFIG_COMP_MODULE_ADAPTER=y -CONFIG_COMP_MIXER=y +CONFIG_COMP_MIXIN_MIXOUT=y CONFIG_IPC4_GATEWAY=n CONFIG_COMP_DAI_GROUP=n CONFIG_FORMAT_S16LE=y diff --git a/src/audio/CMakeLists.txt b/src/audio/CMakeLists.txt index 3a052553ee6c..bd43559aaa80 100644 --- a/src/audio/CMakeLists.txt +++ b/src/audio/CMakeLists.txt @@ -1,11 +1,5 @@ # SPDX-License-Identifier: BSD-3-Clause -if(CONFIG_IPC_MAJOR_3) - set(mixer_src mixer/mixer.c mixer/mixer_generic.c mixer/mixer_hifi3.c) -elseif(CONFIG_IPC_MAJOR_4) - set(mixer_src mixin_mixout/mixin_mixout.c mixin_mixout/mixin_mixout_generic.c mixin_mixout/mixin_mixout_hifi3.c) -endif() - if(NOT CONFIG_COMP_MODULE_SHARED_LIBRARY_BUILD) add_local_sources(sof host-legacy.c @@ -52,9 +46,10 @@ if(NOT CONFIG_COMP_MODULE_SHARED_LIBRARY_BUILD) ) endif() if(CONFIG_COMP_MIXER) - add_local_sources(sof - ${mixer_src} - ) + add_subdirectory(mixer) + endif() + if(CONFIG_COMP_MIXIN_MIXOUT) + add_subdirectory(mixin_mixout) endif() if(CONFIG_COMP_MUX) add_subdirectory(mux) @@ -200,6 +195,13 @@ elseif(CONFIG_IPC_MAJOR_4) set(mux_sources mux/mux_ipc4.c) set(crossover_sources crossover/crossover_ipc4.c) endif() + +if(CONFIG_IPC_MAJOR_3) + set(mixer_src mixer/mixer.c mixer/mixer_generic.c mixer/mixer_hifi3.c) +elseif(CONFIG_IPC_MAJOR_4) + set(mixer_src mixin_mixout/mixin_mixout.c mixin_mixout/mixin_mixout_generic.c mixin_mixout/mixin_mixout_hifi3.c) +endif() + set(mixer_sources ${mixer_src}) set(asrc_sources asrc/asrc.c asrc/asrc_farrow.c asrc/asrc_farrow_generic.c) set(eq-fir_sources eq_fir/eq_fir.c eq_fir/eq_fir_generic.c)