Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions tools/topology/topology2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,23 @@ ACPI when selecting and loading the corresponding topology.
Function topologies are intended to be reusable across devices that provide the same function.
Please do not add any customized feature in the function topology.

`sof-hda-generic.conf` builds the HDA function topologies the same way `cavs-sdw.conf` builds the
`sof-sdca-*` ones: one conf, and macros that enable a single function and disable the others.

| Function | Enable | Disable |
|---|---|---|
| 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) |

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I guess we dont support 3 dmics so this is right, otherwise good.

| HDMI-IN (SSP) | `HDMI_IN_CAPTURE=true` | `HDMI_IN_CAPTURE=false` (default) |
| Bluetooth (SSP) | `ADD_BT=true` | `ADD_BT=false` (default) |

The virtual widgets follow their function, so a disabled function leaves none behind. The
function topologies are the `sof-<platform>-<function>-id<BE id>` targets (see `sof_hda_get_tplg_files()`;
the HDA codec and HDMI ones have no NHLT blob and no `<platform>`) in
`production/tplg-targets-hda-generic.cmake`. They are loaded next to each other, so choose
non-overlapping PCM and pipeline IDs for each of them.

### Registering CMake Targets

Production topologies are registered in `production/tplg-targets-*.cmake` files. Each
Expand Down
64 changes: 64 additions & 0 deletions tools/topology/topology2/platform/intel/hda-codec-widgets.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Virtual widgets of the HDA codec DAPM widgets, used by the HDA function
# of sof-hda-generic.conf
Object.Widget.virtual [
{
name 'codec0_in'
type input
index 1
}
{
name 'codec1_in'
type input
index 2
}
{
name 'codec0_out'
type output
index 3
}
{
name 'codec1_out'
type output
index 4
}
{
name 'codec2_in'
type input
index 5
}
{
name 'codec2_out'
type output
index 6
}
{
name 'Analog CPU Playback'
type out_drv
index 3
}
{
name 'Digital CPU Playback'
type out_drv
index 4
}
{
name 'Alt Analog CPU Playback'
type out_drv
index 5
}
{
name 'Analog CPU Capture'
type input
index 6
}
{
name 'Digital CPU Capture'
type input
index 7
}
{
name 'Alt Analog CPU Capture'
type input
index 8
}
]
129 changes: 129 additions & 0 deletions tools/topology/topology2/production/tplg-targets-hda-generic.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -123,4 +123,133 @@ EFX_DMIC0_TDFB_PARAMS=line4_pass,EFX_DMIC0_DRC_PARAMS=dmic_default"
PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-hda-generic-ace3-2ch-dax.bin,\
DMIC0_ENHANCED_CAPTURE=true,EFX_DMIC0_TDFB_PARAMS=line2_generic_pm10deg,\
EFX_DMIC0_DRC_PARAMS=dmic_default,DOLBY_DAX_CORE_ID=1"

# Platform independent function topologies, shared by all platforms. The HDA
# codec and HDMI topologies have no NHLT blob, so sof_hda_get_tplg_files() in
# the Linux kernel requests them without a platform in the name.
"sof-hda-generic\;sof-hda-id4\;HDA_CONFIG=mix,NUM_HDMIS=0,\
HDA_MIC_ENHANCED_CAPTURE=true,EFX_HDA_MIC_TDFB_PARAMS=line2_pass,\
EFX_HDA_MIC_DRC_PARAMS=passthrough"

"sof-hda-generic\;sof-hdmi-pcm3-id1\;PLATFORM=ptl"

# Function topologies, ACE1, named the way sof_hda_get_tplg_files() in the Linux
# kernel requests them. Each one enables a single function of
# sof-hda-generic.conf and disables the others (HDA_CONFIG=none, NUM_DMICS=0,
# NUM_HDMIS=0, HDMI_IN_CAPTURE=false, ADD_BT=false), the way the sof-sdca-*
# topologies do with cavs-sdw.conf. They are loaded next to each other, so
# their PCM and pipeline IDs must not collide.
"sof-hda-generic\;sof-mtl-dmic-2ch-id6\;PLATFORM=mtl,NUM_HDMIS=0,NUM_DMICS=2,\
DMIC0_HOST_PIPELINE_ID=100,DMIC0_DAI_PIPELINE_ID=101,\
DMIC0_DAI_PIPELINE_SRC=module-copier.101.2,\
DMIC0_ENHANCED_CAPTURE=true,EFX_DMIC0_TDFB_PARAMS=line2_generic_pm10deg,\
EFX_DMIC0_DRC_PARAMS=dmic_default"

"sof-hda-generic\;sof-mtl-dmic-4ch-id6\;PLATFORM=mtl,NUM_HDMIS=0,NUM_DMICS=4,\
DMIC0_HOST_PIPELINE_ID=100,DMIC0_DAI_PIPELINE_ID=101,\
DMIC0_DAI_PIPELINE_SRC=module-copier.101.2,\
PDM1_MIC_A_ENABLE=1,PDM1_MIC_B_ENABLE=1,\
DMIC0_ENHANCED_CAPTURE=true,EFX_DMIC0_TDFB_PARAMS=line4_pass,\
EFX_DMIC0_DRC_PARAMS=dmic_default"

"sof-hda-generic\;sof-mtl-ssp6-hdmiin-id14\;PLATFORM=mtl,NUM_HDMIS=0,\
HDMI_IN_CAPTURE=true,HDMI_IN_1_INDEX=1,HDMI_IN_2_INDEX=2,HDMI_IN_1_NAME=SSP1-HDMI,\
HDMI_IN_1_ID=13,HDMI_IN_2_ID=14,\
HDMI_IN_1_CP_HOST_PIPELINE_ID=210,HDMI_IN_1_CP_DAI_PIPELINE_ID=211,\
HDMI_IN_2_CP_HOST_PIPELINE_ID=212,HDMI_IN_2_CP_DAI_PIPELINE_ID=213,\
HDMI_IN_1_PCM_ID=7,HDMI_IN_2_PCM_ID=8"

"sof-hda-generic\;sof-mtl-ssp2-bt-id8\;PLATFORM=mtl,NUM_HDMIS=0,ADD_BT=true,BT_DEEP_BUFFER=true,\
BT_PCM_ID=20,BT_ID=8,BT_PCM_NAME=Bluetooth,\
BT_PB_HOST_PIPELINE_ID=200,BT_PB_DAI_PIPELINE_ID=201,BT_CP_HOST_PIPELINE_ID=202,BT_CP_DAI_PIPELINE_ID=203"

# Function topologies, ACE3, named the way sof_hda_get_tplg_files() in the Linux
# kernel requests them. Each one enables a single function of
# sof-hda-generic.conf and disables the others (HDA_CONFIG=none, NUM_DMICS=0,
# NUM_HDMIS=0, HDMI_IN_CAPTURE=false, ADD_BT=false), the way the sof-sdca-*
# topologies do with cavs-sdw.conf. They are loaded next to each other, so
# their PCM and pipeline IDs must not collide.
"sof-hda-generic\;sof-ptl-dmic-2ch-id6\;PLATFORM=ptl,NUM_HDMIS=0,NUM_DMICS=2,\
DMIC0_HOST_PIPELINE_ID=100,DMIC0_DAI_PIPELINE_ID=101,\
DMIC0_DAI_PIPELINE_SRC=module-copier.101.2,\
DMIC0_ENHANCED_CAPTURE=true,EFX_DMIC0_TDFB_PARAMS=line2_generic_pm10deg,\
EFX_DMIC0_DRC_PARAMS=dmic_default"

"sof-hda-generic\;sof-ptl-dmic-4ch-id6\;PLATFORM=ptl,NUM_HDMIS=0,NUM_DMICS=4,\
DMIC0_HOST_PIPELINE_ID=100,DMIC0_DAI_PIPELINE_ID=101,\
DMIC0_DAI_PIPELINE_SRC=module-copier.101.2,\
PDM1_MIC_A_ENABLE=1,PDM1_MIC_B_ENABLE=1,\
DMIC0_ENHANCED_CAPTURE=true,EFX_DMIC0_TDFB_PARAMS=line4_pass,\
EFX_DMIC0_DRC_PARAMS=dmic_default"

"sof-hda-generic\;sof-ptl-ssp6-hdmiin-id14\;PLATFORM=ptl,NUM_HDMIS=0,\
HDMI_IN_CAPTURE=true,HDMI_IN_1_INDEX=1,HDMI_IN_2_INDEX=2,HDMI_IN_1_NAME=SSP1-HDMI,\
HDMI_IN_1_ID=13,HDMI_IN_2_ID=14,\
HDMI_IN_1_CP_HOST_PIPELINE_ID=210,HDMI_IN_1_CP_DAI_PIPELINE_ID=211,\
HDMI_IN_2_CP_HOST_PIPELINE_ID=212,HDMI_IN_2_CP_DAI_PIPELINE_ID=213,\
HDMI_IN_1_PCM_ID=7,HDMI_IN_2_PCM_ID=8"

# Function topologies, ACE2 (LNL), named the way sof_hda_get_tplg_files() in the Linux
# kernel requests them. See the ACE1 ones above.
"sof-hda-generic\;sof-lnl-dmic-2ch-id6\;PLATFORM=lnl,NUM_HDMIS=0,NUM_DMICS=2,\
DMIC0_HOST_PIPELINE_ID=100,DMIC0_DAI_PIPELINE_ID=101,\
DMIC0_DAI_PIPELINE_SRC=module-copier.101.2,\
DMIC0_ENHANCED_CAPTURE=true,EFX_DMIC0_TDFB_PARAMS=line2_generic_pm10deg,\
EFX_DMIC0_DRC_PARAMS=dmic_default"

"sof-hda-generic\;sof-lnl-dmic-4ch-id6\;PLATFORM=lnl,NUM_HDMIS=0,NUM_DMICS=4,\
DMIC0_HOST_PIPELINE_ID=100,DMIC0_DAI_PIPELINE_ID=101,\
DMIC0_DAI_PIPELINE_SRC=module-copier.101.2,\
PDM1_MIC_A_ENABLE=1,PDM1_MIC_B_ENABLE=1,\
DMIC0_ENHANCED_CAPTURE=true,EFX_DMIC0_TDFB_PARAMS=line4_pass,\
EFX_DMIC0_DRC_PARAMS=dmic_default"

"sof-hda-generic\;sof-lnl-ssp2-bt-id8\;PLATFORM=lnl,NUM_HDMIS=0,ADD_BT=true,BT_DEEP_BUFFER=true,\
BT_PCM_ID=20,BT_ID=8,BT_PCM_NAME=Bluetooth,\
BT_PB_HOST_PIPELINE_ID=200,BT_PB_DAI_PIPELINE_ID=201,BT_CP_HOST_PIPELINE_ID=202,BT_CP_DAI_PIPELINE_ID=203"

"sof-hda-generic\;sof-lnl-ssp6-hdmiin-id14\;PLATFORM=lnl,NUM_HDMIS=0,\
HDMI_IN_CAPTURE=true,HDMI_IN_1_INDEX=1,HDMI_IN_2_INDEX=2,HDMI_IN_1_NAME=SSP1-HDMI,\
HDMI_IN_1_ID=13,HDMI_IN_2_ID=14,\
HDMI_IN_1_CP_HOST_PIPELINE_ID=210,HDMI_IN_1_CP_DAI_PIPELINE_ID=211,\
HDMI_IN_2_CP_HOST_PIPELINE_ID=212,HDMI_IN_2_CP_DAI_PIPELINE_ID=213,\
HDMI_IN_1_PCM_ID=7,HDMI_IN_2_PCM_ID=8"

# Function topologies, ACE4 (NVL), named the way sof_hda_get_tplg_files() in the Linux
# kernel requests them. See the ACE1 ones above.
"sof-hda-generic\;sof-nvl-dmic-2ch-id6\;PLATFORM=nvl,NUM_HDMIS=0,NUM_DMICS=2,\
DMIC0_HOST_PIPELINE_ID=100,DMIC0_DAI_PIPELINE_ID=101,\
DMIC0_DAI_PIPELINE_SRC=module-copier.101.2,\
DMIC0_ENHANCED_CAPTURE=true,EFX_DMIC0_TDFB_PARAMS=line2_generic_pm10deg,\
EFX_DMIC0_DRC_PARAMS=dmic_default"

"sof-hda-generic\;sof-nvl-dmic-4ch-id6\;PLATFORM=nvl,NUM_HDMIS=0,NUM_DMICS=4,\
DMIC0_HOST_PIPELINE_ID=100,DMIC0_DAI_PIPELINE_ID=101,\
DMIC0_DAI_PIPELINE_SRC=module-copier.101.2,\
PDM1_MIC_A_ENABLE=1,PDM1_MIC_B_ENABLE=1,\
DMIC0_ENHANCED_CAPTURE=true,EFX_DMIC0_TDFB_PARAMS=line4_pass,\
EFX_DMIC0_DRC_PARAMS=dmic_default"

"sof-hda-generic\;sof-nvl-ssp2-bt-id8\;PLATFORM=nvl,NUM_HDMIS=0,ADD_BT=true,BT_DEEP_BUFFER=true,\
BT_PCM_ID=20,BT_ID=8,BT_PCM_NAME=Bluetooth,\
BT_PB_HOST_PIPELINE_ID=200,BT_PB_DAI_PIPELINE_ID=201,BT_CP_HOST_PIPELINE_ID=202,BT_CP_DAI_PIPELINE_ID=203"

"sof-hda-generic\;sof-nvl-ssp6-hdmiin-id14\;PLATFORM=nvl,NUM_HDMIS=0,\
HDMI_IN_CAPTURE=true,HDMI_IN_1_INDEX=1,HDMI_IN_2_INDEX=2,HDMI_IN_1_NAME=SSP1-HDMI,\
HDMI_IN_1_ID=13,HDMI_IN_2_ID=14,\
HDMI_IN_1_CP_HOST_PIPELINE_ID=210,HDMI_IN_1_CP_DAI_PIPELINE_ID=211,\
HDMI_IN_2_CP_HOST_PIPELINE_ID=212,HDMI_IN_2_CP_DAI_PIPELINE_ID=213,\
HDMI_IN_1_PCM_ID=7,HDMI_IN_2_PCM_ID=8"
)

list(APPEND SYMLINKS
# ARL and WCL use the MTL and PTL HDA function topologies
"sof-arl-dmic-2ch-id6\;sof-mtl-dmic-2ch-id6"
"sof-arl-dmic-4ch-id6\;sof-mtl-dmic-4ch-id6"
"sof-arl-ssp2-bt-id8\;sof-mtl-ssp2-bt-id8"
"sof-arl-ssp6-hdmiin-id14\;sof-mtl-ssp6-hdmiin-id14"
"sof-wcl-dmic-2ch-id6\;sof-ptl-dmic-2ch-id6"
"sof-wcl-dmic-4ch-id6\;sof-ptl-dmic-4ch-id6"
"sof-wcl-ssp2-bt-id8\;sof-ptl-ssp2-bt-id8"
"sof-wcl-ssp6-hdmiin-id14\;sof-ptl-ssp6-hdmiin-id14"
)
Loading
Loading