Skip to content

ASoC: Intel: avs: PCM power management

Cezary Rojewski alsa-devel 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest9 patches 2 repliesIn review
  2. v39 patches 5 repliesSuperseded
  3. v29 patches 0 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v18 patches3 repliesSuperseded

Changes in v4 from the cover letter

- replaced readb_poll_timeout() with read_poll_timeout() for the DRSM polling function as the register is u32 wide, not u8

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/9ASoC: Intel: avs: Split pcm pages freeing operation from hw_free()sound/soc/intel/avs/pcm.c+10 -40 replies
2/9ASoC: Intel: avs: Introduce PCM power management routinesinclude/sound/hdaudio_ext.h sound/soc/intel/avs/pcm.c+215 -40 replies
3/9ALSA: hda: Introduce snd_hdac_stream_wait_drsm()include/sound/hdaudio.h sound/hda/hdac_stream.c+23 -01 reply
4/9ASoC: Intel: avs: Handle SUSPEND and RESUME triggerssound/soc/intel/avs/pcm.c+60 -150 replies
5/9ASoC: Intel: avs: Restart instead of resuming HDA capture streamssound/soc/intel/avs/pcm.c+28 -220 replies
6/9ASoC: Intel: avs: Count low power streamssound/soc/intel/avs/avs.h sound/soc/intel/avs/pcm.c+16 -00 replies
7/9ASoC: Intel: avs: Standby power-state supportsound/soc/intel/avs/avs.h sound/soc/intel/avs/core.c sound/soc/intel/avs/topology.c+85 -70 replies
8/9ASoC: Intel: avs: Power and clock gating policy overridingsound/soc/intel/avs/core.c+13 -90 replies
9/9ASoC: Intel: avs: Enact power gating policysound/soc/intel/avs/loader.c sound/soc/intel/avs/pcm.c+12 -00 replies

Reviews trailers per patch

1 of 9 patches has a Reviewed-by or Acked-by.

PatchTakashi Iwai
1/9
2/9
3/9R-b
4/9
5/9
6/9
7/9
8/9
9/9

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [PATCH v4 0/9] ASoC: Intel: avs: PCM power management

Goal of the series is implementation of suspend/resume operations for a PCM stream along with all the collaterals connected to the subject.

Start with splitting avs_dai_fe_hw_free() as ideally we would like to reuse as much of existing code as possible but snd_pcm_lib_free_pages() is not desired part of the function when speaking of suspend operation.

The actual implementation of suspend/resume() for component drivers follows. For most scenarios, the PM flow is similar to standard streaming one, except for the part where the position register are being saved and the lack of PCM pages freeing. To reduce code duplication, all avs_dai_suspend_XXX() and avs_dai_resume_XXX() functions reuse their non-PM equivalents.
Order of operations is affected by the fact that path binding/unbinding happens only in FE part of the stream.

Above essentially unlocks SX+streaming scenarios i.e.: power transitions with an ongoing stream.

As some streams are allowed to run in low power state, support is provided for S0iX state. The handlers check ACPI capabilities and the number of active low-power paths before deciding between SX and S0iX flows.

The last portion of the patchset is addition of power/clock gating overrides. There is no single set of registers that ensures AudioDSP firmware loads 100% of time on every single configuration. By having them exposed, user can have the loading procedure behavior adjusted for their configuration without having to recompile the kernel.

Changes in v4:
- replaced readb_poll_timeout() with read_poll_timeout() for the DRSM polling function as the register is u32 wide, not u8

Changes in v3:
- fixed unused-but-set-variable warnings reported by the test robot

Changes in v2:
- moved DRSM reg polling to separate function, snd_hdac_stream_wait_drsm() as suggested by Pierre
- moved the acpi_gbl_FADT under AVS_S0IX_SUPPORTED macro and relocated the checks from pcm.c to topology.c so that the low-power streams are filtered as early as possible
- fixed compilation when CONFIG_ACPI is disabled as reported by the test robot
- simplified all the avs_dai_resume/suspend_xxx() by moving ->ignore_suspend check one level up, to avs_component_pm_op() (patch 0002)

Amadeusz Sławiński (1):
ASoC: Intel: avs: Handle SUSPEND and RESUME triggers

Cezary Rojewski (7):
ASoC: Intel: avs: Split pcm pages freeing operation from hw_free()
ASoC: Intel: avs: Introduce PCM power management routines
ALSA: hda: Introduce snd_hdac_stream_wait_drsm()
ASoC: Intel: avs: Restart instead of resuming HDA capture streams
ASoC: Intel: avs: Count low power streams
ASoC: Intel: avs: Power and clock gating policy overriding
ASoC: Intel: avs: Enact power gating policy

Piotr Maziarz (1):
ASoC: Intel: avs: Standby power-state support

 include/sound/hdaudio.h        |   1 +
 include/sound/hdaudio_ext.h    |   5 +
 sound/hda/hdac_stream.c        |  22 ++
 sound/soc/intel/avs/avs.h      |   8 +
 sound/soc/intel/avs/core.c     |  97 +++++++--
 sound/soc/intel/avs/loader.c   |  10 +
 sound/soc/intel/avs/pcm.c      | 368 +++++++++++++++++++++++++++++----
 sound/soc/intel/avs/topology.c |  10 +
 8 files changed, 461 insertions(+), 60 deletions(-)
Signature · 1 line
2.25.1