[PATCH v2] soundwire: qcom: disable the interrupt before gating the clock

From: Oleg Keri

Date: Fri Oct 09 2026 - 04:27:34 EST


swrm_runtime_suspend() gates hclk straight after the ClockStopNow
broadcast, while the interrupt thread that completed it is still
clearing the status and CLK_STOP_FINISHED is about to fire. Both touch
registers with the clock going away; on x1e80100 and glymur hclk is the
SoundWire clock itself. The next clock-stop exit then fails at random
(bus clash, parity errors, AUTO_ENUM_FAILED) and one side of the
speakers stays detached until reboot.

Disable the interrupt before gating the clock and enable it again once
the clock is back.

Fixes: 74e79da9fd46 ("soundwire: qcom: add runtime pm support")
Signed-off-by: Oleg Keri <okerixx@xxxxxxxxx>
---
v2: disable_irq() instead of synchronize_irq(), which left a window for
CLK_STOP_FINISHED; about one boot in four still hit it.

drivers/soundwire/qcom.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/drivers/soundwire/qcom.c b/drivers/soundwire/qcom.c
index 6e0c5fb10efa..147e55b7a600 100644
--- a/drivers/soundwire/qcom.c
+++ b/drivers/soundwire/qcom.c
@@ -1801,6 +1801,7 @@ static int __maybe_unused swrm_runtime_resume(struct device *dev)
}

clk_prepare_enable(ctrl->hclk);
+ enable_irq(ctrl->irq);

if (ctrl->clock_stop_not_supported) {
reinit_completion(&ctrl->enumeration);
@@ -1887,6 +1888,7 @@ static int __maybe_unused swrm_runtime_suspend(struct device *dev)
}
}

+ disable_irq(ctrl->irq);
clk_disable_unprepare(ctrl->hclk);

usleep_range(300, 305);
--
2.55.0