Repository navigation
Conversation
ujfalusi
requested review from
bardliao and
kv2019i
and
a balanced review from Copilot
November 26, 2026 15:25
There was a problem hiding this comment.
🟡 Changes recommended
Critical issues remain: retained backend pipelines can stay running with unbalanced counters, and STOP failure still permits unsafe RESET and teardown, risking firmware panic.
2 open issues
What changed in this PR
This fixup extends SOF’s Wake-on-Voice (WoV) suspend/resume handling to streams closed or re-prepared while suspended, aiming to prevent teardown of running firmware pipelines.
Changes:
- Clear
suspend_ignoredand issue STOP for prepared streams before cleanup. - Log STOP failures and preserve the error for return after cleanup.
| File | Description |
|---|---|
sound/soc/sof/pcm.c |
Add STOP handling for suspend-retained WoV streams in sof_pcm_stream_free(). |
Review effort: Balanced
| spcm_err(spcm, substream->stream, | ||
| "failed to stop the suspend ignored stream: %d\n", | ||
| ret); | ||
| err = ret; |
ujfalusi
marked this pull request as draft
November 26, 2026 16:02
ujfalusi
force-pushed
the
peter/sof/pr/woc-suspend-close
branch
from
November 27, 2026 06:33
ce6ff84 to
bce07ad
Compare
ujfalusi
marked this pull request as ready for review
November 27, 2026 06:34
Note for the squash: amend this to the "Fix WoV flow during system suspend / resume" commit. Extend its commit message with: If the application closes the stream while it is still SUSPENDED, ALSA does not send STOP to it, the pipeline started_count is never decremented, the pipeline RESET is skipped in hw_free and the firmware is asked to unbind running pipelines, which makes the DSP panic. In sof_pcm_stream_free() clear suspend_ignored and replay what was missed, in the order of a regular STOP: RESUME and STOP the BEs via dpcm_be_dai_trigger() (the BEs are in DPCM SUSPEND state while their pipeline and link DMA is still running, the BE pipeline is skipped by the FE trigger), then STOP the FE pipelines. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
There was a problem hiding this comment.
🟡 Changes recommended
Retained-BE cleanup can stop DMA still needed by another frontend or leave DMA running after prepare, requiring fixes to shared-user reference handling and retained-state cleanup.
3 open issues
1 resolved since last review
Review effort: Balanced
Comment on lines
+237
to
+239
| ret = dpcm_be_dai_trigger(fe, dir, SNDRV_PCM_TRIGGER_RESUME); | ||
| if (!ret) | ||
| ret = dpcm_be_dai_trigger(fe, dir, SNDRV_PCM_TRIGGER_STOP); |
Comment on lines
+237
to
+239
| ret = dpcm_be_dai_trigger(fe, dir, SNDRV_PCM_TRIGGER_RESUME); | ||
| if (!ret) | ||
| ret = dpcm_be_dai_trigger(fe, dir, SNDRV_PCM_TRIGGER_STOP); |
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.


Uh oh!
There was an error while loading. Please reload this page.