ipc3: override type field once comp_driver found

A bad IPC can mismatch UUID and type, causing downstream processes to
operate differently than the final component target. This is because
get_drv will not reject the mismatch and given we don't know the
state of topology we can't start now. Instead we can override the ipc
with the proper type.

Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
This commit is contained in:
Curtis Malainey 2024-09-19 13:54:03 -07:00 committed by Liam Girdwood
parent 4bec102d0c
commit b53573a15c
1 changed files with 1 additions and 1 deletions

View File

@ -134,7 +134,7 @@ static const struct comp_driver *get_drv(struct sof_ipc_comp *comp)
info = container_of(clist, struct comp_driver_info,
list);
if (!memcmp(info->drv->uid, comp_ext->uuid,
UUID_SIZE)) {
UUID_SIZE) && comp->type == info->drv->type) {
drv = info->drv;
break;
}