]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
firmware: cs_dsp: Add API to hibernate the DSP
authorStefan Binding <sbinding@opensource.cirrus.com>
Tue, 24 Feb 2026 16:18:05 +0000 (16:18 +0000)
committerMark Brown <broonie@kernel.org>
Sun, 1 Mar 2026 23:48:37 +0000 (23:48 +0000)
commit73942a6ea26bd7e02b7c260b8b7aa942397be894
tree18c97db82011ac475bc2e718d0fa0cdf477b505b
parent11439c4635edd669ae435eec308f4ab8a0804808
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>
drivers/firmware/cirrus/cs_dsp.c
include/linux/firmware/cirrus/cs_dsp.h