Linux Sound subsystem development
 help / color / mirror / Atom feed
* [PATCH] soundwire: qcom: force runtime suspend across system sleep
@ 2026-11-12 10:47 Gopi Chandra Sekhar Reddy Kanala via B4 Relay
  2026-11-12 11:23 ` sashiko-bot
  0 siblings, 1 reply; 2+ messages in thread
From: Gopi Chandra Sekhar Reddy Kanala via B4 Relay @ 2026-11-12 10:47 UTC (permalink / raw)
  To: Srinivas Kandagatla, Vinod Koul, Bard Liao, Pierre-Louis Bossart
  Cc: linux-sound, linux-arm-msm, linux-kernel,
	Gopi Chandra Sekhar Reddy Kanala

From: Gopi Chandra Sekhar Reddy Kanala <gopi.kanala@oss.qualcomm.com>

The controller only implements runtime PM callbacks and relies on
runtime suspend to stop the bus clock, gate hclk and arm the wake IRQ.
That is not enough across system suspend: from the prepare phase until
the complete phase the PM core holds a runtime PM usage count on every
device, so a controller that is runtime active at that point stays
active until the system resumes. This happens when suspend is entered
within the 3 second autosuspend delay after bus activity, or when a
peripheral driver resumes its device from its own system suspend
callback, as the SDCA class function driver does to quiesce its
interrupts.

The bus clock then keeps running and hclk stays enabled for the whole
suspend. On Qualcomm platforms the LPASS clock votes behind it are held
as well, which keeps CX and DDR from collapsing in s2idle.

Use pm_runtime_force_suspend() and pm_runtime_force_resume() as the
system sleep callbacks, so the runtime suspend path always runs at
system suspend and is undone on resume. Peripherals are children of the
bus, so they are suspended before the controller and resumed after it.

Signed-off-by: Gopi Chandra Sekhar Reddy Kanala <gopi.kanala@oss.qualcomm.com>
---
Tested on Glymur CRD (WSA884x speakers on two controllers) with
next-20261110. When s2idle is entered within the autosuspend delay
after playback, both controllers now stop the bus clock and gate hclk
during suspend, and playback works after resume.
---
 drivers/soundwire/qcom.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/soundwire/qcom.c b/drivers/soundwire/qcom.c
index a4cb62897192..6884ddbe69b3 100644
--- a/drivers/soundwire/qcom.c
+++ b/drivers/soundwire/qcom.c
@@ -1902,6 +1902,7 @@ static int __maybe_unused swrm_runtime_suspend(struct device *dev)
 }
 
 static const struct dev_pm_ops swrm_dev_pm_ops = {
+	SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume)
 	SET_RUNTIME_PM_OPS(swrm_runtime_suspend, swrm_runtime_resume, NULL)
 };
 

---
base-commit: 793807ca13bf3072fc6d16ce6d90e9ab9beff2a5
change-id: 20261112-qcom-swr-system-sleep-e42144d69ecb

Best regards,
-- 
Gopi Chandra Sekhar Reddy Kanala <gopi.kanala@oss.qualcomm.com>



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-11-12 11:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-12 10:47 [PATCH] soundwire: qcom: force runtime suspend across system sleep Gopi Chandra Sekhar Reddy Kanala via B4 Relay
2026-11-12 11:23 ` sashiko-bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox