Skip to content

Commit

Permalink
audio: dts: add sof log declare
Browse files Browse the repository at this point in the history
Signed-off-by: Mac Chiang <[email protected]>
  • Loading branch information
macchian committed Sep 6, 2023
1 parent d964b7b commit a5c3ee5
Showing 1 changed file with 22 additions and 0 deletions.
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

0 comments on commit a5c3ee5

Please sign in to comment.