alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [alsa-devel] [PATCH 00/26] ASoC: SOF: enable S0ix support for Intel platforms
@ 2019-10-25 22:40 Pierre-Louis Bossart
  2019-10-25 22:40 ` [alsa-devel] [PATCH 01/26] ASoC: SOF: add a field to store the current D0 substate of DSP Pierre-Louis Bossart
                   ` (25 more replies)
  0 siblings, 26 replies; 61+ messages in thread
From: Pierre-Louis Bossart @ 2019-10-25 22:40 UTC (permalink / raw)
  To: alsa-devel; +Cc: tiwai, broonie, Pierre-Louis Bossart

In S0ix (aka S0 Idle), the audio DSP can enter the D0i3 substate and
keep some of the pipelines and processing active for e.g. Hotwording
and other acoustic event detection while optimizing power
consumption. This patchset mainly adds flags and state machines to
track which streams may remain active (tagged as such in the topology
file), and keep them active when the ALSA core tries to suspend
everything.

The Intel specific parts are limited to the changes in the IPC, where
instead of using an SRAM window, the IPC commands needed to enter and
exit D0i3 are sent in a compressed form using IPC registers
themselves.

This patchset is made of 26 patches, which is rather large, but each
change is rather small and contained. The code was initially reviewed
on GitHub, with 165+ comments provided and no regressions found
[1]. The S0ix mode was tested on a CometLake platform.

Future improvements will consist in an additional idle detection so
that the D0i3 mode can be entered even on devices where S0ix is not
enabled.

[1] https://github.com/thesofproject/linux/pull/1337

Keyon Jie (26):
  ASoC: SOF: add a field to store the current D0 substate of DSP
  ASoC: SOF: reset default d0_substate at probe() and resume()
  ASoC: SOF: add set_power_state() to dsp_ops for power state update
  ASoC: SOF: Intel: hda-dsp: Add helper for setting DSP D0ix substate
  ASoC: SOF: Intel: CNL: add set_power_state() ops
  ASoC: SOF: Intel: APL: add set_power_state() ops
  ASoC: SOF: add flag to snd_sof_pcm_stream for D0i3 compatible stream
  ASoC: SOF: token: add tokens for PCM compatible with D0i3 substate
  ASoC: SOF: topology: parse and store d0i3_compatible flag
  ASoC: SOF: Intel: hda-dsp: align the comments for D0I3C update
  ASoC: SOF: Intel: HDA: use macro for register polling retry count
  ASoC: SOF: PM: rename sof_send_pm_ipc to sof_send_pm_ctx_ipc
  ASoC: SOF: ipc: introduce message for DSP power gating
  ASoC: SOF: Intel: hda-ipc: Don't read mailbox for PM_GATE reply
  ASoC: SOF: Intel: HDA: add cAVS specific compact IPC header file
  ASoC: SOF: configure D0ix IPC flags in set_power_state
  ASoC: SOF: PM: add helpers for setting D0 substate for ADSP
  ASoC: SOF: Intel: CNL: add support for sending compact IPC
  ASoC: SOF: add a flag to indicate the system suspend target
  ASoC: SOF: add a flag suspend_ignored for sof stream
  ASoC: SOF: PM: implement prepare/complete callbacks
  ASoC: SOF: ignore suspend/resume for D0ix compatible streams
  ASoC: SOF: Intel: hda-dsp: implement suspend/resume for S0ix<->S0
    transition
  ASoC: SOF: return -ENOTSUPP if D0I3 is not supported
  ASoC: SOF: PM: Add support for DSP D0i3 state when entering S0ix
  ASoC: SOF: pci: Add prepare/complete PM callbacks

 include/sound/sof/header.h      |  1 +
 include/sound/sof/pm.h          |  8 +++
 include/uapi/sound/sof/tokens.h |  4 ++
 sound/soc/sof/core.c            |  3 ++
 sound/soc/sof/intel/apl.c       |  1 +
 sound/soc/sof/intel/cnl.c       | 43 +++++++++++++--
 sound/soc/sof/intel/hda-dsp.c   | 91 +++++++++++++++++++++++++++++++
 sound/soc/sof/intel/hda-ipc.c   |  6 ++-
 sound/soc/sof/intel/hda-ipc.h   | 51 ++++++++++++++++++
 sound/soc/sof/intel/hda.h       | 12 +++++
 sound/soc/sof/ops.h             | 10 ++++
 sound/soc/sof/pcm.c             | 31 +++++++++++
 sound/soc/sof/pm.c              | 95 +++++++++++++++++++++++++++++++--
 sound/soc/sof/sof-pci-dev.c     |  2 +
 sound/soc/sof/sof-priv.h        | 23 ++++++++
 sound/soc/sof/topology.c        | 43 ++++++++++++++-
 16 files changed, 413 insertions(+), 11 deletions(-)
 create mode 100644 sound/soc/sof/intel/hda-ipc.h

-- 
2.20.1

_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply	[flat|nested] 61+ messages in thread

end of thread, other threads:[~2019-10-29 16:38 UTC | newest]

Thread overview: 61+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-25 22:40 [alsa-devel] [PATCH 00/26] ASoC: SOF: enable S0ix support for Intel platforms Pierre-Louis Bossart
2019-10-25 22:40 ` [alsa-devel] [PATCH 01/26] ASoC: SOF: add a field to store the current D0 substate of DSP Pierre-Louis Bossart
2019-10-28 14:56   ` [alsa-devel] Applied "ASoC: SOF: add a field to store the current D0 substate of DSP" to the asoc tree Mark Brown
2019-10-29 10:20   ` [alsa-devel] [PATCH 01/26] ASoC: SOF: add a field to store the current D0 substate of DSP Cezary Rojewski
2019-10-29 14:11     ` Pierre-Louis Bossart
2019-10-25 22:40 ` [alsa-devel] [PATCH 02/26] ASoC: SOF: reset default d0_substate at probe() and resume() Pierre-Louis Bossart
2019-10-28 14:56   ` [alsa-devel] Applied "ASoC: SOF: reset default d0_substate at probe() and resume()" to the asoc tree Mark Brown
2019-10-25 22:40 ` [alsa-devel] [PATCH 03/26] ASoC: SOF: add set_power_state() to dsp_ops for power state update Pierre-Louis Bossart
2019-10-28 14:56   ` [alsa-devel] Applied "ASoC: SOF: add set_power_state() to dsp_ops for power state update" to the asoc tree Mark Brown
2019-10-25 22:41 ` [alsa-devel] [PATCH 04/26] ASoC: SOF: Intel: hda-dsp: Add helper for setting DSP D0ix substate Pierre-Louis Bossart
2019-10-28 14:56   ` [alsa-devel] Applied "ASoC: SOF: Intel: hda-dsp: Add helper for setting DSP D0ix substate" to the asoc tree Mark Brown
2019-10-29 10:07   ` [alsa-devel] [PATCH 04/26] ASoC: SOF: Intel: hda-dsp: Add helper for setting DSP D0ix substate Cezary Rojewski
2019-10-29 16:37     ` Sridharan, Ranjani
2019-10-25 22:41 ` [alsa-devel] [PATCH 05/26] ASoC: SOF: Intel: CNL: add set_power_state() ops Pierre-Louis Bossart
2019-10-28 14:56   ` [alsa-devel] Applied "ASoC: SOF: Intel: CNL: add set_power_state() ops" to the asoc tree Mark Brown
2019-10-25 22:41 ` [alsa-devel] [PATCH 06/26] ASoC: SOF: Intel: APL: add set_power_state() ops Pierre-Louis Bossart
2019-10-28 14:56   ` [alsa-devel] Applied "ASoC: SOF: Intel: APL: add set_power_state() ops" to the asoc tree Mark Brown
2019-10-25 22:41 ` [alsa-devel] [PATCH 07/26] ASoC: SOF: add flag to snd_sof_pcm_stream for D0i3 compatible stream Pierre-Louis Bossart
2019-10-28 14:56   ` [alsa-devel] Applied "ASoC: SOF: add flag to snd_sof_pcm_stream for D0i3 compatible stream" to the asoc tree Mark Brown
2019-10-25 22:41 ` [alsa-devel] [PATCH 08/26] ASoC: SOF: token: add tokens for PCM compatible with D0i3 substate Pierre-Louis Bossart
2019-10-28 14:56   ` [alsa-devel] Applied "ASoC: SOF: token: add tokens for PCM compatible with D0i3 substate" to the asoc tree Mark Brown
2019-10-29 10:11   ` [alsa-devel] [PATCH 08/26] ASoC: SOF: token: add tokens for PCM compatible with D0i3 substate Cezary Rojewski
2019-10-29 14:13     ` Pierre-Louis Bossart
2019-10-25 22:41 ` [alsa-devel] [PATCH 09/26] ASoC: SOF: topology: parse and store d0i3_compatible flag Pierre-Louis Bossart
2019-10-28 14:56   ` [alsa-devel] Applied "ASoC: SOF: topology: parse and store d0i3_compatible flag" to the asoc tree Mark Brown
2019-10-25 22:41 ` [alsa-devel] [PATCH 10/26] ASoC: SOF: Intel: hda-dsp: align the comments for D0I3C update Pierre-Louis Bossart
2019-10-28 14:56   ` [alsa-devel] Applied "ASoC: SOF: Intel: hda-dsp: align the comments for D0I3C update" to the asoc tree Mark Brown
2019-10-25 22:41 ` [alsa-devel] [PATCH 11/26] ASoC: SOF: Intel: HDA: use macro for register polling retry count Pierre-Louis Bossart
2019-10-28 14:56   ` [alsa-devel] Applied "ASoC: SOF: Intel: HDA: use macro for register polling retry count" to the asoc tree Mark Brown
2019-10-25 22:41 ` [alsa-devel] [PATCH 12/26] ASoC: SOF: PM: rename sof_send_pm_ipc to sof_send_pm_ctx_ipc Pierre-Louis Bossart
2019-10-28 14:56   ` [alsa-devel] Applied "ASoC: SOF: PM: rename sof_send_pm_ipc to sof_send_pm_ctx_ipc" to the asoc tree Mark Brown
2019-10-25 22:41 ` [alsa-devel] [PATCH 13/26] ASoC: SOF: ipc: introduce message for DSP power gating Pierre-Louis Bossart
2019-10-28 14:56   ` [alsa-devel] Applied "ASoC: SOF: ipc: introduce message for DSP power gating" to the asoc tree Mark Brown
2019-10-25 22:41 ` [alsa-devel] [PATCH 14/26] ASoC: SOF: Intel: hda-ipc: Don't read mailbox for PM_GATE reply Pierre-Louis Bossart
2019-10-28 14:56   ` [alsa-devel] Applied "ASoC: SOF: Intel: hda-ipc: Don't read mailbox for PM_GATE reply" to the asoc tree Mark Brown
2019-10-25 22:41 ` [alsa-devel] [PATCH 15/26] ASoC: SOF: Intel: HDA: add cAVS specific compact IPC header file Pierre-Louis Bossart
2019-10-28 14:56   ` [alsa-devel] Applied "ASoC: SOF: Intel: HDA: add cAVS specific compact IPC header file" to the asoc tree Mark Brown
2019-10-25 22:41 ` [alsa-devel] [PATCH 16/26] ASoC: SOF: configure D0ix IPC flags in set_power_state Pierre-Louis Bossart
2019-10-28 14:56   ` [alsa-devel] Applied "ASoC: SOF: configure D0ix IPC flags in set_power_state" to the asoc tree Mark Brown
2019-10-29 10:37   ` [alsa-devel] [PATCH 16/26] ASoC: SOF: configure D0ix IPC flags in set_power_state Cezary Rojewski
2019-10-25 22:41 ` [alsa-devel] [PATCH 17/26] ASoC: SOF: PM: add helpers for setting D0 substate for ADSP Pierre-Louis Bossart
2019-10-28 14:56   ` [alsa-devel] Applied "ASoC: SOF: PM: add helpers for setting D0 substate for ADSP" to the asoc tree Mark Brown
2019-10-29 10:44   ` [alsa-devel] [PATCH 17/26] ASoC: SOF: PM: add helpers for setting D0 substate for ADSP Cezary Rojewski
2019-10-25 22:41 ` [alsa-devel] [PATCH 18/26] ASoC: SOF: Intel: CNL: add support for sending compact IPC Pierre-Louis Bossart
2019-10-28 14:56   ` [alsa-devel] Applied "ASoC: SOF: Intel: CNL: add support for sending compact IPC" to the asoc tree Mark Brown
2019-10-25 22:41 ` [alsa-devel] [PATCH 19/26] ASoC: SOF: add a flag to indicate the system suspend target Pierre-Louis Bossart
2019-10-28 14:56   ` [alsa-devel] Applied "ASoC: SOF: add a flag to indicate the system suspend target" to the asoc tree Mark Brown
2019-10-25 22:41 ` [alsa-devel] [PATCH 20/26] ASoC: SOF: add a flag suspend_ignored for sof stream Pierre-Louis Bossart
2019-10-28 14:56   ` [alsa-devel] Applied "ASoC: SOF: add a flag suspend_ignored for sof stream" to the asoc tree Mark Brown
2019-10-25 22:41 ` [alsa-devel] [PATCH 21/26] ASoC: SOF: PM: implement prepare/complete callbacks Pierre-Louis Bossart
2019-10-28 14:56   ` [alsa-devel] Applied "ASoC: SOF: PM: implement prepare/complete callbacks" to the asoc tree Mark Brown
2019-10-25 22:41 ` [alsa-devel] [PATCH 22/26] ASoC: SOF: ignore suspend/resume for D0ix compatible streams Pierre-Louis Bossart
2019-10-28 14:56   ` [alsa-devel] Applied "ASoC: SOF: ignore suspend/resume for D0ix compatible streams" to the asoc tree Mark Brown
2019-10-25 22:41 ` [alsa-devel] [PATCH 23/26] ASoC: SOF: Intel: hda-dsp: implement suspend/resume for S0ix<->S0 transition Pierre-Louis Bossart
2019-10-28 14:56   ` [alsa-devel] Applied "ASoC: SOF: Intel: hda-dsp: implement suspend/resume for S0ix<->S0 transition" to the asoc tree Mark Brown
2019-10-25 22:41 ` [alsa-devel] [PATCH 24/26] ASoC: SOF: return -ENOTSUPP if D0I3 is not supported Pierre-Louis Bossart
2019-10-28 14:56   ` [alsa-devel] Applied "ASoC: SOF: return -ENOTSUPP if D0I3 is not supported" to the asoc tree Mark Brown
2019-10-25 22:41 ` [alsa-devel] [PATCH 25/26] ASoC: SOF: PM: Add support for DSP D0i3 state when entering S0ix Pierre-Louis Bossart
2019-10-28 14:56   ` [alsa-devel] Applied "ASoC: SOF: PM: Add support for DSP D0i3 state when entering S0ix" to the asoc tree Mark Brown
2019-10-25 22:41 ` [alsa-devel] [PATCH 26/26] ASoC: SOF: pci: Add prepare/complete PM callbacks Pierre-Louis Bossart
2019-10-28 14:56   ` [alsa-devel] Applied "ASoC: SOF: pci: Add prepare/complete PM callbacks" to the asoc tree Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).