Skip to content
Merged
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
3 changes: 2 additions & 1 deletion src/audio/module_adapter/module_adapter.c
Original file line number Diff line number Diff line change
Expand Up @@ -581,6 +581,8 @@ int module_adapter_params(struct comp_dev *dev, struct sof_ipc_stream_params *pa
int ret;
struct processing_module *mod = comp_get_drvdata(dev);

module_adapter_set_params(mod, params);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

while at it you can also replace rzalloc() with rmalloc() in line 596 because the memory is completely overwritten, and also we can check the size and if it's the same, avoid re-allocation?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good idea. I will submit another PR.


ret = comp_verify_params(dev, mod->verify_params_flags, params);
if (ret < 0) {
comp_err(dev, "module_adapter_params(): comp_verify_params() failed.");
Expand Down Expand Up @@ -610,7 +612,6 @@ int module_adapter_params(struct comp_dev *dev, struct sof_ipc_stream_params *pa
return ret;
}

module_adapter_set_params(mod, params);
return 0;
}

Expand Down
1 change: 0 additions & 1 deletion src/audio/module_adapter/module_adapter_ipc4.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ void module_adapter_check_data(struct processing_module *mod, struct comp_dev *d
void module_adapter_set_params(struct processing_module *mod, struct sof_ipc_stream_params *params)
{
ipc4_base_module_cfg_to_stream_params(&mod->priv.cfg.base_cfg, params);
ipc4_base_module_cfg_to_stream_params(&mod->priv.cfg.base_cfg, mod->stream_params);
}

int module_adapter_set_state(struct processing_module *mod, struct comp_dev *dev,
Expand Down