zephyr: fix gtw config size on D3 resume#10633
Open
wjablon1 wants to merge 2 commits intothesofproject:mainfrom
Open
zephyr: fix gtw config size on D3 resume#10633wjablon1 wants to merge 2 commits intothesofproject:mainfrom
wjablon1 wants to merge 2 commits intothesofproject:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes Zephyr DAI resume/config handling to ensure correct configuration sizing across D3 resume and to improve robustness when applying DAI configuration blobs vs structured IPC configs.
Changes:
- Fix D3 resume path to pass gateway config size in bytes (not words) into
dai_set_config(). - Introduce
SOF_DAI_CONFIG_HW_SPEC_OFFSETto separate common vs HW-specific portions ofsof_ipc_dai_config. - Adjust Zephyr DAI config setup to better handle config blobs and to pass only HW-specific payload size to
dai_config_set()for non-blob configs.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| zephyr/lib/cpu.c | Fixes DAI resume to compute the gateway config byte size before reapplying config after D3. |
| src/include/ipc/dai.h | Adds a macro for the offset to HW-specific config data within sof_ipc_dai_config. |
| src/audio/dai-zephyr.c | Updates Zephyr DAI config path to use common config fields and adjust payload size passed to Zephyr dai_config_set(). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Convert length of DAI gtw cfg from words to bytes before passing it to dai_set_config() during D3 resume. The same conversion is already performed during the initial configuration. Signed-off-by: Wojciech Jablonski <wojciech.jablonski@intel.com>
If a DAI config is passed as a blob (IPC4 case) to dai_set_config, it cannot be cast to sof_ipc_dai_config because the blob format might differ. This commit fixes this by using the format field of ipc_config_dai instead. Field options is set to 0 for the blob case. Additionally, this commit trims the size of a bespoke config for non-blob case after removing the common header. Signed-off-by: Wojciech Jablonski <wojciech.jablonski@intel.com>
a6a651c to
305d060
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I discovered these two issues while playing with AI: