From 0e53d54684bb1762d76ad81befe311d8e249f999 Mon Sep 17 00:00:00 2001 From: Ranjani Sridharan Date: Wed, 16 Feb 2022 10:29:27 -0800 Subject: [PATCH] topology2: cavs: Add support for including DMIC in HDA topology Currently we build separate topologies for TGL and CNL since their io_clk's are different. Eventually, we'd need to unify these and let the driver handle the blob selection in the kernel. Signed-off-by: Ranjani Sridharan --- tools/topology/topology2/cavs/CMakeLists.txt | 17 +++++++++++++++++ .../topology2/cavs/cavs-passthrough-hdmi.conf | 15 +++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/tools/topology/topology2/cavs/CMakeLists.txt b/tools/topology/topology2/cavs/CMakeLists.txt index 3b9fc19b0..8955d572d 100644 --- a/tools/topology/topology2/cavs/CMakeLists.txt +++ b/tools/topology/topology2/cavs/CMakeLists.txt @@ -6,6 +6,23 @@ set(TPLGS "cavs-passthrough-hdmi\;cavs-passthrough-hdmi" # CAVS HDA topology with mixer-based pipelines for HDA and passthrough pipelines for HDMI "cavs-passthrough-hdmi\;cavs-mixin-mixout-hda\;HDA_CONFIG=mix" +# If the alsatplg plugins for NHLT are not available, the NHLT blobs will not be added to the +# topologies below. +# TGL: CAVS HDA topology with mixer-based pipelines for HDA and passthrough pipelines for HDMI +"cavs-passthrough-hdmi\;cavs-mixin-mixout-hda-2ch-tgl\;\ +HDA_CONFIG=mix,NUM_DMICS=2,PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt.bin" +# CNL: CAVS HDA topology with mixer-based pipelines for HDA and passthrough pipelines for HDMI +"cavs-passthrough-hdmi\;cavs-mixin-mixout-hda-2ch-cnl\;\ +HDA_CONFIG=mix,NUM_DMICS=2,PLATFORM=cnl,PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt.bin" +# TGL: CAVS HDA topology with mixer-based pipelines for HDA and passthrough pipelines for HDMI +"cavs-passthrough-hdmi\;cavs-mixin-mixout-hda-4ch-tgl\;\ +HDA_CONFIG=mix,NUM_DMICS=4,PLATFORM=cnl,PDM1_MIC_A_ENABLE=1,PDM1_MIC_B_ENABLE=1,\ +PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt.bin" +# CNL: CAVS HDA topology with mixer-based pipelines for HDA and passthrough pipelines for HDMI +"cavs-passthrough-hdmi\;cavs-mixin-mixout-hda-4ch-cnl\;\ +HDA_CONFIG=mix,NUM_DMICS=4,PLATFORM=cnl,PDM1_MIC_A_ENABLE=1,PDM1_MIC_B_ENABLE=1,\ +PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt.bin" + # CAVS SDW topology with passthrough pipelines "cavs-sdw\;cavs-sdw" # CAVS SSP topology with passthrough pipelines, default SSP MCLK is 38.4MHz diff --git a/tools/topology/topology2/cavs/cavs-passthrough-hdmi.conf b/tools/topology/topology2/cavs/cavs-passthrough-hdmi.conf index b537682bc..eed0c177b 100644 --- a/tools/topology/topology2/cavs/cavs-passthrough-hdmi.conf +++ b/tools/topology/topology2/cavs/cavs-passthrough-hdmi.conf @@ -19,6 +19,8 @@ + + @@ -26,6 +28,14 @@ Define { HDA_CONFIG "none" + PLATFORM "none" + NUM_DMICS 0 +} + +# include platform config +IncludeByKey.PLATFORM { + "none" "platform/intel/dmic-default.conf" + "cnl" "platform/intel/cnl.conf" } # include HDA config if needed. @@ -34,6 +44,11 @@ IncludeByKey.HDA_CONFIG { "mix" "cavs-mixin-mixout-hda.conf" } +# include DMIC config if needed. +IncludeByKey.NUM_DMICS { + "[1-4]" "platform/intel/dmic-generic.conf" +} + Object.Dai { HDA.4 { name iDisp1