[PATCH 0/8] ASoC: SOF: power optimizations for HDaudio platforms
Pierre-Louis Bossart
pierre-louis.bossart at linux.intel.com
Thu Jun 10 22:53:18 CEST 2021
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
More information about the Alsa-devel
mailing list