[PATCH 00/21] ASoC: SOF: Intel: HDA: refactor codec and multi-link suport

Pierre-Louis Bossart pierre-louis.bossart at linux.intel.com
Thu Oct 27 21:35:19 CEST 2022


Existing HDaudio controllers expose an HDAudio DMA which is used to
interface with HDaudio codecs. All other interfaces supported by Intel
(SoundWire, SSP, DMIC) rely for data transfers on another GP-DMA
managed by the DSP firmware - the HDaudio DMA is only used for
memory-to-DSP transfers.

New HDaudio extensions will enable the use of this HDaudio DMA for all
of SoundWire, SSP, DMIC. These extensions will be backwards-compatible
for HDaudio and iDISP codecs, but will require new programming
sequences and DAI callbacks for SoundWire, SSP and DMIC.

Before we add support for 'extended audio links' and the programming
sequences for the DMA, we need to refactor the code. All HDaudio codec
support needs to be well identified in a separate file, and likewise
all the 'multi-link' handling needs to be better split.

This patchset removes a number of 'old' Kconfig dependencies and
options, adds helpers with a fallback to remove IS_ENABLED checks in
the code and tries to simplify programming sequences when possible.

One indirect benefit from this refactoring is that developers can
switch with a kernel parameter from HDaudio support to a variant of
'nocodec' support. This proves extremely useful to test on existing
Intel RVPs and Up boards, where the same build can be used to check 3
interfaces (HDaudio, SSP, DMIC) by just removing modules, setting the
kernel parameter and reloading modules.

Pierre-Louis Bossart (21):
  ASoC: SOF: Intel: remove option to disable the common_hdmi handling
  ASoC: SOF: Intel: remove all dependencies on SND_SOC_HDAC_HDMI
  ASoC: SOF: Intel: hda-codec: simplify SND_SOC_SOF_HDA_AUDIO_CODEC
    handling
  ASoC: SOF: Intel: move codec state change to hda-codec.c
  ASoC: SOF: Intel: start moving multi-link handling in dedicated file
  ASoC: SOF: Intel: hda: add multi-link helper for LOSVID
  ASoC: SOF: Intel: move all RIRB/CMD_IO helpers to hda-codec.c
  ASoC: SOF: Intel: hda-ctrl: add codec wakeup helper
  ASoC: SOF: Intel: hda-codec: add hda_codec_device_remove() helper
  ASoC: SOF: Intel: hda-codec: add stop_cmd_io helper
  ASoC: SOF: Intel: hda-stream: always allocate CORB/RIRB buffer
  ASoC: SOF: Intel: hda-codec: add hda_codec_check_rirb_status() helper
  ASoC: SOF: Intel: hda-ctrl: use helper to clear RIRB status
  ASoC: SOF: Intel: hda-dsp: clarify dependencies on SND_SOC_SOF_HDA
  ASoC: SOF: Intel: hda-codec: add helpers to suspend and resume cmd_io
  ASoC: SOF: Intel: clarify bus_init and bus_exit sequences
  ASoC: SOF: Intel: hda-mlink: add helpers to suspend/resume links
  ASoC: SOF: Intel: add hda_bus_ml_free helper
  ASoC: SOF: Intel: hda: clarify Kconfig dependencies
  ASoC: SOF: Intel: hda-codec: use GPL-2.0-only license
  ASoC: SOF: introduce new DEBUG_NOCODEC mode

 sound/soc/sof/Kconfig            |  18 ++-
 sound/soc/sof/intel/Kconfig      |   2 +-
 sound/soc/sof/intel/Makefile     |   2 +-
 sound/soc/sof/intel/hda-bus.c    |  23 ++-
 sound/soc/sof/intel/hda-codec.c  | 252 +++++++++++++++++++++++++------
 sound/soc/sof/intel/hda-ctrl.c   |  63 ++------
 sound/soc/sof/intel/hda-dai.c    |  10 +-
 sound/soc/sof/intel/hda-dsp.c    |  44 ++----
 sound/soc/sof/intel/hda-mlink.c  |  89 +++++++++++
 sound/soc/sof/intel/hda-stream.c |  30 +---
 sound/soc/sof/intel/hda.c        |  62 ++------
 sound/soc/sof/intel/hda.h        |  63 ++++++--
 sound/soc/sof/sof-audio.c        |   5 +
 sound/soc/sof/sof-priv.h         |   3 +
 14 files changed, 438 insertions(+), 228 deletions(-)
 create mode 100644 sound/soc/sof/intel/hda-mlink.c

-- 
2.34.1



More information about the Alsa-devel mailing list