Skip to content
Open
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
10 changes: 6 additions & 4 deletions src/audio/module_adapter/module_adapter_ipc4.c
Original file line number Diff line number Diff line change
Expand Up @@ -187,11 +187,13 @@ int module_adapter_init_data(struct comp_dev *dev,
}
}

/* Assume legacy API if module data was not found in ext_init payload */
if (!config->ipc_extended_init || !dst->ext_data->module_data) {
dst->init_data = cfg; /* legacy API */
/* Always provide init_data so legacy modules have a valid pointer.
* Extended-init-aware modules (e.g. cadence) read
* ext_data->module_data directly and never dereference init_data.
*/
dst->init_data = cfg;
if (!config->ipc_extended_init || !dst->ext_data->module_data)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

maybe use the chance and add a comment, that cfg is usually pointing to the mailbox, so it cannot be used persistently, but it's reset later in module_adapter_new_ext() by calling module_adapter_reset_data()

dst->avail = true;
}

return 0;
}
Expand Down
Loading