Skip to content

Commit

Permalink
Arch: host: Cleanup mixer vs. mixin/mixout component build
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
singalsu authored and kv2019i committed Oct 9, 2024
1 parent eaddf53 commit 95373db
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/arch/host/configs/plugin_ipc4_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
20 changes: 11 additions & 9 deletions src/audio/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 95373db

Please sign in to comment.