forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 132
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
ASoC: SOF: Fix suspend while paused corner case #5054
Closed
ujfalusi
wants to merge
8
commits into
thesofproject:topic/sof-dev
from
ujfalusi:peter/sof/pr/suspend-while-paused-fix-02
Closed
Changes from 1 commit
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
5a2443b
ASoC: SOF: Intel: hda-dai: Be really consistent with TRIGGER_SUSPEND …
ujfalusi 9a7c7ab
ASoC: SOF: Intel: hda-dai-ops: ipc4: Reset the paused counter on STOP…
ujfalusi 365cd78
ASoC: SOF: Add new optional suspend_early() dsp_ops callback function
ujfalusi 5b5897a
ASoC: SOF: Intel: hda: Switch to use the suspend_early callback from …
ujfalusi d897da6
ASoC: SOF: Remove unused set_hw_params_upon_resume callback
ujfalusi 09d8c8a
ASoC: SOF: sof-audio: Send STOP trigger to platforms during system su…
ujfalusi c3aa4bd
ASoC: SOF: ipc3-topology: Set the suspending flag for paused streams …
ujfalusi 5c6fa89
ASoC: SOF: ipc4: Use the suspending stream flag to handle paused stre…
ujfalusi 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 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.
what would be the behavior on resume then? The stream would restart? How can we keep the stream paused on resume?
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.
we cannot keep the streams paused, we don't support RESUME trigger, so all streams would be restarted anyways, paused or not paused.
In practice: on resume the audio will remain paused (will not run), but when you PAUSE_RELEASE it, then we will restart it. We need to re-initialize everything to get working audio.
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 will the audio remain paused if the pause_count remains zero? I don't understand how this counter is used.
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 counter is used internally to ipc4 (to track the individual pipeline states) , ALSA keeps track of the PCM state. On suspend we need to stop everything, so we can put the DSP to off.
So, when we suspend all pipelines will be reset.
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.
@ujfalusi this is too confusing. We increment the paused_count when we pause the stream. So lets assume this sequence:
Am I understanding this correctly?