Repository navigation
topology2: Deep Buffer cleanups #8700
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
Merged
lgirdwood
merged 2 commits into
thesofproject:main
from
ujfalusi:peter/pr/tplg2_deepbuffer_cleanup_01
Jan 8, 2024
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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.
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.
I think this flag is controversial even for MTL. The intention of the D0i3_COMPATIBLE flag for a pcm was to ensure that while the stream is suspended by ALSA, it can still keep running the DSP. While this works for streams like wov, we have no idea how to do this for playback. So until we figure out how to do this, my vote would be to set this to false for all platforms or even better just remove it altogether for now. @plbossart @kv2019i what do you think?
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.
@ranj063 the D0i3 premise is that there's a contract between host and dsp that there will be no IPC or interaction in the immediate future, so the DSP can turn specific things off.
I am not sure what remains to be done for D0i3, we already have an idleness detection and in theory all we need to do is send the D0i3 IPC and set the D0i3 mode.
What are we missing to enable this mode? I don't fully follow the 'we have no idea how to do this' since it's been done before on other platforms.
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.
@plbossart what I was referring to was enabling S0ix playback. If we set a stream as D0i3 compatible and suspend the system to S0ix, the stream will get suspended by ALSA but can it really keep running in the DSP in this case? I suppose we have never tried 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.
@ranj063 I suggest we try walking before running. the first issue to solve is to see if we can detect 'idleness' in S0/D0i0 and transition to S0/D0i3 without any issues in audio rendering.
The S0i1 case is different, the host side will need to periodically refill buffers and that means applications need to keep on running. I am not sure this can be done either, but that's the second level of optimization.
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.
@plbossart my point is that the deep buffer stream with this flag set will not be able to resume from S0ix. We don't test this in our CI today, so we havent seen it fail.
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.
@ranj063, should then it be disabled? The DEEPBUFFER_D0I3_COMPATIBLE is applied to DeepBuffer PCMs and they are playback PCMs, so the flag is wrong and it is incorrectly enabled?