From: Mark Brown Date: Tue, 16 Dec 2025 19:12:22 +0000 (+0000) Subject: ASoC: SOF: Support for on-demand DSP boot X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dab6b6f5fc5aabd3248bdea4d6e200a04b309fd2;p=thirdparty%2Fkernel%2Flinux.git ASoC: SOF: Support for on-demand DSP boot Merge series from Peter Ujfalusi : 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. Similarly, on jack insert/removal we needlesly boot up the firmware to check the jack status, which needs no DSP/firmware communication. The on-demand DSP boot will make sure that we boot the DSP firmware up only when it is needed - for audio activity, in other cases the firmware will be not booted up, which saves time. 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. The on-demand boot has been tested in our CI for more than half a year and so far no issues have been seen on supported platforms since it's introduction to our development tree (sof-dev). --- dab6b6f5fc5aabd3248bdea4d6e200a04b309fd2