From a5c3ee53b75d1b3f0b03fc29333bc76fa2293e75 Mon Sep 17 00:00:00 2001 From: Mac Chiang Date: Wed, 6 Sep 2023 02:24:04 -0400 Subject: [PATCH 1/3] audio: dts: add sof log declare Signed-off-by: Mac Chiang --- src/audio/module_adapter/module/dts/dts.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/audio/module_adapter/module/dts/dts.c b/src/audio/module_adapter/module/dts/dts.c index 62415f38c660..a7c54bdd8963 100644 --- a/src/audio/module_adapter/module/dts/dts.c +++ b/src/audio/module_adapter/module/dts/dts.c @@ -23,6 +23,8 @@ static void *dts_effect_allocate_codec_memory(void *mod_void, unsigned int lengt struct comp_dev *dev = mod->dev; void *pMem; + LOG_MODULE_DECLARE(component, CONFIG_SOF_LOG_LEVEL); + comp_dbg(dev, "dts_effect_allocate_codec_memory() start"); pMem = module_allocate_memory(mod, (uint32_t)length, (uint32_t)alignment); @@ -40,6 +42,8 @@ static void dts_effect_free_codec_memory(void *mod_void, void *pMem) struct processing_module *mod = mod_void; struct comp_dev *dev = mod->dev; + LOG_MODULE_DECLARE(component, CONFIG_SOF_LOG_LEVEL); + comp_dbg(dev, "dts_effect_free_codec_memory() start"); int ret = module_free_memory(mod, pMem); @@ -84,6 +88,8 @@ static int dts_effect_populate_buffer_configuration(struct comp_dev *dev, DtsSofInterfaceBufferFormat buffer_format; unsigned int buffer_fmt, frame_fmt, rate, channels; + LOG_MODULE_DECLARE(component, CONFIG_SOF_LOG_LEVEL); + comp_dbg(dev, "dts_effect_populate_buffer_configuration() start"); if (!source) @@ -147,6 +153,8 @@ static int dts_codec_init(struct processing_module *mod) DtsSofInterfaceVersionInfo interface_version; DtsSofInterfaceVersionInfo sdk_version; + LOG_MODULE_DECLARE(component, CONFIG_SOF_LOG_LEVEL); + comp_dbg(dev, "dts_codec_init() start"); dts_result = dtsSofInterfaceInit((DtsSofInterfaceInst **)&(codec->private), @@ -193,6 +201,8 @@ static int dts_codec_prepare(struct processing_module *mod, DtsSofInterfaceBufferConfiguration buffer_configuration; DtsSofInterfaceResult dts_result; + LOG_MODULE_DECLARE(component, CONFIG_SOF_LOG_LEVEL); + comp_dbg(dev, "dts_codec_prepare() start"); ret = dts_effect_populate_buffer_configuration(dev, &buffer_configuration); @@ -227,6 +237,8 @@ static int dts_codec_init_process(struct processing_module *mod) struct module_data *codec = &mod->priv; DtsSofInterfaceResult dts_result; + LOG_MODULE_DECLARE(component, CONFIG_SOF_LOG_LEVEL); + comp_dbg(dev, "dts_codec_init_process() start"); dts_result = dtsSofInterfaceInitProcess(codec->private); @@ -255,6 +267,8 @@ dts_codec_process(struct processing_module *mod, DtsSofInterfaceResult dts_result; unsigned int bytes_processed = 0; + LOG_MODULE_DECLARE(component, CONFIG_SOF_LOG_LEVEL); + /* Proceed only if we have enough data to fill the module buffer completely */ if (input_buffers[0].size < codec->mpd.in_buff_size) { comp_dbg(dev, "dts_codec_process(): not enough data to process"); @@ -310,6 +324,8 @@ static int dts_codec_apply_config(struct processing_module *mod) uint32_t param_number = 0; DtsSofInterfaceResult dts_result; + LOG_MODULE_DECLARE(component, CONFIG_SOF_LOG_LEVEL); + comp_dbg(dev, "dts_codec_apply_config() start"); config = &codec->cfg; @@ -383,6 +399,8 @@ static int dts_codec_reset(struct processing_module *mod) struct module_data *codec = &mod->priv; DtsSofInterfaceResult dts_result; + LOG_MODULE_DECLARE(component, CONFIG_SOF_LOG_LEVEL); + comp_dbg(dev, "dts_codec_reset() start"); dts_result = dtsSofInterfaceReset(codec->private); @@ -403,6 +421,8 @@ static int dts_codec_free(struct processing_module *mod) struct module_data *codec = &mod->priv; DtsSofInterfaceResult dts_result; + LOG_MODULE_DECLARE(component, CONFIG_SOF_LOG_LEVEL); + comp_dbg(dev, "dts_codec_free() start"); dts_result = dtsSofInterfaceFree(codec->private); @@ -428,6 +448,8 @@ dts_codec_set_configuration(struct processing_module *mod, uint32_t config_id, struct comp_dev *dev = mod->dev; int ret; + LOG_MODULE_DECLARE(component, CONFIG_SOF_LOG_LEVEL); + ret = module_set_configuration(mod, config_id, pos, data_offset_size, fragment, fragment_size, response, response_size); if (ret < 0) From 3787ff70abdbe1a9f4b545f288226b334eb218ba Mon Sep 17 00:00:00 2001 From: Mac Chiang Date: Wed, 6 Sep 2023 02:25:24 -0400 Subject: [PATCH 2/3] board: intel_adsp_ace15_mtpm: enable DTS codec enable IIR, module adpater for DTS modules Signed-off-by: Mac Chiang --- app/boards/intel_adsp_ace15_mtpm.conf | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/boards/intel_adsp_ace15_mtpm.conf b/app/boards/intel_adsp_ace15_mtpm.conf index 8bbcc0278c58..40d2fb74cab8 100644 --- a/app/boards/intel_adsp_ace15_mtpm.conf +++ b/app/boards/intel_adsp_ace15_mtpm.conf @@ -75,6 +75,11 @@ CONFIG_INTEL_ADSP_IPC=y CONFIG_WATCHDOG=y CONFIG_LL_WATCHDOG=y +# enable DTS codec +CONFIG_COMP_IIR=y +CONFIG_COMP_MODULE_ADAPTER=y +CONFIG_DTS_CODEC=y + # Temporary disabled options CONFIG_TRACE=n CONFIG_COMP_KPB=y From 9ab7ffd95b588d5c6f8993c238e88e9b6277629f Mon Sep 17 00:00:00 2001 From: Mac Chiang Date: Wed, 6 Sep 2023 03:30:46 -0400 Subject: [PATCH 3/3] audio: dts: create the dts library path. Signed-off-by: Mac Chiang --- src/audio/module_adapter/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/audio/module_adapter/CMakeLists.txt b/src/audio/module_adapter/CMakeLists.txt index e803f78ba91a..5d90619921b8 100644 --- a/src/audio/module_adapter/CMakeLists.txt +++ b/src/audio/module_adapter/CMakeLists.txt @@ -65,7 +65,7 @@ if((NOT CONFIG_LIBRARY) OR CONFIG_LIBRARY_STATIC) if (CONFIG_DTS_CODEC_STUB) add_local_sources(sof module/dts/dts_stub.c) else() - sof_add_static_library(DtsCodec ${CMAKE_CURRENT_LIST_DIR}/lib/release/libdts-sof-interface-i32.a) + sof_add_static_library(DtsCodec ${CMAKE_CURRENT_LIST_DIR}/library/release/libdts-sof-interface-i32.a) endif() endif()