* [PATCH] soundwire: qcom: wait for the interrupt thread before gating the clock
@ 2026-10-07 19:33 Oleg Keri
0 siblings, 0 replies; only message in thread
From: Oleg Keri @ 2026-10-07 19:33 UTC (permalink / raw)
To: Srinivas Kandagatla, Vinod Koul
Cc: Bard Liao, Pierre-Louis Bossart, linux-arm-msm, linux-sound,
linux-kernel, Oleg Keri
A broadcast write returns as soon as the interrupt thread signals
SPECIAL_CMD_ID_FINISHED, while the thread still has to clear and re-read
the interrupt status. swrm_runtime_suspend() gates hclk right after the
ClockStopNow broadcast, so those accesses race against the clock being
removed; on x1e80100 and glymur hclk is the SoundWire clock itself. The
next clock-stop exit then fails at random: bus clash, parity errors
reported by the peripherals or AUTO_ENUM_FAILED, each leaving one side of
the speakers detached until reboot.
Wait for the interrupt thread to finish before gating the clock.
Fixes: 74e79da9fd46 ("soundwire: qcom: add runtime pm support")
Signed-off-by: Oleg Keri <okerixx@gmail.com>
---
drivers/soundwire/qcom.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/soundwire/qcom.c b/drivers/soundwire/qcom.c
index 6e0c5fb10efa..76f940f4eb31 100644
--- a/drivers/soundwire/qcom.c
+++ b/drivers/soundwire/qcom.c
@@ -1887,6 +1887,7 @@ static int __maybe_unused swrm_runtime_suspend(struct device *dev)
}
}
+ synchronize_irq(ctrl->irq);
clk_disable_unprepare(ctrl->hclk);
usleep_range(300, 305);
--
2.55.0
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-10-07 19:33 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-07 19:33 [PATCH] soundwire: qcom: wait for the interrupt thread before gating the clock Oleg Keri
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®