Skip to content

Commit

Permalink
dts: enable logs
Browse files Browse the repository at this point in the history
  • Loading branch information
macchian committed Nov 29, 2023
1 parent 46261a2 commit 84255f6
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions src/audio/module_adapter/module/dts.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ DECLARE_TR_CTX(dts_tr, SOF_UUID(dts_uuid), LOG_LEVEL_INFO);

#define MAX_EXPECTED_DTS_CONFIG_DATA_SIZE 8192

LOG_MODULE_REGISTER(dts, CONFIG_SOF_LOG_LEVEL);

static void *dts_effect_allocate_codec_memory(void *mod_void, unsigned int length,
unsigned int alignment)
{
Expand Down Expand Up @@ -414,13 +416,24 @@ dts_codec_set_configuration(struct processing_module *mod, uint32_t config_id,

ret = module_set_configuration(mod, config_id, pos, data_offset_size, fragment,
fragment_size, response, response_size);
if (ret < 0)
if (ret < 0) {
comp_err(dev, "dts_codec_set_configuration(): error %x from module_set_configuration()", ret);
return ret;

}
/* return if more fragments are expected or if the module is not prepared */
if ((pos != MODULE_CFG_FRAGMENT_LAST && pos != MODULE_CFG_FRAGMENT_SINGLE) ||
md->state < MODULE_INITIALIZED)
md->state < MODULE_INITIALIZED) {
comp_err(dev, "dts_codec_set_configuration(): pos %d error", pos);
return 0;
}

#if CONFIG_IPC_MAJOR_3
// return if the module is not prepared
if (md->state < MODULE_INITIALIZED) {
comp_err(dev, "dts_codec_set_configuration(): state %d error", md->state);
return 0;
}
#endif

/* whole configuration received, apply it now */
ret = dts_codec_apply_config(mod);
Expand Down

0 comments on commit 84255f6

Please sign in to comment.