Skip to content

Enhance HDA support in SOF #990

@wenqingfu

Description

@wenqingfu

This is a meta issue to track the task of overhauling what has been done in Intel legacy HDA driver and HDAC library, to make sure they are in the right place so that SOF driver can share.

FYI list: @plbossart @libinyang @zhuyingjiang

Current task list, in rough priority order:

  • move to common HDMI codec and remove use of HDAC-HDMI ( [enhancement] Use snd-hda-codec-hdmi for SOF HDMI/DP support #1123 )
  • remove unnecessary ifdefs, low hanging (ASoC: SOF: Intel: hda: refine resume with init chip #1020 and related)
    - remove any clearly duplicated code paths where same code is replicated for HDA and non-HDA
  • forced codec mask to driver probe (ASoC: SOF: Intel: add codec_mask module parameter #1551)
  • refine HDA codec read/write functions in SOF (refine the code of read/write HDA registers  #941)
  • remove duplicated code blocks to call HDAC -> replace with a single function
    - many occurrences, for example to clear a link DMA allocation
  • use SOF utilities for register polling in SOF HDA code
    - many occurrences of this
  • review all SKL quirks in azx_bus_init() and make sure they are implemented in SOF
  • add logic to program LCTL in case clocks are not set up -> moved to HDA: LCTL manual setup #2715
    - patch "ALSA: hda - set intel audio clock to a proper value" in DSP legacy driver
  • rework soc/intel/ to work without built-time conditional code for CONFIG_SND_SOC_SOF_HDA
    - big ticket item, needs design-work to figure out best approach forward
    - figure out a better way to separate cases where HDAC is used versus I2S codec cases
    - now the number of #ifdefs within function bodies is too high in sof/intel/hda*.c leading to hard-to-understand and maintain code
  • robustness improvements to handle HDA codec error at probe
    - in current driver, if e.g. HDMI probe fail, whole card registration fails
    - driver should be more robust, and a failure of one codec should not leave all audio functionality disabled
  • HDaudio: need to check if codec module is available (HDaudio: need to check if codec module is available #285)

Future items (bin list), not covered by this #990 :

  • "patch" parameter support -> moved to HDA: "patch" parameter support #2714
    - legacy driver allows to load custom initialization verbs from a file, this is not supported in SOF
  • HDA beep mode support, codec->beep_mode is always HDA_BEEP_MODE_OFF with SOF
  • revisit content and interface of hdac library
    - big ticket item, affects all users of hdac, so will need a lot of coordination
    - the sound/hda/ library is used by many entities now in ALSA, and different clients are using different subsets of the library, yet the in hdac library everything is in the same one interface (hdaudio.h and hdaudio_ext.h files)
    - maybe a non-issue in the end, but warrants a a closer look now with SOF merged
  • multiple external HDA codecs support in generic machine driver -> moved to HDA: multiple external codec support #2716
    - generic driver can handle multiple codecs on the bus

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions