Linux Sound subsystem development
 help / color / mirror / Atom feed
From: Richard Fitzgerald <rf@opensource.cirrus.com>
To: "Liao, Bard" <bard.liao@intel.com>,
	Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>,
	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: Tue, 30 Jun 2026 11:51:44 +0100	[thread overview]
Message-ID: <520f67ca-941b-4e08-8985-03f0e09b0313@opensource.cirrus.com> (raw)
In-Reply-To: <SJ2PR11MB842410EE22537B0673173EECFFF72@SJ2PR11MB8424.namprd11.prod.outlook.com>

On 30/06/2026 11:35 am, Liao, Bard wrote:
> 
> 
>> -----Original Message-----
>> From: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>
>> Sent: Tuesday, June 30, 2026 5:33 PM
>> To: Bard Liao <yung-chuan.liao@linux.intel.com>; linux-
>> sound@vger.kernel.org; vkoul@kernel.org
>> Cc: vinod.koul@linaro.org; linux-kernel@vger.kernel.org;
>> peter.ujfalusi@linux.intel.com; Liao, Bard <bard.liao@intel.com>
>> Subject: Re: [PATCH 2/2] soundwire: Intel: stop sdw clock in system suspend
>>
>> On 6/29/26 16:44, Bard Liao wrote:
>>> There is no need to keep the SoundWire clock active in system suspend.
>>>
>>> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
>>> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
>>> ---
>>>   drivers/soundwire/intel_auxdevice.c | 3 ++-
>>>   1 file changed, 2 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/soundwire/intel_auxdevice.c
>> b/drivers/soundwire/intel_auxdevice.c
>>> index 0b8107bec9ab..10fd27f4fe39 100644
>>> --- a/drivers/soundwire/intel_auxdevice.c
>>> +++ b/drivers/soundwire/intel_auxdevice.c
>>> @@ -669,7 +669,8 @@ static int __maybe_unused intel_suspend(struct
>> device *dev)
>>>   		return 0;
>>>   	}
>>>
>>> -	ret = sdw_intel_stop_bus(sdw, false);
>>> +	/* No need to keep the SoundWire clock active in system suspend */
>>> +	ret = sdw_intel_stop_bus(sdw, true);
>>
>> erm, are you sure about this change?
>>
>> What this does is stop the SoundWire clock before entering system suspend.
>> Is this needed? The whole point of system suspend is that the host will stop
>> operating completely.

Not necessarily. There are multiple types of system suspend, like
suspend-to-RAM. The system doesn't always shut down.
Also depends on the OS: Android seems to use system suspend as a deep
sleep state.

> 
> Yes, that's what we need. The purpose is to inform the Peripheral to go
> into the deserved clock stop mode before system suspend.
> 
>> There is in theory no need to stop the clock because the clock restart capability
>> will not be used.

As Bard says, the peripherals should be informed that the clock will be
stopped. They at least should have the opportunity to act on that. And
they could still be powered across one of the lighter forms of system
suspend.

>> Think for example of jack detection, it's supported in pm_runtime suspend
>> with the SoundWire interrupt capability, but not in system suspend.
> 
> An example that we need clock stop1 in system suspend is to keep the amp's
> firmware in system suspend. In other words, we don't want to reload the
> firmware after system resume
> 
>> By changing the clock-stop argument to true, you are requesting the clock
>> stop mechanism to be enabled even though you don't need it.
>>
>> I do recall that in some generations it was actually not supported to turn off
>> power to the IP while the wake detector was enabled.
>>
>>>   	if (ret < 0) {
>>>   		dev_err(dev, "%s: cannot stop bus: %d\n", __func__, ret);
>>>   		return ret;
> 
> 


  reply	other threads:[~2026-06-30 10:52 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 [this message]
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
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=520f67ca-941b-4e08-8985-03f0e09b0313@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