]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
ASoC: SOF: Add support for on-demand DSP boot
authorPeter Ujfalusi <peter.ujfalusi@linux.intel.com>
Mon, 15 Dec 2025 13:29:41 +0000 (15:29 +0200)
committerMark Brown <broonie@kernel.org>
Mon, 15 Dec 2025 14:07:41 +0000 (23:07 +0900)
commitc3e1549811747e4b4ff7e4bba691980d9dab2d9e
tree6ee492dbc70fa03d0123fe84a994c168cb5e03fc
parent2c77ff200f59103ecdee60c00818a43cee38a6b8
ASoC: SOF: Add support for on-demand DSP boot

On system suspend / resume we always power up the DSP and boot the
firmware, which is not strictly needed as right after the firmware booted
up we power the DSP down again on suspend and we also power it down after
resume after some inactivity.

Out of caution, add a new platform descriptor flag to enable on-demand
DSP boot since this might not work without changes to platform code on
certain platforms.

With the on-demand dsp boot enabled we will not boot the DSP and firmware
up on system or rpm resume, just enable audio subsystem since audio IPs,
like HDA and SoundWire might be needed (codecs suspend/resume operation).
Only boot up the DSP during the first hw_params() call when the DSP is
really going to be needed.

In this way we can handle the audio related use cases:
normal audio use (rpm suspend/resume)
system suspend/resume without active audio
system suspend/resume with active audio
system suspend/resume without active audio, and audio start before the rpm
suspend timeout

Add module option to force the on-demand DSP boot to allow it to be
disabled or enabled without kernel change for testing.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com>
Link: https://patch.msgid.link/20251215132946.2155-4-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
include/sound/sof.h
sound/soc/sof/compress.c
sound/soc/sof/control.c
sound/soc/sof/core.c
sound/soc/sof/debug.c
sound/soc/sof/ipc3-dtrace.c
sound/soc/sof/ipc4.c
sound/soc/sof/pcm.c
sound/soc/sof/pm.c
sound/soc/sof/sof-priv.h