All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/8] ASoC: SOF: power optimizations for HDaudio platforms
@ 2021-06-10 20:53 Pierre-Louis Bossart
  2021-06-10 20:53 ` [PATCH 1/8] ASoC: SOF: Intel: Kconfig: clarify DMI L1 option description Pierre-Louis Bossart
                   ` (8 more replies)
  0 siblings, 9 replies; 21+ messages in thread
From: Pierre-Louis Bossart @ 2021-06-10 20:53 UTC (permalink / raw)
  To: alsa-devel; +Cc: tiwai, broonie, Pierre-Louis Bossart

This patchset provides two optimizations that result in significant power
savings on Intel HDAudio platforms using SOF (Sound Open Firmware).

a) We previously prevented the Intel DSP from enabling the DMI_L1
capability to work-around issues with pause on capture streams. It
turns out that this also prevented the platform from entering high C
states in full-duplex usages such as videoconferencing - a rather
basic use case since the start of the pandemic. The support for
pause_push/release was already a bit controversial for Intel
platforms, in theory platforms should only enable PAUSE if they can
resume on the same sample, which is not the case on any Intel
platform. Since we didn't want to disable a capability that could
impact existing users, the suggestion is to optionally disable
pause_push/release at build time or via a kernel parameter, in which
case DMI_L1 is enabled. In practice very few applications make use of
pause_push/release so there should be a limited impact when disabling
this ALSA capability.

b) The use of the SPIB register also helps reduce power consumption,
though to a smaller degree than DMI_L1. This hardware capability is
however incompatible with userspace-initiated rewinds typically used
by PulseAudio. In the past (2015..2017) Intel suggested an API
extension to let applications disable rewinds. At the time the
feedback was that such a capability was too Intel-specific and SPIB
remained unused except for loading DSP code. We now see devices with
smaller batteries being released, and it's time to revisit Linux
support for SPIB to extend battery life. In this update the rewinds
are disabled either at build-time or via a kernel parameter. As
suggested by Takashi, a new SDNDRV_PCM_INFO flag is needed though to
make sure the appl_ptr value is provided to the driver through the
.ack callback. Distributions using PipeWire (Fedora34) and CRAS
(ChromeOS/Chromium) can safely enable this option. Distributions using
PulseAudio should probably avoid enabling it, although nothing is
really fundamentally broken if they do. While in theory volume updates
and mixing of notifications could be delayed, in practice
distributions use small ring buffers that make such delays difficult
to notice.

Again both of these updates are opt-in to avoid any impact on existing
solutions or users: someone updating their kernel source but using
'make olddefconfig' will see the same results. Distributions that care
neither about pause_push/release or rewinds should enable both
options, in case of issues users will still be able to override
these build-time choices with a simple module parameter.

Pierre-Louis Bossart (6):
  ASoC: SOF: Intel: Kconfig: clarify DMI L1 option description
  ASoC: SOF: Intel: simplify logic for DMI_L1 handling
  ASoC: SOF: pcm: add mechanisms to disable ALSA pause_push/release
  ASoC: SOF: Intel: add kernel parameter to set DMI L1 configuration
  ASoC: SOF: Intel: enable DMI L1 when pause is not supported
  ALSA: pcm: conditionally avoid mmap of control data

Ranjani Sridharan (2):
  ASOC: SOF: pcm: add .ack callback support
  ASoC: SOF: Intel: add .ack support for HDaudio platforms

 include/sound/hdaudio_ext.h      |  5 ++-
 include/uapi/sound/asound.h      |  1 +
 sound/core/pcm_native.c          | 17 ++++++++
 sound/soc/sof/Kconfig            |  9 ++++
 sound/soc/sof/intel/Kconfig      | 14 +++---
 sound/soc/sof/intel/apl.c        |  1 +
 sound/soc/sof/intel/cnl.c        |  1 +
 sound/soc/sof/intel/hda-pcm.c    | 74 ++++++++++++++++++++++++++++++--
 sound/soc/sof/intel/hda-stream.c | 13 +++---
 sound/soc/sof/intel/hda.h        |  1 +
 sound/soc/sof/intel/tgl.c        |  1 +
 sound/soc/sof/ops.h              | 10 +++++
 sound/soc/sof/pcm.c              | 16 +++++++
 sound/soc/sof/sof-priv.h         |  3 ++
 14 files changed, 148 insertions(+), 18 deletions(-)

-- 
2.25.1


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

end of thread, other threads:[~2021-07-13 12:40 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-10 20:53 [PATCH 0/8] ASoC: SOF: power optimizations for HDaudio platforms Pierre-Louis Bossart
2021-06-10 20:53 ` [PATCH 1/8] ASoC: SOF: Intel: Kconfig: clarify DMI L1 option description Pierre-Louis Bossart
2021-06-10 20:53 ` [PATCH 2/8] ASoC: SOF: Intel: simplify logic for DMI_L1 handling Pierre-Louis Bossart
2021-06-10 20:53 ` [PATCH 3/8] ASoC: SOF: pcm: add mechanisms to disable ALSA pause_push/release Pierre-Louis Bossart
2021-06-10 20:53 ` [PATCH 4/8] ASoC: SOF: Intel: add kernel parameter to set DMI L1 configuration Pierre-Louis Bossart
2021-06-10 20:53 ` [PATCH 5/8] ASoC: SOF: Intel: enable DMI L1 when pause is not supported Pierre-Louis Bossart
2021-06-10 20:53 ` [PATCH 6/8] ALSA: pcm: conditionally avoid mmap of control data Pierre-Louis Bossart
2021-06-13  7:28   ` Takashi Iwai
2021-07-12 20:56     ` Pierre-Louis Bossart
2021-07-13  6:17       ` Takashi Iwai
2021-07-13 12:39         ` Pierre-Louis Bossart
2021-06-10 20:53 ` [PATCH 7/8] ASOC: SOF: pcm: add .ack callback support Pierre-Louis Bossart
2021-06-10 20:53 ` [PATCH 8/8] ASoC: SOF: Intel: add .ack support for HDaudio platforms Pierre-Louis Bossart
2021-06-13  7:29   ` Takashi Iwai
2021-07-12 21:30     ` Pierre-Louis Bossart
2021-06-11  7:58 ` [PATCH 0/8] ASoC: SOF: power optimizations " Takashi Iwai
2021-06-11  9:02   ` Jaroslav Kysela
2021-06-11 14:32     ` Pierre-Louis Bossart
2021-06-11 15:37       ` Jaroslav Kysela
2021-06-11 16:30         ` Pierre-Louis Bossart
2021-06-13  7:25           ` Takashi Iwai

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.