[PATCH] ASoC: mediatek: mt8188: Suspend the AFE across system sleep

From: Michał Kopeć

Date: Fri Oct 16 2026 - 12:24:23 EST


The AFE only has runtime PM callbacks. When a stream is open across
system suspend, the AFE stays runtime active, so its clocks stay enabled
and its register cache isn't marked dirty, while its power domain is
turned off in the noirq phase. On resume, the deferred card resume work
powers the DAPM widgets back up and writes the AFE registers, whose
clocks are off after the domain was power cycled. The write stalls the
bus and the system hangs.

Force the AFE into runtime suspend for system sleep, and back to its
previous state on resume, so that the domain sidebands, the clocks and
the register cache are restored before anything touches the AFE.

Fixes: bf106bf09376 ("ASoC: mediatek: mt8188: add platform driver")
Signed-off-by: Michał Kopeć <michal@nozomi.space>
---
sound/soc/mediatek/mt8188/mt8188-afe-pcm.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/sound/soc/mediatek/mt8188/mt8188-afe-pcm.c b/sound/soc/mediatek/mt8188/mt8188-afe-pcm.c
index 7b1f5d05f4d61..1710a9be2bcff 100644
--- a/sound/soc/mediatek/mt8188/mt8188-afe-pcm.c
+++ b/sound/soc/mediatek/mt8188/mt8188-afe-pcm.c
@@ -3379,6 +3379,7 @@ static const struct of_device_id mt8188_afe_pcm_dt_match[] = {
MODULE_DEVICE_TABLE(of, mt8188_afe_pcm_dt_match);

static const struct dev_pm_ops mt8188_afe_pm_ops = {
+ SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume)
RUNTIME_PM_OPS(mt8188_afe_runtime_suspend,
mt8188_afe_runtime_resume, NULL)
};
--
2.56.0