Skip to content
Open
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
5 changes: 5 additions & 0 deletions app/boards/intel_adsp_ace15_mtpm.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/audio/module_adapter/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
22 changes: 22 additions & 0 deletions src/audio/module_adapter/module/dts/dts.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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),
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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");
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand All @@ -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);
Expand All @@ -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)
Expand Down