Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 19 additions & 19 deletions src/audio/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ if(NOT CONFIG_COMP_MODULE_SHARED_LIBRARY_BUILD)
if(CONFIG_COMP_FIR)
add_subdirectory(eq_fir)
endif()
if(CONFIG_COMP_IGO_NR)
add_subdirectory(igo_nr)
endif()
if(CONFIG_COMP_IIR)
add_subdirectory(eq_iir)
endif()
Expand All @@ -63,15 +66,24 @@ if(NOT CONFIG_COMP_MODULE_SHARED_LIBRARY_BUILD)
if(CONFIG_COMP_MIXIN_MIXOUT)
add_subdirectory(mixin_mixout)
endif()
if(CONFIG_COMP_MODULE_ADAPTER)
add_subdirectory(module_adapter)
endif()
if(CONFIG_COMP_MULTIBAND_DRC)
add_subdirectory(multiband_drc)
endif()
if(CONFIG_COMP_MUX)
add_subdirectory(mux)
endif()
if(CONFIG_COMP_RTNR)
add_subdirectory(rtnr)
endif()
if(CONFIG_COMP_SEL)
add_subdirectory(selector)
endif()
if(CONFIG_COMP_SMART_AMP)
add_subdirectory(smart_amp)
endif()
if(CONFIG_COMP_SRC)
add_subdirectory(src)
endif()
Expand All @@ -89,6 +101,13 @@ if(NOT CONFIG_COMP_MODULE_SHARED_LIBRARY_BUILD)
if(CONFIG_COMP_VOLUME)
add_subdirectory(volume)
endif()
if(CONFIG_DTS_CODEC)
add_subdirectory(codec)
endif()
add_subdirectory(google)
if(CONFIG_INTEL_ADSP_MIC_PRIVACY)
add_subdirectory(mic_privacy_manager)
endif()
if(CONFIG_ZEPHYR_NATIVE_DRIVERS)
list(APPEND base_files host-zephyr.c)
sof_list_append_ifdef(CONFIG_COMP_DAI base_files dai-zephyr.c)
Expand Down Expand Up @@ -127,25 +146,6 @@ if(NOT CONFIG_COMP_MODULE_SHARED_LIBRARY_BUILD)
dai-legacy.c
)
endif()
if(CONFIG_COMP_SMART_AMP)
add_subdirectory(smart_amp)
endif()
if(CONFIG_COMP_MODULE_ADAPTER)
add_subdirectory(module_adapter)
endif()
if(CONFIG_COMP_IGO_NR)
add_subdirectory(igo_nr)
endif()
if(CONFIG_COMP_RTNR)
add_subdirectory(rtnr)
endif()
if(CONFIG_INTEL_ADSP_MIC_PRIVACY)
add_subdirectory(mic_privacy_manager)
endif()
add_subdirectory(google)
if(CONFIG_DTS_CODEC)
add_subdirectory(codec)
endif()

return()
endif()
Expand Down
41 changes: 32 additions & 9 deletions src/audio/codec/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,36 @@
# SPDX-License-Identifier: BSD-3-Clause

is_zephyr(zephyr)
if(zephyr) ### Zephyr ###

if(CONFIG_DTS_CODEC STREQUAL "m")
add_subdirectory(dts/llext ${PROJECT_BINARY_DIR}/dts_llext)
add_dependencies(app dts)

else(CONFIG_DTS_CODEC)
zephyr_library_sources(dts/dts.c)
if (CONFIG_DTS_CODEC_STUB)
zephyr_library_sources(dts/dts_stub.c)
else()
zephyr_library_import(DtsCodec
${sof_top_dir}/third_party/lib/libdts-sof-interface-i32.a)
endif()
endif()

return()
endif()

### XTOS ###
if(CONFIG_DTS_CODEC)
add_local_sources(sof dts/dts.c)
target_compile_definitions(sof PRIVATE -DDTS_MATH_INT32 -DDTS_XTENSA)
if (CONFIG_DTS_CODEC_STUB)
add_local_sources(sof dts/dts_stub.c)
else()
sof_add_static_library(DtsCodec
${SOF_ROOT_SOURCE_DIRECTORY}/third_party/lib/libdts-sof-interface-i32.a)
target_include_directories(sof PRIVATE ${CMAKE_SOURCE_DIR}/third_party/include)
endif()
add_local_sources(sof dts/dts.c)
target_compile_definitions(sof PRIVATE -DDTS_MATH_INT32 -DDTS_XTENSA)

if (CONFIG_DTS_CODEC_STUB)
add_local_sources(sof dts/dts_stub.c)
else()
sof_add_static_library(DtsCodec
${SOF_ROOT_SOURCE_DIRECTORY}/third_party/lib/libdts-sof-interface-i32.a)
target_include_directories(sof PRIVATE ${CMAKE_SOURCE_DIR}/third_party/include)
endif()

endif()
66 changes: 66 additions & 0 deletions src/audio/google/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,71 @@
# SPDX-License-Identifier: BSD-3-Clause

is_zephyr(zephyr)
if(zephyr) ### Zephyr ###

set(THIRD_PARTY ${SOF_ROOT_SOURCE_DIRECTORY}/third_party)
if(CONFIG_IPC_MAJOR_3)
set(ipc_suffix ipc3)
elseif(CONFIG_IPC_MAJOR_4)
set(ipc_suffix ipc4)
endif()

zephyr_library_sources_ifdef(CONFIG_COMP_GOOGLE_HOTWORD_DETECT
google_hotword_detect.c
)

if(CONFIG_COMP_GOOGLE_RTC_AUDIO_PROCESSING STREQUAL "m")
add_subdirectory(llext_rtc
${PROJECT_BINARY_DIR}/google_rtc_audio_processing_llext)
add_dependencies(app google_rtc_audio_processing)
elseif(CONFIG_COMP_GOOGLE_RTC_AUDIO_PROCESSING)
zephyr_library_sources(google_rtc_audio_processing.c)

zephyr_library_sources_ifdef(CONFIG_GOOGLE_RTC_AUDIO_PROCESSING_MOCK
google_rtc_audio_processing_mock.c
)

if(NOT CONFIG_GOOGLE_RTC_AUDIO_PROCESSING_MOCK)
zephyr_include_directories(${THIRD_PARTY}/include)
target_link_directories(SOF INTERFACE ${THIRD_PARTY}/lib)
target_link_libraries(SOF INTERFACE google_rtc_audio_processing)
target_link_libraries(SOF INTERFACE c++)
target_link_libraries(SOF INTERFACE c++abi)
target_link_libraries(SOF INTERFACE m)
target_link_libraries(SOF INTERFACE c)
target_link_libraries(SOF INTERFACE gcc)
endif()
endif()

if(CONFIG_COMP_GOOGLE_CTC_AUDIO_PROCESSING STREQUAL "m")
add_subdirectory(llext_ctc
${PROJECT_BINARY_DIR}/google_ctc_audio_processing_llext)
add_dependencies(app google_ctc_audio_processing)
elseif(CONFIG_COMP_GOOGLE_CTC_AUDIO_PROCESSING)
zephyr_library_sources(
google_ctc_audio_processing.c
google_ctc_audio_processing_${ipc_suffix}.c
)
zephyr_library_sources_ifdef(CONFIG_GOOGLE_CTC_AUDIO_PROCESSING_MOCK
google_ctc_audio_processing_mock.c
)

if(NOT CONFIG_GOOGLE_CTC_AUDIO_PROCESSING_MOCK)
zephyr_include_directories(${THIRD_PARTY}/include)
target_link_directories(SOF INTERFACE ${THIRD_PARTY}/lib)
target_link_libraries(SOF INTERFACE google_ctc_audio_processing)
target_link_libraries(SOF INTERFACE c++)
target_link_libraries(SOF INTERFACE c++abi)
target_link_libraries(SOF INTERFACE m)
target_link_libraries(SOF INTERFACE c)
target_link_libraries(SOF INTERFACE gcc)
endif()
endif()

return()
endif()

### XTOS build rules ###
if((NOT CONFIG_LIBRARY) OR CONFIG_LIBRARY_STATIC)
if(CONFIG_COMP_GOOGLE_HOTWORD_DETECT)
add_local_sources(sof
Expand Down
22 changes: 18 additions & 4 deletions src/audio/igo_nr/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,22 @@
# SPDX-License-Identifier: BSD-3-Clause

if(CONFIG_COMP_IGO_NR STREQUAL "m")
add_subdirectory(llext ${PROJECT_BINARY_DIR}/igo_nr_llext)
add_dependencies(app igo_nr)
return()
endif()

add_local_sources(sof igo_nr.c)

if (CONFIG_COMP_IGO_NR_STUB)
add_local_sources(sof igo_nr_stub.c)
else ()
sof_add_static_library(IGOChrome ${CMAKE_CURRENT_LIST_DIR}/libigonr.a)
endif ()
add_local_sources(sof igo_nr_stub.c)

else()
is_zephyr(zephyr)
if(zephyr) ### Zephyr ###
zephyr_library_import(IGOChrome ${CMAKE_CURRENT_LIST_DIR}/libigonr.a)
else()
sof_add_static_library(IGOChrome ${CMAKE_CURRENT_LIST_DIR}/libigonr.a)
endif()

endif()
58 changes: 57 additions & 1 deletion src/audio/module_adapter/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,68 @@
# SPDX-License-Identifier: BSD-3-Clause


if(CONFIG_IPC_MAJOR_3)
add_local_sources(sof module_adapter.c module_adapter_ipc3.c module/generic.c)
elseif(CONFIG_IPC_MAJOR_4)
add_local_sources(sof module_adapter.c module_adapter_ipc4.c module/generic.c)
endif()

is_zephyr(zephyr)
if(zephyr) ### Zephyr ###

# modules and codecs in alphabetical order

zephyr_library_sources_ifdef(CONFIG_CADENCE_CODEC module/cadence.c)

if (CONFIG_CADENCE_CODEC_AAC_DEC)
zephyr_library_import(xa_aac_dec ${CONFIG_CADENCE_CODEC_AAC_DEC_LIB})
endif()

if (CONFIG_CADENCE_CODEC_MP3_DEC)
zephyr_library_import(xa_mp3_dec ${CONFIG_CADENCE_CODEC_MP3_DEC_LIB})
endif()

if (CONFIG_CADENCE_CODEC_MP3_ENC)
zephyr_library_import(xa_mp3_enc ${CONFIG_CADENCE_CODEC_MP3_ENC_LIB})
endif()

zephyr_include_directories_ifdef(CONFIG_INTEL_MODULES
${SOF_SRC_PATH}/include/sof/audio/module_adapter/iadk/
${SOF_SRC_PATH}/include/sof/audio/module_adapter/library/
)

zephyr_library_sources_ifdef(CONFIG_INTEL_MODULES
module/modules.c
iadk/module_initial_settings_concrete.cpp
iadk/iadk_module_adapter.cpp
iadk/system_agent.cpp
library/native_system_agent.c
library/native_system_service.c
)

zephyr_library_sources_ifdef(CONFIG_PASSTHROUGH_CODEC
module/passthrough.c
)

if(CONFIG_WAVES_CODEC)
set(WAVES_DIR module/waves)
if(CONFIG_WAVES_CODEC STREQUAL "m")
add_subdirectory(${WAVES_DIR}/llext ${PROJECT_BINARY_DIR}/waves_llext)
add_dependencies(app waves)
else()
zephyr_library_sources(${WAVES_DIR}/waves.c)
if(CONFIG_WAVES_CODEC_STUB)
zephyr_library_sources_ifdef(CONFIG_WAVES_CODEC_STUB
${WAVES_DIR}/maxx_stub.c)
else()
zephyr_library_import(waves_codec
${sof_top_dir}/third_party/lib/libMaxxChrome.a)
endif()
endif()
endif()

return()
endif()

if(NOT CONFIG_COMP_MODULE_SHARED_LIBRARY_BUILD)
if(CONFIG_CADENCE_CODEC)
add_local_sources(sof module/cadence.c)
Expand Down
31 changes: 23 additions & 8 deletions src/audio/rtnr/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,26 @@
# SPDX-License-Identifier: BSD-3-Clause

add_local_sources(sof rtnr.c)

if (CONFIG_COMP_RTNR_STUB)
add_local_sources(sof rtnr_stub.c)
elseif(CONFIG_TIGERLAKE)
add_subdirectory(rtklib/tgl)
elseif(CONFIG_MT8195)
add_subdirectory(rtklib/mt8195)
if(CONFIG_COMP_RTNR STREQUAL "m")
add_subdirectory(llext ${PROJECT_BINARY_DIR}/rtnr_llext)
add_dependencies(app rtnr)
return()
endif()

is_zephyr(zephyr)
if(zephyr) ### Zephyr ###

zephyr_library_sources(rtnr.c)
zephyr_library_sources_ifdef(CONFIG_COMP_RTNR_STUB rtnr_stub.c)

else() ### XTOS ###

add_local_sources(sof rtnr.c)
if (CONFIG_COMP_RTNR_STUB)
add_local_sources(sof rtnr_stub.c)
elseif(CONFIG_TIGERLAKE)
add_subdirectory(rtklib/tgl)
elseif(CONFIG_MT8195)
add_subdirectory(rtklib/mt8195)
endif()

endif()
34 changes: 27 additions & 7 deletions src/audio/smart_amp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,33 @@
add_local_sources(sof smart_amp.c smart_amp_generic.c)

if(CONFIG_MAXIM_DSM)
add_local_sources(sof smart_amp_maxim_dsm.c)
if(CONFIG_MAXIM_DSM_STUB)
add_local_sources(sof maxim_dsm_stub.c)
add_local_sources(sof smart_amp_maxim_dsm.c)
if(CONFIG_MAXIM_DSM_STUB)
add_local_sources(sof maxim_dsm_stub.c)
endif()
else()
sof_add_static_library(dsm ${CMAKE_CURRENT_LIST_DIR}/lib/release/dsm_lib/libdsm.a)
add_local_sources(sof smart_amp_passthru.c)
endif()
target_include_directories(sof PUBLIC ${CMAKE_CURRENT_LIST_DIR}/include/dsm_api/inc)
else()
add_local_sources(sof smart_amp_passthru.c)

is_zephyr(zephyr)
if(zephyr) ### Zephyr ###

if(CONFIG_MAXIM_DSM)
if(NOT CONFIG_MAXIM_DSM_STUB)
zephyr_library_import(dsm ${CMAKE_CURRENT_LIST_DIR}/lib/release/dsm_lib/libdsm.a)
endif()

zephyr_include_directories(CONFIG_MAXIM_DSM ${CMAKE_CURRENT_LIST_DIR}/include/dsm_api/inc/)
endif()

else() ### XTOS

if(CONFIG_MAXIM_DSM)
if(NOT CONFIG_MAXIM_DSM_STUB)
sof_add_static_library(dsm ${CMAKE_CURRENT_LIST_DIR}/lib/release/dsm_lib/libdsm.a)
endif()

target_include_directories(sof PUBLIC ${CMAKE_CURRENT_LIST_DIR}/include/dsm_api/inc)
endif()

endif()
Loading
Loading