Linux Sound subsystem development
 help / color / mirror / Atom feed
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>
To: Richard Fitzgerald <rf@opensource.cirrus.com>,
	"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:55:44 +0200	[thread overview]
Message-ID: <74bb6575-7d92-43af-98fd-dd46a83b2fac@linux.dev> (raw)
In-Reply-To: <e326c51a-4690-44c4-bf3d-0870591b1eed@opensource.cirrus.com>


> 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.

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!










  reply	other threads:[~2026-07-01 11:57 UTC|newest]

Thread overview: 16+ 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-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 [this message]
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
2026-07-01 14:09                 ` Pierre-Louis Bossart
2026-07-01 14:59                   ` 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=74bb6575-7d92-43af-98fd-dd46a83b2fac@linux.dev \
    --to=pierre-louis.bossart@linux.dev \
    --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=rf@opensource.cirrus.com \
    --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