Skip to content

Commit

Permalink
audio: Add new kconfig for shared library modules
Browse files Browse the repository at this point in the history
Add a new kconfig option to build the shared library modules that can be
used to run the pipelines on the host with the testbench or the ALSA
plugin.

Signed-off-by: Liam Girdwood <[email protected]>
Signed-off-by: Ranjani Sridharan <[email protected]>
  • Loading branch information
lrgirdwo authored and ranj063 committed Aug 31, 2023
1 parent de61bb8 commit 65efabd
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 4 deletions.
12 changes: 9 additions & 3 deletions src/audio/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ 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_LIBRARY) OR CONFIG_LIBRARY_STATIC)
if(NOT CONFIG_COMP_HOST_MODULES_SO)
add_local_sources(sof
host-legacy.c
component.c
Expand All @@ -17,6 +17,7 @@ if((NOT CONFIG_LIBRARY) OR CONFIG_LIBRARY_STATIC)
audio_stream.c
channel_map.c
)

if(CONFIG_COMP_BLOB)
add_local_sources(sof data_blob.c)
endif()
Expand Down Expand Up @@ -62,7 +63,7 @@ if((NOT CONFIG_LIBRARY) OR CONFIG_LIBRARY_STATIC)
dai-legacy.c
)
endif()
if(CONFIG_COMP_KPB)
if(CONFIG_COMP_KPB AND NOT CONFIG_LIBRARY_STATIC)
add_local_sources(sof
kpb.c
)
Expand All @@ -89,7 +90,7 @@ if((NOT CONFIG_LIBRARY) OR CONFIG_LIBRARY_STATIC)
if(CONFIG_COMP_RTNR)
add_subdirectory(rtnr)
endif()
if(CONFIG_COMP_BASEFW_IPC4)
if(CONFIG_COMP_BASEFW_IPC4 AND NOT CONFIG_LIBRARY)
add_local_sources(sof
base_fw.c
)
Expand Down Expand Up @@ -125,6 +126,11 @@ add_local_sources(sof
component.c
data_blob.c
buffer.c
source_api_helper.c
sink_api_helper.c
sink_source_utils.c
audio_stream.c
channel_map.c
)

# Audio Modules with various optimizaitons
Expand Down
8 changes: 8 additions & 0 deletions src/audio/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -684,4 +684,12 @@ config WRAP_ACTUAL_POSITION
It is not necessary that on wrap, the buffer position would be zero.At wrap,
in some cases based on the period size, the frame may not exactly be at the
end of the buffer and roll over for some bytes from the beginning of the buffer.

config COMP_HOST_MODULES_SO
bool "Build modules as shared objects"
default n
help
Select if you want to build modules as shared objects that can be used to run
pipelines on the host with the testbench or the ALSA plugin.

endmenu
3 changes: 2 additions & 1 deletion src/audio/module_adapter/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@

add_local_sources(sof module_adapter.c module/generic.c)

if((NOT CONFIG_LIBRARY) OR CONFIG_LIBRARY_STATIC)
if(NOT CONFIG_COMP_HOST_MODULES_SO)

if(CONFIG_CADENCE_CODEC)
add_local_sources(sof module/cadence.c)

Expand Down

0 comments on commit 65efabd

Please sign in to comment.