From: Stefan Binding Date: Tue, 24 Feb 2026 16:18:07 +0000 (+0000) Subject: ASoC: cs35l41: Hibernate wm_adsp on runtime suspend X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4d80c0dbcda551b8b86ff14c6ae93026993970b2;p=thirdparty%2Flinux.git ASoC: cs35l41: Hibernate wm_adsp on runtime suspend When the CS35L41 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: Stefan Binding Link: https://patch.msgid.link/20260224161821.93365-4-sbinding@opensource.cirrus.com Signed-off-by: Mark Brown --- diff --git a/sound/soc/codecs/cs35l41.c b/sound/soc/codecs/cs35l41.c index ee56dfceedeb0..b2a076706c796 100644 --- a/sound/soc/codecs/cs35l41.c +++ b/sound/soc/codecs/cs35l41.c @@ -1404,6 +1404,7 @@ static int cs35l41_runtime_suspend(struct device *dev) if (!cs35l41->dsp.preloaded || !cs35l41->dsp.cs_dsp.running) return 0; + wm_adsp_hibernate(&cs35l41->dsp, true); cs35l41_enter_hibernate(dev, cs35l41->regmap, cs35l41->hw_cfg.bst_type); regcache_cache_only(cs35l41->regmap, true); @@ -1432,10 +1433,14 @@ static int cs35l41_runtime_resume(struct device *dev) cs35l41_test_key_unlock(cs35l41->dev, cs35l41->regmap); ret = regcache_sync(cs35l41->regmap); cs35l41_test_key_lock(cs35l41->dev, cs35l41->regmap); + + wm_adsp_hibernate(&cs35l41->dsp, false); + if (ret) { dev_err(cs35l41->dev, "Failed to restore register cache: %d\n", ret); return ret; } + cs35l41_init_boost(cs35l41->dev, cs35l41->regmap, &cs35l41->hw_cfg); return 0;