mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Richard Fitzgerald <rf@opensource.cirrus.com>
To: Charles Keepax <ckeepax@opensource.cirrus.com>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>,
	broonie@kernel.org, linux-sound@vger.kernel.org,
	linux-kernel@vger.kernel.org, patches@opensource.cirrus.com,
	Maxime Ripard <mripard@kernel.org>,
	Dave Stevenson <dave.stevenson@raspberrypi.com>,
	linux-rpi-kernel <linux-rpi-kernel@lists.infradead.org>,
	Florian Fainelli <florian.fainelli@broadcom.com>
Subject: Re: [PATCH v2] ASoC: soc-core: Create device_link to ensure correct suspend order
Date: Fri, 19 Jun 2026 17:04:51 +0100	[thread overview]
Message-ID: <91aede2a-d0b9-43ee-84db-ebc16881425f@opensource.cirrus.com> (raw)
In-Reply-To: <ajVmJ2N/sDKxVZx+@opensource.cirrus.com>

On 19/6/26 16:54, Charles Keepax wrote:
> On Fri, Jun 19, 2026 at 02:33:36PM +0100, Richard Fitzgerald wrote:
>> On 18/6/26 14:22, Marek Szyprowski wrote:
>>> On 18.06.2026 15:12, Richard Fitzgerald wrote:
>>>> On 18/6/26 13:58, Marek Szyprowski wrote:
>>>>> On 18.06.2026 13:22, Richard Fitzgerald wrote:
>>>>>> On 17/6/26 15:10, Marek Szyprowski wrote:
>>>>>>> On 11.06.2026 13:08, Richard Fitzgerald wrote:
>>>> Is the machine driver the parent of the codec driver?
>>>
>>> Yes, so this change fixes the issue:
>>
>> Right. I thought I'd tested that. But I haven't got any hardware that
>> uses that "for real", so obviously I messed up my testing there.
>>
>> It makes this whole device_link stuff less useful if you can't use it to
>> reorder a parent-child suspend order for when the parent-child
>> relationship isn't relevant to the order they should suspend.
> 
> Yeah it is pretty confusing situation if the machine driver
> is the parent of the codec. What is the correct order for
> things to suspend in that case? I feel like probably the parent
> child relation takes precedent, but generally not making codecs
> children of the machine driver seems prudent.
> 
>> If we skip entries that we can't re-order, is that simply adding
>> confusing complications and _mostly_ ASoC forces the correct order, but
>> in some cases it cannot and then it is up to those affected drivers to
>> figure it out themselves? Can we always guarantee that those drivers
>> will know which they are, or can it all break subtly because a driver
>> doesn't know that in some systems it becomes related to some other
>> driver?
> 
> I dunno still feels like this change is an improvement to me. The
> core DAPM powers down the path, it needs the codecs available to
> do that. You fix some subtle issues just not all of them.
> 
>> Mark - should we revert this because of too many corner cases in the
>> device_link code and go back to every codec driver with a system_suspend
>> installing its own device_link to ensure correct suspend order compared
>> to the machine driver?
> 
> If you go back to this you still have a situation where ASoC
> mostly does the right order it just took you more code to get
> there. Also I think you would need to install the link from the
> machine driver, since the codec driver could be used in
> situations where it is or isn't a child of the machine driver, as
> you noted earlier.
> 
> Personally I would vote for just skipping the case where the
> machine driver is a parent of the card.
> 
> Thanks,
> Charles

We're still in the merge window, so it's not something anyone should be
using on critical hardware or daily driver PCs. We can think about it
for a few days.

We could also deal with the case that card->dev ==
component->dev->parent, then give some time for more people to test and
see if anything else breaks.

  reply	other threads:[~2026-06-19 16:05 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-11 11:08 Richard Fitzgerald
2026-06-11 19:38 ` Mark Brown
     [not found] ` <CGME20260617141046eucas1p2e85629d57bfc17449b135b16f9230d57@eucas1p2.samsung.com>
2026-06-17 14:10   ` Marek Szyprowski
2026-06-18 11:22     ` Richard Fitzgerald
2026-06-18 12:58       ` Marek Szyprowski
2026-06-18 13:12         ` Marek Szyprowski
2026-06-18 13:12         ` Richard Fitzgerald
2026-06-18 13:22           ` Marek Szyprowski
2026-06-19 13:33             ` Richard Fitzgerald
2026-06-19 15:51               ` Mark Brown
2026-06-19 15:54               ` Charles Keepax
2026-06-19 16:04                 ` Richard Fitzgerald [this message]
2026-06-19 17:19                   ` Mark Brown
2026-06-20 15:57     ` Richard Fitzgerald
2026-06-22  7:07       ` Marek Szyprowski
2026-06-23 10:22         ` Richard Fitzgerald

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=91aede2a-d0b9-43ee-84db-ebc16881425f@opensource.cirrus.com \
    --to=rf@opensource.cirrus.com \
    --cc=broonie@kernel.org \
    --cc=ckeepax@opensource.cirrus.com \
    --cc=dave.stevenson@raspberrypi.com \
    --cc=florian.fainelli@broadcom.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rpi-kernel@lists.infradead.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=mripard@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®