]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
ASoC: codecs: wm_adsp: Allow wm_adsp to hibernate without stopping DSP
authorStefan Binding <sbinding@opensource.cirrus.com>
Tue, 24 Feb 2026 16:18:06 +0000 (16:18 +0000)
committerMark Brown <broonie@kernel.org>
Sun, 1 Mar 2026 23:48:38 +0000 (23:48 +0000)
Some parts do not stop the DSP core before runtime suspend, however,
this leaves the DSP controls enabled and accessible whilst the part is
suspended and the regmap is cache_only.

Add new APIs to allow for the DSP to hibernate when the part is
suspended, and the DSP is not shut down.

Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com>
Reviewed-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://patch.msgid.link/20260224161821.93365-3-sbinding@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/wm_adsp.c
sound/soc/codecs/wm_adsp.h

index 2e23848e1dce942e974867da571f3209d38dad29..d95b54275b5ecaccf84294bb36da75549205da23 100644 (file)
@@ -1100,6 +1100,12 @@ void wm_adsp_stop(struct wm_adsp *dsp)
 }
 EXPORT_SYMBOL_GPL(wm_adsp_stop);
 
+void wm_adsp_hibernate(struct wm_adsp *dsp, bool hibernate)
+{
+       cs_dsp_hibernate(&dsp->cs_dsp, hibernate);
+}
+EXPORT_SYMBOL_GPL(wm_adsp_hibernate);
+
 int wm_adsp_event(struct snd_soc_dapm_widget *w,
                  struct snd_kcontrol *kcontrol, int event)
 {
index 8035fda71f8db45bc9df7cb552c161b26b1b3d75..a9118be793d7923bb5af18ff950618397278ebef 100644 (file)
@@ -103,6 +103,7 @@ irqreturn_t wm_halo_wdt_expire(int irq, void *data);
 
 int wm_adsp_run(struct wm_adsp *dsp);
 void wm_adsp_stop(struct wm_adsp *dsp);
+void wm_adsp_hibernate(struct wm_adsp *dsp, bool hibernate);
 int wm_adsp_event(struct snd_soc_dapm_widget *w,
                  struct snd_kcontrol *kcontrol, int event);