diff --git a/src/audio/CMakeLists.txt b/src/audio/CMakeLists.txt index 649a80520..7e58fd55d 100644 --- a/src/audio/CMakeLists.txt +++ b/src/audio/CMakeLists.txt @@ -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_MODULE_SHARED_LIBRARY_BUILD) add_local_sources(sof host-legacy.c component.c @@ -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() @@ -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 ) @@ -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 ) @@ -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 diff --git a/src/audio/Kconfig b/src/audio/Kconfig index 1025ad8ae..d92e2ce58 100644 --- a/src/audio/Kconfig +++ b/src/audio/Kconfig @@ -703,4 +703,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_MODULE_SHARED_LIBRARY_BUILD + bool "Build SOF modules as shared libraries" + 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 diff --git a/src/audio/module_adapter/CMakeLists.txt b/src/audio/module_adapter/CMakeLists.txt index e803f78ba..c49ea576e 100644 --- a/src/audio/module_adapter/CMakeLists.txt +++ b/src/audio/module_adapter/CMakeLists.txt @@ -3,7 +3,7 @@ add_local_sources(sof module_adapter.c module/generic.c) -if((NOT CONFIG_LIBRARY) OR CONFIG_LIBRARY_STATIC) +if(NOT CONFIG_COMP_MODULE_SHARED_LIBRARY_BUILD) if(CONFIG_CADENCE_CODEC) add_local_sources(sof module/cadence.c)