Skip to content

Topology2: add hda function topologies - #11544

Open
bardliao wants to merge 2 commits into
thesofproject:mainfrom
bardliao:topology2-hda-function-topology
Open

bardliao wants to merge 2 commits into
thesofproject:mainfrom
bardliao:topology2-hda-function-topology

Conversation

@bardliao

Copy link
Copy Markdown
Collaborator

Add function topologies for generic HDA machines.

Allow sof-hda-generic.conf to build a topology that has only one of the
HDA, HDMI, DMIC, HDMI-IN and BT functions, the way cavs-sdw.conf is used
for the sof-sdca-* topologies. The functions are already switched by
HDA_CONFIG, NUM_HDMIS, NUM_DMICS, HDMI_IN_CAPTURE and ADD_BT, but some
parts were not tied to them:

- The virtual widgets were always included. Move the codec widgets to
  platform/intel/hda-codec-widgets.conf, included with the HDA_CONFIG
  selection, and include the iDisp widgets with the HDMI function.
- The TDFB class was only available through the HDA confs, so a DMIC
  only topology could not use enhanced capture. Include it when
  HDA_CONFIG is none.

Document the macros in README.md.

Topologies with HDA_CONFIG=none, such as sof-hda-generic-idisp, no
longer carry the HDA codec virtual widgets. The others are unchanged.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Copilot AI balanced review requested due to automatic review settings November 26, 2026 12:54

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The affected HDMI-in targets inherit incorrect SSP ports and backend IDs, configuring the wrong first port and omitting backend ID 13 instead of using SSP1/SSP2 and IDs 12/13.

1 open issue
What changed in this PR

Adds reusable function topologies for generic HDA machines, allowing individual audio functions to be loaded separately using the existing topology configuration.

Changes:

  • Registers Meteor Lake and Panther Lake function targets, plus a shared HDMI target.
  • Includes HDA codec and HDMI virtual widgets only when their functions are enabled.
  • Documents function-selection macros and ID coordination requirements.
File Description
tools/​topology/​topology2/​sof-hda-generic.conf Gates virtual widgets by function and adds component includes.
tools/​topology/​topology2/​README.md Documents function configuration and naming.
tools/​topology/​topology2/​production/​tplg-targets-hda-generic.cmake Adds standalone HDA, HDMI, DMIC, HDMI-IN, and Bluetooth targets.
tools/​topology/​topology2/​platform/​intel/​hda-codec-widgets.conf Extracts HDA codec virtual widgets into a conditional include.

Review effort: Balanced

Add per-function targets that enable a single function of
sof-hda-generic.conf and disable the others, named the way
sof_hda_get_tplg_files() requests them in Linux, for all the platforms
since MTL:

- sof-hda-id4 and sof-hdmi-pcm3-id1. The HDA codec and HDMI topologies
  have no NHLT blob and don't depend on the platform, so their names
  have no platform and all platforms share them.
- sof-<platform>-dmic-{2ch,4ch}-id6, sof-<platform>-ssp2-bt-id8 and
  sof-<platform>-ssp6-hdmiin-id14 for MTL, LNL, PTL and NVL
  (sof-ptl-ssp2-bt-id8 is already built from cavs-sdw). NVL uses the PTL
  configuration, like in cavs-sdw.conf.
- ARL and WCL use links to the MTL and PTL ones.

HDMI-IN uses SSP1 and SSP2 with BE ids 13 and 14, like
sof-hda-generic-ace3-hdmi-in-port12. Linux names the topology after the
SSP mask (0x6) and the id of the second HDMI-IN link.

Linux falls back to the monolithic topology when any of the function
topologies is missing, so a platform needs all of them.

They are loaded next to each other, so their PCM and pipeline IDs must
not collide. The DMIC targets use pipelines 100/101 like cavs-sdw, BT
uses 200-203 and the BT Deepbuffer (PCM 36) 204 like
sof-ptl-ssp2-bt-id8, and HDMI-IN uses 210-213.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
@intel-sofci

Copy link
Copy Markdown

PR 11544: test results

Run date: 2026-11-26 13:39 UTC

Tested commit: 7c870992f1141cd8fc9e9e8da9d4bf7ba318e753

mtl pass rate lnl pass rate ptl pass rate wcl pass rate nvl pass rate

@bardliao
bardliao force-pushed the topology2-hda-function-topology branch from 7c87099 to a890225 Compare November 26, 2026 14:41
@bardliao
bardliao requested a balanced review from Copilot November 27, 2026 06:49

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The README advertises NUM_DMICS=3, but the included configuration supports only 1, 2, and 4, leaving the three-microphone setting with zero-channel PCM capabilities.

1 open issue
1 resolved since last review

Review effort: Balanced

|---|---|---|
| HDA codec | `HDA_CONFIG=mix` (or `efx`, `src`, `dax`, `passthrough`) | `HDA_CONFIG=none` (default) |
| HDMI/DP (iDisp) | `NUM_HDMIS=3` (default) | `NUM_HDMIS=0` |
| PCH DMIC | `NUM_DMICS=1..4` | `NUM_DMICS=0` (default) |
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants