1# SPDX-License-Identifier: BSD-3-Clause 2 3 4if (CONFIG_IPC_MAJOR_4 OR CONFIG_CADENCE_CODEC OR (NOT CONFIG_COMP_LEGACY_INTERFACE) OR CONFIG_COMP_FIR) 5 add_local_sources(sof module_adapter.c module/generic.c) 6endif() 7 8if((NOT CONFIG_LIBRARY) OR CONFIG_LIBRARY_STATIC) 9 if(CONFIG_COMP_VOLUME) 10 add_local_sources(sof 11 module/volume/volume_generic.c 12 module/volume/volume_hifi3.c 13 module/volume/volume_generic_with_peakvol.c 14 module/volume/volume_hifi3_with_peakvol.c 15 module/volume/volume.c) 16 endif() 17 18 if(CONFIG_CADENCE_CODEC) 19 add_local_sources(sof module/cadence.c) 20 21 if(CONFIG_CADENCE_CODEC_WRAPPER) 22 sof_add_static_library(codec_wrapper_lib ${CONFIG_CADENCE_CODEC_WRAPPER_LIB}) 23 endif() 24 25 if(CONFIG_CADENCE_CODEC_AAC_DEC) 26 sof_add_static_library(xa_aac_dec ${CONFIG_CADENCE_CODEC_AAC_DEC_LIB}) 27 endif() 28 29 if(CONFIG_CADENCE_CODEC_BSAC_DEC) 30 sof_add_static_library(xa_bsac_dec ${CONFIG_CADENCE_CODEC_BSAC_DEC_LIB}) 31 endif() 32 33 34 if(CONFIG_CADENCE_CODEC_DAB_DEC) 35 sof_add_static_library(xa_dab_dec ${CONFIG_CADENCE_CODEC_DAB_DEC_LIB}) 36 endif() 37 38 39 if(CONFIG_CADENCE_CODEC_DRM_DEC) 40 sof_add_static_library(xa_drm_dec ${CONFIG_CADENCE_CODEC_DRM_DEC_LIB}) 41 endif() 42 43 44 if(CONFIG_CADENCE_CODEC_MP3_DEC) 45 sof_add_static_library(xa_mp3_dec ${CONFIG_CADENCE_CODEC_MP3_DEC_LIB}) 46 endif() 47 48 49 if(CONFIG_CADENCE_CODEC_SBC_DEC) 50 sof_add_static_library(xa_sbc_dec ${CONFIG_CADENCE_CODEC_SBC_DEC_LIB}) 51 endif() 52 53 if(CONFIG_CADENCE_CODEC_VORBIS_DEC) 54 sof_add_static_library(xa_vorbis_dec ${CONFIG_CADENCE_CODEC_VORBIS_DEC_LIB}) 55 endif() 56 57 if(CONFIG_CADENCE_CODEC_SRC_PP) 58 sof_add_static_library(xa_src_pp ${CONFIG_CADENCE_CODEC_SRC_PP_LIB}) 59 endif() 60 61 endif() 62 63 if(CONFIG_PASSTHROUGH_CODEC) 64 add_local_sources(sof module/passthrough.c) 65 endif() 66 67 if(CONFIG_WAVES_CODEC) 68 add_local_sources(sof module/waves.c) 69 sof_add_static_library(MaxxChrome ${CMAKE_CURRENT_LIST_DIR}/lib/release/libMaxxChrome.a) 70 # folder with Waves API must be among include directories 71 target_include_directories(sof PUBLIC ${CMAKE_CURRENT_LIST_DIR}/../../include/sof/audio/) 72 endif() 73 74 if(CONFIG_DTS_CODEC) 75 add_local_sources(sof module/dts.c) 76 target_compile_definitions(sof PRIVATE -DDTS_MATH_INT32 -DDTS_XTENSA) 77 target_include_directories(sof PRIVATE ${CMAKE_CURRENT_LIST_DIR}/../../include/sof/audio/dts/) 78 sof_add_static_library(DtsCodec ${CMAKE_CURRENT_LIST_DIR}/lib/release/libdts-sof-interface-i32.a) 79 endif() 80 81 return() 82endif() 83