ASoC: SOF: Intel: HDA: refactor codec and multi-link suport
authorMark Brown <broonie@kernel.org>
Fri, 28 Oct 2022 18:52:20 +0000 (19:52 +0100)
committerMark Brown <broonie@kernel.org>
Fri, 28 Oct 2022 18:52:20 +0000 (19:52 +0100)
commitad850421cabdc558ebbf68aa62f0d6781e70a879
tree76a94dfeeeca68c210d74cb8e1ee44a6a6c4a700
parent3bcca3787bfc4859414d43bc0ffb754b9075eca6
parent4bd1adb85a09c249ddb4610e8412bf0f4484a371
ASoC: SOF: Intel: HDA: refactor codec and multi-link suport

Merge series from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>:

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.