summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRicardo Rivera-Matos <rriveram@opensource.cirrus.com>2026-02-24 19:18:08 +0300
committerMark Brown <broonie@kernel.org>2026-03-02 02:48:40 +0300
commit17c6bf433742e0c1ff5ce175145877c0194e4a7a (patch)
tree51ad9e27a0305636202b6a20572a8bc7afa30778
parent4d80c0dbcda551b8b86ff14c6ae93026993970b2 (diff)
downloadlinux-17c6bf433742e0c1ff5ce175145877c0194e4a7a.tar.xz
ASoC: cs35l45: Hibernate wm_adsp on runtime suspend
When the CS35L45 driver suspends, it is put into hibernation, and the regmap goes into cache_only, but the firmware is still running, and wm_adsp is not stopped. If userspace attempts to read a firmware control, it will perform a regmap_raw_read() and this will produce an error in the kernel log. To prevent spurious errors, put the DSP into hibernation which prevents access to the hardware for the ALSA controls. Signed-off-by: Ricardo Rivera-Matos <rriveram@opensource.cirrus.com> Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Link: https://patch.msgid.link/20260224161821.93365-5-sbinding@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--sound/soc/codecs/cs35l45.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sound/soc/codecs/cs35l45.c b/sound/soc/codecs/cs35l45.c
index 7aa558d6362f..a032bb23b4ac 100644
--- a/sound/soc/codecs/cs35l45.c
+++ b/sound/soc/codecs/cs35l45.c
@@ -984,6 +984,7 @@ static int cs35l45_runtime_suspend(struct device *dev)
if (!cs35l45->dsp.preloaded || !cs35l45->dsp.cs_dsp.running)
return 0;
+ wm_adsp_hibernate(&cs35l45->dsp, true);
cs35l45_enter_hibernate(cs35l45);
regcache_cache_only(cs35l45->regmap, true);
@@ -1014,6 +1015,8 @@ static int cs35l45_runtime_resume(struct device *dev)
if (ret != 0)
dev_warn(cs35l45->dev, "regcache_sync failed: %d\n", ret);
+ wm_adsp_hibernate(&cs35l45->dsp, false);
+
/* Clear global error status */
regmap_clear_bits(cs35l45->regmap, CS35L45_ERROR_RELEASE, CS35L45_GLOBAL_ERR_RLS_MASK);
regmap_set_bits(cs35l45->regmap, CS35L45_ERROR_RELEASE, CS35L45_GLOBAL_ERR_RLS_MASK);