From: Shengjiu Wang <[email protected]>
After pm_runtime_enable() the AUDMIX hardware block is powered off and
remains suspended until the first runtime resume. Any register write
issued between probe() and the first resume (for example from DAPM or
ALSA control paths) would target unpowered hardware and be silently
lost.
Enable regmap cache-only mode immediately after pm_runtime_enable() so
that register accesses during this window go to the cache. The cached
values are flushed to hardware on the first runtime resume via
regcache_sync(), ensuring the hardware is programmed correctly when
power is restored.
Fixes: be1df61cf06ef ("ASoC: fsl: Add Audio Mixer CPU DAI driver")
Signed-off-by: Shengjiu Wang <[email protected]>
---
sound/soc/fsl/fsl_audmix.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/sound/soc/fsl/fsl_audmix.c b/sound/soc/fsl/fsl_audmix.c
index f819f33ec46b..0e6586a2ae69 100644
--- a/sound/soc/fsl/fsl_audmix.c
+++ b/sound/soc/fsl/fsl_audmix.c
@@ -488,6 +488,7 @@ static int fsl_audmix_probe(struct platform_device *pdev)
spin_lock_init(&priv->lock);
platform_set_drvdata(pdev, priv);
pm_runtime_enable(dev);
+ regcache_cache_only(priv->regmap, true);
ret = devm_snd_soc_register_component(dev, &fsl_audmix_component,
fsl_audmix_dai,
--
2.34.1