-
Notifications
You must be signed in to change notification settings - Fork 321
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fast mode task config + vendor config set #8005
Conversation
Can one of the admins verify this patch?
|
Can one of the admins verify this patch? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please fix CI issues first
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs more decription in the commit messages to explain feature and changes.
45d2bf6
to
ca3c6c3
Compare
I am out of office in ww33 and ww34. Therefore, I'm dismissing my review, I do not want to block this PR for two weeks. But I still expect my comments to be addressed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not a complete review, let's fix these issues first. Maybe this should be a draft PR for now
@lyakh update good for you now ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly minor style issue. I understand this is based on code with C++ background, so some of the conversion artifacts can be omitted, but I did find at least one odd case of error handling.
As for functionality, I don't know kpb well enough to really do meaningful commentary and would welcome a review round by someone more familiar with kpb.
src/ipc/ipc4/handler.c
Outdated
} | ||
ret = drv->ops.set_large_config(dev, param_id, init_block, | ||
final_block, data_off_size, (uint8_t *)(&array)); | ||
return ret; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return drv->ops.set_large_config(dev, param_id, init_block,
final_block, data_off_size, (uint8_t *)(&array));
ret can be removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed this, but ret is still used elsewhere.
/* Mic selector for client - sets microphone id for real time sink mic selector | ||
* IPC4-compatible ID - please do not change the number | ||
*/ | ||
KP_BUF_CLIENT_MIC_SELECT = 11, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how about 101? left more extend for this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is defined as 11 in reference FW. There are some IPC commands in-between those two that are not defined in sof yet.
src/ipc/ipc4/handler.c
Outdated
/* Align up to a multiple of 4 */ | ||
tlv = (struct sof_tlv *)((const uint8_t *)tlv + | ||
TLV_DATA_OFFSET + ALIGN_UP(tlv->length, 4)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why can't you use tlv_next
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this tlv_next
looks convenient, but...
is does not have the ALIGN_UP
. Reference FW aligned it up, so I guess that we also need it here. I do not know all of the possible IPC cases so I'm not sure if it's actually necessary or not.
@tobonex CI is failing on build, can you check: https://github.com/thesofproject/sof/actions/runs/6151677351/job/16692249787?pr=8005
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few C++'ism, but I can live with those. The CI fail needs to be fixed before merge, and I'd appreciate some comment on why FMT is needed by KPB. Otherwise looks good to go, thanks @tobonex !
Refactored some of the code so that it makes more sense:
|
Originally, in case if WoV event, KPB used FMT to drain history buffer and send this data to Host ASAP. Normal tasks were too slow. We still need it for the same reason. |
@tobonex wrote:
Ack, thanks, this is a sufficient description. |
Add Vendor Config Set, a special case of Large Config Set. Large Config Set handling now checks for this case and extracts extended param_id from ipc payload as param_id and handles the rest of the payload as usual. KPB now uses extended param_id. Necessary for fast mode task configuration in KPB. Signed-off-by: Tobiasz Dryjanski <[email protected]>
This patch implements handling of the configuration IPC for FMT in KPB module. KPB now saves the list of module instances to be processed by FMT. This is the first step for implementing FMT functionality. In case of WoV event, FMT is needed for KPB to drain history buffer and send this data to Host ASAP, as normal tasks are too slow. Signed-off-by: Tobiasz Dryjanski <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
comments have been addressed, thanks! Haven't checked what exactly changed from previous versions, but at least locations, that I commented on, look better now
* | | ||
* fmt.device_list(device_list*) | ||
* | ||
* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2 empty lines above and below the description should be removed IMHO
* dev_list.device_list(comp_dev**) | ||
* ^ | ||
* | | ||
* fmt.device_list(device_list*) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure what this structure means. Are these elements of the struct device_list::devs[]
array above? Maybe we can find some easier (at least for me) representation. If this is an array, maybe arrange entries in lines
array[]
+-------> element 1
+-------> element 2
+...
+-------> element N
or something similar. The above looks to me like things pointing to each other, or calling each other, or similar
First PR here, open to heavy criticism.
Adding vendor config set and fmt(fast mode task) config as first steps to fmt implementation. Fixes IPC error on fmt config due to no fmt implementation.