mbox series

[RFC,v2,0/6] adapt SOF to use snd-hda-codec-hdmi

Message ID 20190906142909.770-1-kai.vehmanen@linux.intel.com (mailing list archive)
Headers show
Series adapt SOF to use snd-hda-codec-hdmi | expand

Message

Kai Vehmanen Sept. 6, 2019, 2:29 p.m. UTC
Hi all,
here's a second RFC round for this series that adapts SOF (and one
example machine driver) to use snd-hda-codec-hdmi (patch_hdmi.c) codec
driver instead of hdac_hdmi (soc/codecs/hdac_hdmi.c). The primary goal
is to unify the HDMI codec implementation between DSP and non-DSP HDA
configurations, offer same interface to user-space and reduce
maintenance load for all.

If the approach looks ok, I'll remove RFC from v3 and update
the remaining machine drivers (this v2 still changes only one machine
driver and thus the RFC tag).

v2 changes:
- Codec selection via module parameter. Concerns were raised that a Kconfig
  option will not be sufficient as the patch changes user-space mixer
  controls. Distro kernels will want to use same kernel config for all
  platforms and a kconfig control would apply to all drivers.

  To address this, a combination of a module parameter, and a default
  value set via kconfig, was added to the patchset. This allows distros
  to support different combinations with a single kernel build. To switch
  codecs for a specific machine, UCM file update can be deployed together
  with a change to modprobe parameter. This is somewhat complicated, so
  further feedback is very welcome whether this is enough.

- In machine drivers that are shared with SST and SOF, added
  runtime detection for which codec is used. For SST, the old hdac-hdmi
  is always used.

- One patch dropped from series. This patch is no longer needed (pcm
  handles now passed to codec driver).

Feature and testing info:

 - Tested on multiple Intel platforms supported by SOF.
 - Tested with ALSA console tools as well as with Pulseaudio.
      - requires Pulseaudio 12.x or newer, see
        https://lists.freedesktop.org/archives/pulseaudio-discuss/2019-August/031358.html
 - HDMI, DP, DP-MST with multi-monitor use-scenarios work ok.
 - New feature for SOF: ELD /proc fs works just like in
   DSP-less mode.
 - New feature for SOF: jack detection works out-of-the-box
   with Pulseaudio (no need for card specific UCM for HDMI)
 - Pre-reviews at:
   https://github.com/thesofproject/linux/pull/1155

Kai Vehmanen (6):
  ALSA: hda - add mst_no_extra_pcms flag to hda_codec
  ASoC: Intel: skl-hda-dsp-generic: use snd-hda-codec-hdmi
  ASoC: hdac_hda: add support for HDMI/DP as a HDA codec
  ALSA: hda/hdmi - implement mst_no_extra_pcms flag
  ALSA: hda/hdmi - allow control creation without a linked pcm
  ASoC: SOF: Intel: add support for snd-hda-codec-hdmi

 include/sound/hda_codec.h                    |  1 +
 sound/pci/hda/patch_hdmi.c                   | 23 +++--
 sound/soc/codecs/hdac_hda.c                  | 95 +++++++++++++++++---
 sound/soc/codecs/hdac_hda.h                  | 12 ++-
 sound/soc/intel/boards/skl_hda_dsp_common.c  | 28 +++++-
 sound/soc/intel/boards/skl_hda_dsp_common.h  | 69 ++++++++++++++
 sound/soc/intel/boards/skl_hda_dsp_generic.c |  7 --
 sound/soc/sof/intel/Kconfig                  | 10 +++
 sound/soc/sof/intel/hda-codec.c              | 14 ++-
 sound/soc/sof/intel/hda.h                    |  6 +-
 10 files changed, 231 insertions(+), 34 deletions(-)