From: Richard Fitzgerald <rf@opensource.cirrus.com>
To: broonie@kernel.org
Cc: linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org,
patches@opensource.cirrus.com
Subject: Re: [PATCH] ASoC: soc-core: Create device_link to ensure correct suspend order
Date: Fri, 5 Jun 2026 09:55:07 +0100 [thread overview]
Message-ID: <84d162fc-2b0a-4aac-ad40-2203a277d82f@opensource.cirrus.com> (raw)
In-Reply-To: <20260601142835.282301-1-rf@opensource.cirrus.com>
On 01/06/2026 3:28 pm, Richard Fitzgerald wrote:
> In snd_soc_bind_card() create a device_link from card to all components
> to ensure correct order of system_suspend. The card is the consumer and
> the components are the supplier, so that the card will system_suspend
> before any of the components.
>
> The PM core will normally system_suspend drivers in the opposite order
> that they registered. This ensures children are suspended before their
> parents, for example users of a bus driver should suspend before the bus
> driver suspends.
>
> For ASoC, snd_soc_suspend() shuts down any active audio, which requires
> that the components are still able to communicate with their hardware.
> Previously there was nothing to ensure this ordering, because there is
> (usually) no relationship between a machine driver and component drivers.
> If the machine driver registered before the codec drivers, the codec
> drivers would be suspended before the machine driver snd_soc_suspend()
> runs, so that ASoC is attempting to stop audio on a driver that has
> already suspended.
>
> Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
> ---
> Mark,
> I think it would be ok to put this into -next and let it get some wider
> testing before it goes into 7.1 or older.
I was looking at the Sashiko review for this patch.
If Sashiko can be trusted, device_links seems to be thoroughly
booby-trapped.
Short summary seems to be: only safe way to use them is with the
STATELESS flag and do manual cleanup.
next prev parent reply other threads:[~2026-06-05 8:55 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-01 14:28 Richard Fitzgerald
2026-06-02 8:46 ` Charles Keepax
2026-06-02 13:31 ` Mark Brown
2026-06-02 13:34 ` Richard Fitzgerald
2026-06-02 13:46 ` Mark Brown
2026-06-02 13:55 ` Richard Fitzgerald
2026-06-02 14:52 ` Mark Brown
2026-06-05 8:55 ` Richard Fitzgerald [this message]
2026-06-05 16:32 ` Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=84d162fc-2b0a-4aac-ad40-2203a277d82f@opensource.cirrus.com \
--to=rf@opensource.cirrus.com \
--cc=broonie@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=patches@opensource.cirrus.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®