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
4 changes: 2 additions & 2 deletions src/audio/module_adapter/module_adapter.c
Original file line number Diff line number Diff line change
Expand Up @@ -422,9 +422,9 @@ int module_adapter_prepare(struct comp_dev *dev)
mod->output_buffer_size = buff_size;

/* allocate memory for input buffer data */
list_for_item(blist, &dev->bsource_list) {
size_t size = MAX(mod->deep_buff_bytes, mod->period_bytes);
size_t size = MAX(mod->deep_buff_bytes, mod->period_bytes);

list_for_item(blist, &dev->bsource_list) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Hmm, compiler should optimize that out? This does bring "size" to the wider scope, so not sure if this is better. Not blocking...

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@kv2019i I'm not sure the compiler is able to deduce that mod->deep_buff_bytes and mod->period_bytes don't change while the loop is executed. So I wouldn't rely on that

mod->input_buffers[i].data = rballoc(memory_flags, size);
if (!mod->input_buffers[i].data) {
comp_err(mod->dev, "Failed to alloc input buffer data");
Expand Down
1 change: 0 additions & 1 deletion src/ipc/ipc-helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,6 @@ int comp_verify_params(struct comp_dev *dev, uint32_t flag,
* there's just nothing to update
*/
comp_dbg(dev, "no connected buffers");
return 0;
} else {
/* for other components we iterate over all downstream buffers
* (for playback) or upstream buffers (for capture).
Expand Down
Loading