Skip to content

ASoC: SOF: Support for on-demand DSP boot

Peter Ujfalusi linux-sound 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest8 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8ASoC: SOF: ipc4-loader: Remove redundant rpm resume_and_get from load_librarysound/soc/sof/ipc4-loader.c+1 -180 replies
2/8ASoC: SOF: control: skip rpm calls in ext_volatile_get if not implementedsound/soc/sof/control.c+6 -20 replies
3/8ASoC: SOF: Add support for on-demand DSP bootinclude/sound/sof.h sound/soc/sof/compress.c sound/soc/sof/control.c +7 more+149 -590 replies
4/8ASoC: SOF: sof-client: Add support for on-demand DSP bootsound/soc/sof/sof-client-ipc-flood-test.c sound/soc/sof/sof-client-ipc-kernel-injector.c sound/soc/sof/sof-client-ipc-msg-injector.c +3 more+45 -150 replies
5/8ASoC: SOF: Intel: hda-sdw-bpt: Add support for on-demand DSP bootsound/soc/sof/intel/hda-sdw-bpt.c+11 -00 replies
6/8ASoC: SOF: Intel: pci-lnl: Set on_demand_dsp_boot for LNLsound/soc/sof/intel/pci-lnl.c+1 -00 replies
7/8ASoC: SOF: Intel: pci-ptl: Set on_demand_dsp_boot for PTL and WCLsound/soc/sof/intel/pci-ptl.c+2 -00 replies
8/8ASoC: SOF: Intel: pci-nvl: Set on_demand_dsp_boot for NVL-Ssound/soc/sof/intel/pci-nvl.c+1 -00 replies

Reviews trailers per patch

All 8 patches have a Reviewed-by or Acked-by.

PatchBard LiaoKai VehmanenLiam GirdwoodRanjani Sridharan
1/8R-b R-b R-b
2/8R-b R-b R-b
3/8R-b R-b R-b
4/8R-b R-b R-b
5/8R-b R-b R-b
6/8R-b R-b R-b
7/8R-b R-b R-b
8/8R-b R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.

Read the v1 thread

Cover letter [PATCH 0/8] ASoC: SOF: Support for on-demand DSP boot

Hi,

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).

Regards,
Peter
---
Peter Ujfalusi (8):
ASoC: SOF: ipc4-loader: Remove redundant rpm resume_and_get from
load_library
ASoC: SOF: control: skip rpm calls in ext_volatile_get if not
implemented
ASoC: SOF: Add support for on-demand DSP boot
ASoC: SOF: sof-client: Add support for on-demand DSP boot
ASoC: SOF: Intel: hda-sdw-bpt: Add support for on-demand DSP boot
ASoC: SOF: Intel: pci-lnl: Set on_demand_dsp_boot for LNL
ASoC: SOF: Intel: pci-ptl: Set on_demand_dsp_boot for PTL and WCL
ASoC: SOF: Intel: pci-nvl: Set on_demand_dsp_boot for NVL-S

 include/sound/sof.h                           |   3 +
 sound/soc/sof/compress.c                      |   8 +
 sound/soc/sof/control.c                       |  13 +-
 sound/soc/sof/core.c                          |   1 +
 sound/soc/sof/debug.c                         |   7 +-
 sound/soc/sof/intel/hda-sdw-bpt.c             |  11 ++
 sound/soc/sof/intel/pci-lnl.c                 |   1 +
 sound/soc/sof/intel/pci-nvl.c                 |   1 +
 sound/soc/sof/intel/pci-ptl.c                 |   2 +
 sound/soc/sof/ipc3-dtrace.c                   |   7 +-
 sound/soc/sof/ipc4-loader.c                   |  19 +--
 sound/soc/sof/ipc4.c                          |  13 ++
 sound/soc/sof/pcm.c                           |  10 ++
 sound/soc/sof/pm.c                            | 149 +++++++++++-------
 sound/soc/sof/sof-client-ipc-flood-test.c     |   7 +-
 .../soc/sof/sof-client-ipc-kernel-injector.c  |   4 +-
 sound/soc/sof/sof-client-ipc-msg-injector.c   |  14 +-
 sound/soc/sof/sof-client-probes.c             |  26 ++-
 sound/soc/sof/sof-client.c                    |   6 +
 sound/soc/sof/sof-client.h                    |   3 +
 sound/soc/sof/sof-priv.h                      |   3 +
 21 files changed, 215 insertions(+), 93 deletions(-)
Signature · 1 line
2.52.0