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 <seppo.ingalsuo@linux.intel.com>
This commit is contained in:
Seppo Ingalsuo 2024-10-04 12:36:25 +03:00 committed by Kai Vehmanen
parent eaddf533f9
commit 95373db418
2 changed files with 12 additions and 10 deletions

View File

@ -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

View File

@ -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)