-
Notifications
You must be signed in to change notification settings - Fork 349
IPC4: add support for generic bytes control and fix LARGE_CONFIG_GET for generic controls. #10235
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -996,6 +996,36 @@ static int ipc4_set_get_config_module_instance(struct ipc4_message_request *ipc4 | |
| return ret; | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. typos in commit:
|
||
| } | ||
|
|
||
| __cold static void ipc4_prepare_for_kcontrol_get(struct comp_dev *dev, uint8_t param_id, | ||
| char *data_out, uint32_t data_size) | ||
| { | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it's ok not to call |
||
| const char *hostbox; | ||
|
|
||
| #if CONFIG_LIBRARY | ||
| hostbox = (const char *)ipc_get()->comp_data + sizeof(struct ipc4_module_large_config); | ||
| #else | ||
| hostbox = (const char *)MAILBOX_HOSTBOX_BASE; | ||
| #endif | ||
|
|
||
| assert_can_be_cold(); | ||
|
|
||
| switch (param_id) { | ||
| case SOF_IPC4_SWITCH_CONTROL_PARAM_ID: | ||
| case SOF_IPC4_ENUM_CONTROL_PARAM_ID: | ||
| case SOF_IPC4_BYTES_CONTROL_PARAM_ID: | ||
| /* We have payload in hostbox */ | ||
| dcache_invalidate_region((__sparse_force void __sparse_cache *)MAILBOX_HOSTBOX_BASE, | ||
| data_size); | ||
|
|
||
| /* Copy the control payload header from inbox to outbox */ | ||
| memcpy_s(data_out, data_size, hostbox, | ||
| sizeof(struct sof_ipc4_control_msg_payload)); | ||
| break; | ||
| default: | ||
| break; | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. would we more often hit one of the three
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This will be highly topology dependent and we will only hit these where there is TDFB used (and it is used by user space as well) or we have sound dose enabled and actively used. During runtime we are likely not even receiving GET_LARGE_CONFIG messages at all. I cannot say which will be the most frequent use in the future. |
||
| } | ||
| } | ||
|
|
||
| __cold static int ipc4_get_vendor_config_module_instance(struct comp_dev *dev, | ||
| const struct comp_driver *drv, | ||
| bool init_block, | ||
|
|
@@ -1154,6 +1184,9 @@ __cold static int ipc4_get_large_config_module_instance(struct ipc4_message_requ | |
| #if CONFIG_LIBRARY | ||
| data += sizeof(reply); | ||
| #endif | ||
| ipc4_prepare_for_kcontrol_get(dev, config.extension.r.large_param_id, | ||
| data, data_offset); | ||
|
|
||
| ret = drv->ops.get_large_config(dev, config.extension.r.large_param_id, | ||
| config.extension.r.init_block, | ||
| config.extension.r.final_block, | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.