mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Richard Fitzgerald <rf@opensource.cirrus.com>
To: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>,
	"Liao, Bard" <bard.liao@intel.com>,
	Bard Liao <yung-chuan.liao@linux.intel.com>,
	"linux-sound@vger.kernel.org" <linux-sound@vger.kernel.org>,
	"vkoul@kernel.org" <vkoul@kernel.org>
Cc: "vinod.koul@linaro.org" <vinod.koul@linaro.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"peter.ujfalusi@linux.intel.com" <peter.ujfalusi@linux.intel.com>,
	Richard Fitzgerald <Richard.Fitzgerald@cirrus.com>
Subject: Re: [PATCH 2/2] soundwire: Intel: stop sdw clock in system suspend
Date: Wed, 1 Jul 2026 13:15:15 +0100	[thread overview]
Message-ID: <f895956a-a5fb-4b52-813c-110dfce8549d@opensource.cirrus.com> (raw)
In-Reply-To: <74bb6575-7d92-43af-98fd-dd46a83b2fac@linux.dev>

On 01/07/2026 12:55 pm, Pierre-Louis Bossart wrote:
> 
>> If the Manager doesn't send a clock-stop, the peripherals don't get a
>> notification that they can enter a lower-power mode. The clock suddenly
>> disappears without warning and without the peripherals being notified
>> why, so they don't have any information to know what is happening.
> 
> that's not quite right, see below.
> 
>> The Manager should send a clock-stop notification before stopping the
>> clock.
> 
> That's exactly the existing logic in drivers/soundwire/bus.c, the core does notify all peripheral drivers of a clock stop transition.
>

It's been observed with logic analyzer captures on real hardware
that the clock stop is only being sent in runtime suspends, not
system suspends.

Because of this, if the bus was in a runtime-resumed state when
system suspend started the clock would stop without warning.

Bard - that's the observed behavior this patch is fixing, right?

> sdw_slave_clk_stop_callback(slave, SDW_CLK_PRE_PREPARE);
> sdw_slave_clk_stop_callback(slave, SDW_CLK_POST_PREPARE);
> 
> These pre- and post callback that can be used by the peripheral for imp-def actions.
> 
> I am not sure if the POST_PREPARE makes sense, since the clock is already stopped the peripheral cannot be programmed. IIRC it was added for symmetry.
> The PRE_PREPARE is most likely what you are looking for in the implementation of the drv->ops->clk_stop callback.
> 
> Hope this helps!
> 
> 
> 
> 
> 
> 
> 
> 
> 


  parent reply	other threads:[~2026-07-01 12:15 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-29 14:44 [PATCH 0/2] soundwire: bus: re-enable CLOCK_STOP_MODE1 support Bard Liao
2026-06-29 14:44 ` [PATCH 1/2] soundwire: bus: add CLOCK_STOP_MODE1 support back Bard Liao
2026-06-30  9:42   ` Pierre-Louis Bossart
2026-07-29 15:39   ` Richard Fitzgerald
2026-06-29 14:44 ` [PATCH 2/2] soundwire: Intel: stop sdw clock in system suspend Bard Liao
2026-06-30  9:33   ` Pierre-Louis Bossart
2026-06-30 10:35     ` Liao, Bard
2026-06-30 10:51       ` Richard Fitzgerald
2026-06-30 12:36         ` Pierre-Louis Bossart
2026-06-30 12:50           ` Richard Fitzgerald
2026-07-01 11:55             ` Pierre-Louis Bossart
2026-07-01 12:00               ` Pierre-Louis Bossart
2026-07-01 12:30                 ` Liao, Bard
2026-07-01 12:36                 ` Richard Fitzgerald
2026-07-01 12:15               ` Richard Fitzgerald [this message]
2026-07-01 14:09                 ` Pierre-Louis Bossart
2026-07-01 14:59                   ` Richard Fitzgerald
2026-07-02 10:09                     ` Pierre-Louis Bossart

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=f895956a-a5fb-4b52-813c-110dfce8549d@opensource.cirrus.com \
    --to=rf@opensource.cirrus.com \
    --cc=Richard.Fitzgerald@cirrus.com \
    --cc=bard.liao@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=peter.ujfalusi@linux.intel.com \
    --cc=pierre-louis.bossart@linux.dev \
    --cc=vinod.koul@linaro.org \
    --cc=vkoul@kernel.org \
    --cc=yung-chuan.liao@linux.intel.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®