Skip to content

soundwire: intel: Move suspend tracking from trigger to pm suspend#5711

Open
ujfalusi wants to merge 1 commit intothesofproject:topic/sof-devfrom
ujfalusi:peter/sof/pr/sndw_suspended
Open

soundwire: intel: Move suspend tracking from trigger to pm suspend#5711
ujfalusi wants to merge 1 commit intothesofproject:topic/sof-devfrom
ujfalusi:peter/sof/pr/sndw_suspended

Conversation

@ujfalusi
Copy link
Copy Markdown
Collaborator

Mark all open DAI runtimes as suspended in the component .suspend callback instead of relying on SNDRV_PCM_TRIGGER_SUSPEND, which is not delivered during PAUSE or xrun states.

If during system suspend a dai is open it means that it is in either in SUSPENDED, PAUSED or STOPPED (due to xrun) state and they will need to be re-initialized during resume (which is done in .prepare callback).

Mark all open DAI runtimes as suspended in the component .suspend
callback instead of relying on SNDRV_PCM_TRIGGER_SUSPEND, which is
not delivered during PAUSE or xrun states.

If during system suspend a dai is open it means that it is in either in
SUSPENDED, PAUSED or STOPPED  (due to xrun) state and they will need to be
re-initialized during resume (which is done in .prepare callback).

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Copilot AI review requested due to automatic review settings March 27, 2026 15:31
@ujfalusi ujfalusi requested a review from shumingfan as a code owner March 27, 2026 15:31
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates SoundWire Intel ASoC DAI suspend tracking to no longer rely on SNDRV_PCM_TRIGGER_SUSPEND (which may be skipped for PAUSE/xrun scenarios), and instead marks open DAI runtimes as suspended from the component-level .suspend callback so resume reinitialization can consistently occur via .prepare().

Changes:

  • Remove SNDRV_PCM_TRIGGER_SUSPEND handling from the DAI .trigger() path.
  • Mark all open DAI runtimes as suspended = true during component suspend (new in intel_ace2x.c, simplified in intel.c).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
drivers/soundwire/intel_ace2x.c Adds component .suspend callback to mark all open DAI runtimes suspended; removes trigger-based suspend tracking.
drivers/soundwire/intel.c Removes trigger-based suspend tracking and simplifies component suspend logic to mark all open DAI runtimes suspended.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants