From 30121db4705fbace3da908569e87373727fab80e Mon Sep 17 00:00:00 2001 From: Ranjani Sridharan Date: Mon, 14 Nov 2022 10:35:42 -0800 Subject: [PATCH 1/4] topology2: build the topologies in the right folder The CAVS topologies need to be in the avs-tplg folder and the MTL topologies need to be in sof-ace-tplg folder. Also, change the output file names to the names expected by the kernel and the NHLT binary files to match the topology file names. Signed-off-by: Ranjani Sridharan --- tools/topology/topology2/CMakeLists.txt | 13 ++- .../topology2/avs-tplg/CMakeLists.txt | 52 ++++++++++++ tools/topology/topology2/cavs/CMakeLists.txt | 80 ------------------- .../topology2/sof-ace-tplg/CMakeLists.txt | 51 ++++++++++++ 4 files changed, 115 insertions(+), 81 deletions(-) create mode 100644 tools/topology/topology2/avs-tplg/CMakeLists.txt delete mode 100644 tools/topology/topology2/cavs/CMakeLists.txt create mode 100644 tools/topology/topology2/sof-ace-tplg/CMakeLists.txt diff --git a/tools/topology/topology2/CMakeLists.txt b/tools/topology/topology2/CMakeLists.txt index ae5d2b2b1864..53eafe4ca548 100644 --- a/tools/topology/topology2/CMakeLists.txt +++ b/tools/topology/topology2/CMakeLists.txt @@ -17,4 +17,15 @@ else() endif() endif() -add_subdirectory(cavs) +# generate ABI for IPC4 +add_custom_command(OUTPUT abi.conf + COMMAND > abi.conf ${CMAKE_CURRENT_SOURCE_DIR}/get_abi.sh ${SOF_ROOT_SOURCE_DIRECTORY} "ipc4" + DEPENDS ${SOF_ROOT_SOURCE_DIRECTORY}/src/include/kernel/abi.h +) +add_custom_target(abi_target + DEPENDS abi.conf +) + +add_dependencies(topologies2 topology2_cavs topology2_ace) +add_subdirectory(avs-tplg) +add_subdirectory(sof-ace-tplg) diff --git a/tools/topology/topology2/avs-tplg/CMakeLists.txt b/tools/topology/topology2/avs-tplg/CMakeLists.txt new file mode 100644 index 000000000000..553aa8a81ee9 --- /dev/null +++ b/tools/topology/topology2/avs-tplg/CMakeLists.txt @@ -0,0 +1,52 @@ +# SPDX-License-Identifier: BSD-3-Clause + +# Array of "input-file-name;output-file-name;comma separated pre-processor variables" +set(TPLGS +# CAVS HDMI only topology with passthrough pipelines +"cavs-passthrough-hdmi\;sof-hda-generic-idisp\;USE_CHAIN_DMA=true" +# CAVS HDA topology with mixer-based pipelines for HDA and passthrough pipelines for HDMI +"cavs-passthrough-hdmi\;sof-hda-generic\;HDA_CONFIG=mix,USE_CHAIN_DMA=true" +# If the alsatplg plugins for NHLT are not available, the NHLT blobs will not be added to the +# topologies below. +"cavs-passthrough-hdmi\;sof-hda-generic-2ch\;\ +HDA_CONFIG=mix,NUM_DMICS=2,PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-hda-generic-2ch.bin,USE_CHAIN_DMA=true" +"cavs-passthrough-hdmi\;sof-hda-generic-4ch\;\ +HDA_CONFIG=mix,NUM_DMICS=4,PDM1_MIC_A_ENABLE=1,PDM1_MIC_B_ENABLE=1,\ +PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-hda-generic-4ch.bin,USE_CHAIN_DMA=true" +# CAVS SDW topology with passthrough pipelines +"cavs-sdw\;cavs-sdw" + +# CAVS SDW with SRC gain and mixer support +"cavs-sdw-src-gain-mixin\;cavs-sdw-src-gain-mixin" + +# SDW + HDMI topology with passthrough pipelines +"cavs-sdw\;cavs-sdw-hdmi\;NUM_HDMIS=4" + +# CAVS SSP topology for TGL +"cavs-nocodec\;sof-tgl-nocodec\;NUM_DMICS=4,PDM1_MIC_A_ENABLE=1,PDM1_MIC_B_ENABLE=1,\ +PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-tgl-nocodec.bin" +) + +add_custom_target(topology2_cavs) + +foreach(tplg ${TPLGS}) + set(defines "") + list(LENGTH tplg length) + list(GET tplg 0 input) + list(GET tplg 1 output) + + math(EXPR last_index "${length}-1") + + # Get the pre-processor definitions from the 3rd item in the list for each topology + # ex: "hda-generic\;hda-generic-2ch\;HDA_CONFIG=gain,DMIC_CH=2", "defines" would contain "HDA_CONFIG=gain,DMIC_CH=2" + if (${last_index} EQUAL 2) + list(GET tplg ${last_index} defines) + endif() + + add_alsatplg2_command("${CMAKE_CURRENT_BINARY_DIR}/../abi.conf" abi_target + "${CMAKE_CURRENT_SOURCE_DIR}/../cavs/${input}" "${output}" + "${CMAKE_CURRENT_SOURCE_DIR}/../cavs" "${defines}") + + add_custom_target(topology2_avs_${output} DEPENDS ${output}.tplg) + add_dependencies(topology2_cavs topology2_avs_${output}) +endforeach() diff --git a/tools/topology/topology2/cavs/CMakeLists.txt b/tools/topology/topology2/cavs/CMakeLists.txt deleted file mode 100644 index 1d6c62dbdeed..000000000000 --- a/tools/topology/topology2/cavs/CMakeLists.txt +++ /dev/null @@ -1,80 +0,0 @@ -# SPDX-License-Identifier: BSD-3-Clause - -# Array of "input-file-name;output-file-name;comma separated pre-processor variables" -set(TPLGS -# CAVS HDMI only topology with passthrough pipelines -"cavs-passthrough-hdmi\;cavs-passthrough-hdmi\;USE_CHAIN_DMA=true" -# CAVS HDA topology with mixer-based pipelines for HDA and passthrough pipelines for HDMI -"cavs-passthrough-hdmi\;cavs-mixin-mixout-hda\;HDA_CONFIG=mix,USE_CHAIN_DMA=true" -# If the alsatplg plugins for NHLT are not available, the NHLT blobs will not be added to the -# topologies below. -# 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,\ -USE_CHAIN_DMA=true" -"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,USE_CHAIN_DMA=true" -# 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,USE_CHAIN_DMA=true" -"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,USE_CHAIN_DMA=true" -# MTL: CAVS HDA topology with mixer-based pipelines for HDA and passthrough pipelines for HDMI -"cavs-passthrough-hdmi\;cavs-mixin-mixout-hda-4ch-mtl\;PLATFORM=mtl,\ -HDA_CONFIG=mix,NUM_DMICS=4,PDM1_MIC_A_ENABLE=1,PDM1_MIC_B_ENABLE=1,PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-mtl-hda-mix.bin" - -# CAVS SDW topology with passthrough pipelines -"cavs-sdw\;cavs-sdw" - -# CAVS SDW with SRC gain and mixer support -"cavs-sdw-src-gain-mixin\;cavs-sdw-src-gain-mixin" - -# SDW + HDMI topology with passthrough pipelines -"cavs-sdw\;cavs-sdw-hdmi\;NUM_HDMIS=4" - -# SDW + DMIC topology with passthrough pipelines -"cavs-sdw\;cavs-mtl-sdw-dmic\;NUM_DMICS=4,DMIC0_ID=2,DMIC1_ID=3,\ -PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-mtl-sdw-dmic.bin" - -# CAVS SSP topology for TGL -"cavs-nocodec\;cavs-tgl-nocodec\;NUM_DMICS=4,PDM1_MIC_A_ENABLE=1,PDM1_MIC_B_ENABLE=1,\ -PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-cavs-tgl-nocodec.bin" -# SSP topology for MTL -"cavs-nocodec\;sof-mtl-nocodec\;PLATFORM=mtl,NUM_DMICS=2,\ -PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-ace-mtl-nocodec.bin" -) - -# generate ABI for IPC4 -add_custom_command(OUTPUT abi.conf - COMMAND > abi.conf ${CMAKE_CURRENT_SOURCE_DIR}/../get_abi.sh ${SOF_ROOT_SOURCE_DIRECTORY} "ipc4" - DEPENDS ${SOF_ROOT_SOURCE_DIRECTORY}/src/include/kernel/abi.h -) -add_custom_target(cavs_abi_target - DEPENDS abi.conf -) - -add_custom_target(topology2_cavs) -add_dependencies(topologies2 topology2_cavs) - -foreach(tplg ${TPLGS}) - set(defines "") - list(LENGTH tplg length) - list(GET tplg 0 input) - list(GET tplg 1 output) - - math(EXPR last_index "${length}-1") - - # Get the pre-processor definitions from the 3rd item in the list for each topology - # ex: "hda-generic\;hda-generic-2ch\;HDA_CONFIG=gain,DMIC_CH=2", "defines" would contain "HDA_CONFIG=gain,DMIC_CH=2" - if (${last_index} EQUAL 2) - list(GET tplg ${last_index} defines) - endif() - - add_alsatplg2_command("${CMAKE_CURRENT_BINARY_DIR}/abi.conf" cavs_abi_target - "${CMAKE_CURRENT_SOURCE_DIR}/${input}" "${output}" - "${CMAKE_CURRENT_SOURCE_DIR}" "${defines}") - add_custom_target(topology2_${output} DEPENDS ${output}.tplg) - add_dependencies(topology2_cavs topology2_${output}) -endforeach() diff --git a/tools/topology/topology2/sof-ace-tplg/CMakeLists.txt b/tools/topology/topology2/sof-ace-tplg/CMakeLists.txt new file mode 100644 index 000000000000..cee64a935221 --- /dev/null +++ b/tools/topology/topology2/sof-ace-tplg/CMakeLists.txt @@ -0,0 +1,51 @@ +# SPDX-License-Identifier: BSD-3-Clause + +# Array of "input-file-name;output-file-name;comma separated pre-processor variables" +set(TPLGS +# HDMI only topology with passthrough pipelines +"cavs-passthrough-hdmi\;sof-hda-generic-idisp\;USE_CHAIN_DMA=true" +# HDA topology with mixer-based pipelines for HDA and passthrough pipelines for HDMI +"cavs-passthrough-hdmi\;sof-hda-generic\;HDA_CONFIG=mix,USE_CHAIN_DMA=true" +# If the alsatplg plugins for NHLT are not available, the NHLT blobs will not be added to the +# topologies below. +"cavs-passthrough-hdmi\;sof-hda-generic-4ch\;PLATFORM=mtl,\ +HDA_CONFIG=mix,NUM_DMICS=4,PDM1_MIC_A_ENABLE=1,PDM1_MIC_B_ENABLE=1,PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-hda-generic-4ch.bin" + +# SDW topology with passthrough pipelines +"cavs-sdw\;mtl-sdw" + +# SDW + HDMI topology with passthrough pipelines +"cavs-sdw\;mtl-sdw-hdmi\;NUM_HDMIS=4" + +# SDW + DMIC topology with passthrough pipelines +"cavs-sdw\;mtl-sdw-dmic\;NUM_DMICS=4,DMIC0_ID=2,DMIC1_ID=3,\ +PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-mtl-sdw-dmic.bin" + +# SSP topology for MTL +"cavs-nocodec\;sof-mtl-nocodec\;PLATFORM=mtl,NUM_DMICS=2,\ +PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-mtl-nocodec.bin" +) + +add_custom_target(topology2_ace) + +foreach(tplg ${TPLGS}) + set(defines "") + list(LENGTH tplg length) + list(GET tplg 0 input) + list(GET tplg 1 output) + + math(EXPR last_index "${length}-1") + + # Get the pre-processor definitions from the 3rd item in the list for each topology + # ex: "hda-generic\;hda-generic-2ch\;HDA_CONFIG=gain,DMIC_CH=2", "defines" would contain "HDA_CONFIG=gain,DMIC_CH=2" + if (${last_index} EQUAL 2) + list(GET tplg ${last_index} defines) + endif() + + add_alsatplg2_command("${CMAKE_CURRENT_BINARY_DIR}/../abi.conf" abi_target + "${CMAKE_CURRENT_SOURCE_DIR}/../cavs/${input}" "${output}" + "${CMAKE_CURRENT_SOURCE_DIR}/../cavs" "${defines}") + + add_custom_target(topology2_ace_${output} DEPENDS ${output}.tplg) + add_dependencies(topology2_ace topology2_ace_${output}) +endforeach() From 925da1733ffbd5bdb21ae573762cc0b83fcb343e Mon Sep 17 00:00:00 2001 From: Ranjani Sridharan Date: Mon, 14 Nov 2022 11:37:27 -0800 Subject: [PATCH 2/4] topology2: Remove the cavs folder This folder contains definitions for both CAVS and ACE. So remove the incorrect folder naming and move everything one level up. Signed-off-by: Ranjani Sridharan --- tools/topology/topology2/avs-tplg/CMakeLists.txt | 4 ++-- .../topology/topology2/{cavs => }/cavs-mixin-mixout-hda.conf | 0 tools/topology/topology2/{cavs => }/cavs-nocodec.conf | 5 ++--- .../topology/topology2/{cavs => }/cavs-passthrough-hdmi.conf | 4 ++-- .../topology2/{cavs => }/cavs-sdw-src-gain-mixin.conf | 3 +-- tools/topology/topology2/{cavs => }/cavs-sdw.conf | 5 ++--- tools/topology/topology2/{cavs => }/common_definitions.conf | 0 .../include/pipelines/cavs/src-gain-mixin-playback.conf | 2 +- tools/topology/topology2/{cavs => }/platform/intel/cnl.conf | 0 .../topology2/{cavs => }/platform/intel/dmic-default.conf | 0 .../topology2/{cavs => }/platform/intel/dmic-generic.conf | 0 .../topology2/{cavs => }/platform/intel/hdmi-4th.conf | 0 .../topology2/{cavs => }/platform/intel/hdmi-default.conf | 0 .../topology2/{cavs => }/platform/intel/hdmi-generic.conf | 0 tools/topology/topology2/{cavs => }/platform/intel/mtl.conf | 0 tools/topology/topology2/sof-ace-tplg/CMakeLists.txt | 4 ++-- 16 files changed, 12 insertions(+), 15 deletions(-) rename tools/topology/topology2/{cavs => }/cavs-mixin-mixout-hda.conf (100%) rename tools/topology/topology2/{cavs => }/cavs-nocodec.conf (98%) rename tools/topology/topology2/{cavs => }/cavs-passthrough-hdmi.conf (96%) rename tools/topology/topology2/{cavs => }/cavs-sdw-src-gain-mixin.conf (98%) rename tools/topology/topology2/{cavs => }/cavs-sdw.conf (98%) rename tools/topology/topology2/{cavs => }/common_definitions.conf (100%) rename tools/topology/topology2/{cavs => }/platform/intel/cnl.conf (100%) rename tools/topology/topology2/{cavs => }/platform/intel/dmic-default.conf (100%) rename tools/topology/topology2/{cavs => }/platform/intel/dmic-generic.conf (100%) rename tools/topology/topology2/{cavs => }/platform/intel/hdmi-4th.conf (100%) rename tools/topology/topology2/{cavs => }/platform/intel/hdmi-default.conf (100%) rename tools/topology/topology2/{cavs => }/platform/intel/hdmi-generic.conf (100%) rename tools/topology/topology2/{cavs => }/platform/intel/mtl.conf (100%) diff --git a/tools/topology/topology2/avs-tplg/CMakeLists.txt b/tools/topology/topology2/avs-tplg/CMakeLists.txt index 553aa8a81ee9..d66b0297e6f6 100644 --- a/tools/topology/topology2/avs-tplg/CMakeLists.txt +++ b/tools/topology/topology2/avs-tplg/CMakeLists.txt @@ -44,8 +44,8 @@ foreach(tplg ${TPLGS}) endif() add_alsatplg2_command("${CMAKE_CURRENT_BINARY_DIR}/../abi.conf" abi_target - "${CMAKE_CURRENT_SOURCE_DIR}/../cavs/${input}" "${output}" - "${CMAKE_CURRENT_SOURCE_DIR}/../cavs" "${defines}") + "${CMAKE_CURRENT_SOURCE_DIR}/../${input}" "${output}" + "${CMAKE_CURRENT_SOURCE_DIR}/../" "${defines}") add_custom_target(topology2_avs_${output} DEPENDS ${output}.tplg) add_dependencies(topology2_cavs topology2_avs_${output}) diff --git a/tools/topology/topology2/cavs/cavs-mixin-mixout-hda.conf b/tools/topology/topology2/cavs-mixin-mixout-hda.conf similarity index 100% rename from tools/topology/topology2/cavs/cavs-mixin-mixout-hda.conf rename to tools/topology/topology2/cavs-mixin-mixout-hda.conf diff --git a/tools/topology/topology2/cavs/cavs-nocodec.conf b/tools/topology/topology2/cavs-nocodec.conf similarity index 98% rename from tools/topology/topology2/cavs/cavs-nocodec.conf rename to tools/topology/topology2/cavs-nocodec.conf index 8addc752d3ba..b740c8217aa1 100644 --- a/tools/topology/topology2/cavs/cavs-nocodec.conf +++ b/tools/topology/topology2/cavs-nocodec.conf @@ -1,10 +1,9 @@ - - + @@ -24,7 +23,7 @@ - + diff --git a/tools/topology/topology2/cavs/cavs-passthrough-hdmi.conf b/tools/topology/topology2/cavs-passthrough-hdmi.conf similarity index 96% rename from tools/topology/topology2/cavs/cavs-passthrough-hdmi.conf rename to tools/topology/topology2/cavs-passthrough-hdmi.conf index 15aaf60c20db..4427c4d07f17 100644 --- a/tools/topology/topology2/cavs/cavs-passthrough-hdmi.conf +++ b/tools/topology/topology2/cavs-passthrough-hdmi.conf @@ -3,7 +3,7 @@ - + @@ -26,7 +26,7 @@ - + diff --git a/tools/topology/topology2/cavs/cavs-sdw-src-gain-mixin.conf b/tools/topology/topology2/cavs-sdw-src-gain-mixin.conf similarity index 98% rename from tools/topology/topology2/cavs/cavs-sdw-src-gain-mixin.conf rename to tools/topology/topology2/cavs-sdw-src-gain-mixin.conf index 77a3b72fbfbf..4b8140f10327 100644 --- a/tools/topology/topology2/cavs/cavs-sdw-src-gain-mixin.conf +++ b/tools/topology/topology2/cavs-sdw-src-gain-mixin.conf @@ -1,4 +1,3 @@ - @@ -22,7 +21,7 @@ - + diff --git a/tools/topology/topology2/cavs/cavs-sdw.conf b/tools/topology/topology2/cavs-sdw.conf similarity index 98% rename from tools/topology/topology2/cavs/cavs-sdw.conf rename to tools/topology/topology2/cavs-sdw.conf index f39d75ead98a..a264e3a12f68 100644 --- a/tools/topology/topology2/cavs/cavs-sdw.conf +++ b/tools/topology/topology2/cavs-sdw.conf @@ -1,10 +1,9 @@ - - + @@ -26,7 +25,7 @@ - + diff --git a/tools/topology/topology2/cavs/common_definitions.conf b/tools/topology/topology2/common_definitions.conf similarity index 100% rename from tools/topology/topology2/cavs/common_definitions.conf rename to tools/topology/topology2/common_definitions.conf diff --git a/tools/topology/topology2/include/pipelines/cavs/src-gain-mixin-playback.conf b/tools/topology/topology2/include/pipelines/cavs/src-gain-mixin-playback.conf index a1d63c948f4b..51a375d3a3be 100644 --- a/tools/topology/topology2/include/pipelines/cavs/src-gain-mixin-playback.conf +++ b/tools/topology/topology2/include/pipelines/cavs/src-gain-mixin-playback.conf @@ -15,7 +15,7 @@ # # Where N is the unique pipeline ID within the same alsaconf node. # - + diff --git a/tools/topology/topology2/cavs/platform/intel/cnl.conf b/tools/topology/topology2/platform/intel/cnl.conf similarity index 100% rename from tools/topology/topology2/cavs/platform/intel/cnl.conf rename to tools/topology/topology2/platform/intel/cnl.conf diff --git a/tools/topology/topology2/cavs/platform/intel/dmic-default.conf b/tools/topology/topology2/platform/intel/dmic-default.conf similarity index 100% rename from tools/topology/topology2/cavs/platform/intel/dmic-default.conf rename to tools/topology/topology2/platform/intel/dmic-default.conf diff --git a/tools/topology/topology2/cavs/platform/intel/dmic-generic.conf b/tools/topology/topology2/platform/intel/dmic-generic.conf similarity index 100% rename from tools/topology/topology2/cavs/platform/intel/dmic-generic.conf rename to tools/topology/topology2/platform/intel/dmic-generic.conf diff --git a/tools/topology/topology2/cavs/platform/intel/hdmi-4th.conf b/tools/topology/topology2/platform/intel/hdmi-4th.conf similarity index 100% rename from tools/topology/topology2/cavs/platform/intel/hdmi-4th.conf rename to tools/topology/topology2/platform/intel/hdmi-4th.conf diff --git a/tools/topology/topology2/cavs/platform/intel/hdmi-default.conf b/tools/topology/topology2/platform/intel/hdmi-default.conf similarity index 100% rename from tools/topology/topology2/cavs/platform/intel/hdmi-default.conf rename to tools/topology/topology2/platform/intel/hdmi-default.conf diff --git a/tools/topology/topology2/cavs/platform/intel/hdmi-generic.conf b/tools/topology/topology2/platform/intel/hdmi-generic.conf similarity index 100% rename from tools/topology/topology2/cavs/platform/intel/hdmi-generic.conf rename to tools/topology/topology2/platform/intel/hdmi-generic.conf diff --git a/tools/topology/topology2/cavs/platform/intel/mtl.conf b/tools/topology/topology2/platform/intel/mtl.conf similarity index 100% rename from tools/topology/topology2/cavs/platform/intel/mtl.conf rename to tools/topology/topology2/platform/intel/mtl.conf diff --git a/tools/topology/topology2/sof-ace-tplg/CMakeLists.txt b/tools/topology/topology2/sof-ace-tplg/CMakeLists.txt index cee64a935221..11f33b016ad7 100644 --- a/tools/topology/topology2/sof-ace-tplg/CMakeLists.txt +++ b/tools/topology/topology2/sof-ace-tplg/CMakeLists.txt @@ -43,8 +43,8 @@ foreach(tplg ${TPLGS}) endif() add_alsatplg2_command("${CMAKE_CURRENT_BINARY_DIR}/../abi.conf" abi_target - "${CMAKE_CURRENT_SOURCE_DIR}/../cavs/${input}" "${output}" - "${CMAKE_CURRENT_SOURCE_DIR}/../cavs" "${defines}") + "${CMAKE_CURRENT_SOURCE_DIR}/../${input}" "${output}" + "${CMAKE_CURRENT_SOURCE_DIR}/../" "${defines}") add_custom_target(topology2_ace_${output} DEPENDS ${output}.tplg) add_dependencies(topology2_ace topology2_ace_${output}) From f8bc4e4a38704369eb77eed7c382ed7207cf44fb Mon Sep 17 00:00:00 2001 From: Ranjani Sridharan Date: Tue, 15 Nov 2022 15:51:39 -0800 Subject: [PATCH 3/4] topology2: sof-ace-tplg: Build sof-hda-generic-2ch topology This will be needed for MTL. Signed-off-by: Ranjani Sridharan --- tools/topology/topology2/sof-ace-tplg/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/topology/topology2/sof-ace-tplg/CMakeLists.txt b/tools/topology/topology2/sof-ace-tplg/CMakeLists.txt index 11f33b016ad7..feb6e60fb469 100644 --- a/tools/topology/topology2/sof-ace-tplg/CMakeLists.txt +++ b/tools/topology/topology2/sof-ace-tplg/CMakeLists.txt @@ -10,6 +10,8 @@ set(TPLGS # topologies below. "cavs-passthrough-hdmi\;sof-hda-generic-4ch\;PLATFORM=mtl,\ HDA_CONFIG=mix,NUM_DMICS=4,PDM1_MIC_A_ENABLE=1,PDM1_MIC_B_ENABLE=1,PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-hda-generic-4ch.bin" +"cavs-passthrough-hdmi\;sof-hda-generic-2ch\;PLATFORM=mtl,\ +HDA_CONFIG=mix,NUM_DMICS=2,PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-hda-generic-2ch.bin" # SDW topology with passthrough pipelines "cavs-sdw\;mtl-sdw" From 8705e20ca3a455f33817f2eed13274ad0c2f063d Mon Sep 17 00:00:00 2001 From: Ranjani Sridharan Date: Tue, 15 Nov 2022 15:57:10 -0800 Subject: [PATCH 4/4] topology2: rename cavs-passthrough-hdmi.conf Rename it to sof-hda-generic.conf. Signed-off-by: Ranjani Sridharan --- tools/topology/topology2/avs-tplg/CMakeLists.txt | 8 ++++---- tools/topology/topology2/sof-ace-tplg/CMakeLists.txt | 8 ++++---- .../{cavs-passthrough-hdmi.conf => sof-hda-generic.conf} | 0 3 files changed, 8 insertions(+), 8 deletions(-) rename tools/topology/topology2/{cavs-passthrough-hdmi.conf => sof-hda-generic.conf} (100%) diff --git a/tools/topology/topology2/avs-tplg/CMakeLists.txt b/tools/topology/topology2/avs-tplg/CMakeLists.txt index d66b0297e6f6..1dea5f30d82a 100644 --- a/tools/topology/topology2/avs-tplg/CMakeLists.txt +++ b/tools/topology/topology2/avs-tplg/CMakeLists.txt @@ -3,14 +3,14 @@ # Array of "input-file-name;output-file-name;comma separated pre-processor variables" set(TPLGS # CAVS HDMI only topology with passthrough pipelines -"cavs-passthrough-hdmi\;sof-hda-generic-idisp\;USE_CHAIN_DMA=true" +"sof-hda-generic\;sof-hda-generic-idisp\;USE_CHAIN_DMA=true" # CAVS HDA topology with mixer-based pipelines for HDA and passthrough pipelines for HDMI -"cavs-passthrough-hdmi\;sof-hda-generic\;HDA_CONFIG=mix,USE_CHAIN_DMA=true" +"sof-hda-generic\;sof-hda-generic\;HDA_CONFIG=mix,USE_CHAIN_DMA=true" # If the alsatplg plugins for NHLT are not available, the NHLT blobs will not be added to the # topologies below. -"cavs-passthrough-hdmi\;sof-hda-generic-2ch\;\ +"sof-hda-generic\;sof-hda-generic-2ch\;\ HDA_CONFIG=mix,NUM_DMICS=2,PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-hda-generic-2ch.bin,USE_CHAIN_DMA=true" -"cavs-passthrough-hdmi\;sof-hda-generic-4ch\;\ +"sof-hda-generic\;sof-hda-generic-4ch\;\ HDA_CONFIG=mix,NUM_DMICS=4,PDM1_MIC_A_ENABLE=1,PDM1_MIC_B_ENABLE=1,\ PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-hda-generic-4ch.bin,USE_CHAIN_DMA=true" # CAVS SDW topology with passthrough pipelines diff --git a/tools/topology/topology2/sof-ace-tplg/CMakeLists.txt b/tools/topology/topology2/sof-ace-tplg/CMakeLists.txt index feb6e60fb469..57246fe4a51b 100644 --- a/tools/topology/topology2/sof-ace-tplg/CMakeLists.txt +++ b/tools/topology/topology2/sof-ace-tplg/CMakeLists.txt @@ -3,14 +3,14 @@ # Array of "input-file-name;output-file-name;comma separated pre-processor variables" set(TPLGS # HDMI only topology with passthrough pipelines -"cavs-passthrough-hdmi\;sof-hda-generic-idisp\;USE_CHAIN_DMA=true" +"sof-hda-generic\;sof-hda-generic-idisp\;USE_CHAIN_DMA=true" # HDA topology with mixer-based pipelines for HDA and passthrough pipelines for HDMI -"cavs-passthrough-hdmi\;sof-hda-generic\;HDA_CONFIG=mix,USE_CHAIN_DMA=true" +"sof-hda-generic\;sof-hda-generic\;HDA_CONFIG=mix,USE_CHAIN_DMA=true" # If the alsatplg plugins for NHLT are not available, the NHLT blobs will not be added to the # topologies below. -"cavs-passthrough-hdmi\;sof-hda-generic-4ch\;PLATFORM=mtl,\ +"sof-hda-generic\;sof-hda-generic-4ch\;PLATFORM=mtl,\ HDA_CONFIG=mix,NUM_DMICS=4,PDM1_MIC_A_ENABLE=1,PDM1_MIC_B_ENABLE=1,PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-hda-generic-4ch.bin" -"cavs-passthrough-hdmi\;sof-hda-generic-2ch\;PLATFORM=mtl,\ +"sof-hda-generic\;sof-hda-generic-2ch\;PLATFORM=mtl,\ HDA_CONFIG=mix,NUM_DMICS=2,PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-hda-generic-2ch.bin" # SDW topology with passthrough pipelines diff --git a/tools/topology/topology2/cavs-passthrough-hdmi.conf b/tools/topology/topology2/sof-hda-generic.conf similarity index 100% rename from tools/topology/topology2/cavs-passthrough-hdmi.conf rename to tools/topology/topology2/sof-hda-generic.conf