diff options
| author | Stefan Binding <sbinding@opensource.cirrus.com> | 2026-02-24 19:18:05 +0300 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2026-03-02 02:48:37 +0300 |
| commit | 73942a6ea26bd7e02b7c260b8b7aa942397be894 (patch) | |
| tree | 18c97db82011ac475bc2e718d0fa0cdf477b505b /include/linux | |
| parent | 11439c4635edd669ae435eec308f4ab8a0804808 (diff) | |
| download | linux-73942a6ea26bd7e02b7c260b8b7aa942397be894.tar.xz | |
firmware: cs_dsp: Add API to hibernate the DSP
For some parts, the DSP is kept running when in low power mode
(hibernation), leaving the firmware ALSA controls enabled, but the
registers are inaccessible. Attempts to access volatile firmware
controls whilst in this state would produce errors in the kernel log
due to a regmap_raw_read() into DSP registers whilst the regmap is in
cache_only.
To remove this error log, add a hibernating flag to indicate that the
controls are inaccessible, so we no longer try to read or write to the
registers whilst the regmap is in cache_only.
This would still produce an error when trying to read or write to these
controls, but this would be a different error (-EPERM instead of
-EBUSY), and would not produce a spurious error log in the kernel.
Upon wake from hibernation, the control caches are re-synced to the
hardware, if the DSP is running.
Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com>
Link: https://patch.msgid.link/20260224161821.93365-2-sbinding@opensource.cirrus.com
Reviewed-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/firmware/cirrus/cs_dsp.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/firmware/cirrus/cs_dsp.h b/include/linux/firmware/cirrus/cs_dsp.h index 0ec1cdc5585d..4e3baa557068 100644 --- a/include/linux/firmware/cirrus/cs_dsp.h +++ b/include/linux/firmware/cirrus/cs_dsp.h @@ -179,6 +179,7 @@ struct cs_dsp { bool booted; bool running; + bool hibernating; struct list_head ctl_list; @@ -354,4 +355,6 @@ int cs_dsp_chunk_write(struct cs_dsp_chunk *ch, int nbits, u32 val); int cs_dsp_chunk_flush(struct cs_dsp_chunk *ch); int cs_dsp_chunk_read(struct cs_dsp_chunk *ch, int nbits); +void cs_dsp_hibernate(struct cs_dsp *dsp, bool hibernating); + #endif |
