Skip to content

Commit 65e4c1f

Browse files
ujfalusibardliao
authored andcommitted
topology2: Merge avs-tplg and sof-ace-tplg under production directory
Merge the avs-tplg and sof-ace-tplg under a common production directory. After a successful build CMake will copy the topology files to a target directory from where they can be copied to DUT/release: $ tree tools/build_tools/topology/topology2/target tools/build_tools/topology/topology2/target ├── development │   ├── cavs-sdw-hdmi.tplg │   ├── cavs-sdw-src-gain-mixin.tplg ... │   ├── sof-tgl-nocodec-rtcaec.tplg │   └── sof-tgl-nocodec.tplg ├── sof-ace-tplg -> sof-ipc4-tplg └── sof-ipc4-tplg ├── sof-adl-rt711-4ch.tplg ├── sof-adl-rt711-l0-rt1316-l12-rt714-l3.tplg ... ├── sof-tgl-rt712.tplg └── sof-tgl-rt715-rt711-rt1308-mono.tplg The sof-hda-generic-2/4ch.tplg will be generated without embedded NHLT as it is not used under normal circumstance. Two flavor of the generic topology is generated for CAVS2.5 and ACE1/2 with included NHLT binary in case it is used by existing users, but it is unlikely. As noted in the documentation, on the deployed system a symlink is needed for ACE1/2 platforms for backwards compatibility: sof-ace-tplg -> sof-ipc4-tplg Link: https://github.com/thesofproject/sof-docs/blob/master/getting_started/intel_debug/introduction.rst#2-topology-file Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
1 parent 16b53b4 commit 65e4c1f

7 files changed

Lines changed: 77 additions & 76 deletions

File tree

tools/topology/topology2/CMakeLists.txt

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,15 @@
33
# 3.17 required: foreach(<loop_var>... IN ZIP_LISTS <lists>)
44
cmake_minimum_required(VERSION 3.17)
55

6-
add_custom_target(topologies2)
6+
add_custom_target(topologies2 ALL
7+
# Create directory structure to be provided for deployment
8+
COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/target/sof-ipc4-tplg
9+
COMMAND ${CMAKE_COMMAND} -E create_symlink sof-ipc4-tplg ${CMAKE_CURRENT_BINARY_DIR}/target/sof-ace-tplg
10+
COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/target/development
11+
# copy the topology files only to target
12+
COMMAND ${CMAKE_COMMAND} -E copy_if_different production/*.tplg ${CMAKE_CURRENT_BINARY_DIR}/target/sof-ipc4-tplg/
13+
COMMAND ${CMAKE_COMMAND} -E copy_if_different development/*.tplg ${CMAKE_CURRENT_BINARY_DIR}/target/development/
14+
)
715

816
# Check alsatplg version and build topology2 if alsatplg version is
917
# 1.2.7 or greater, see https://github.com/thesofproject/sof/issues/5323
@@ -29,7 +37,6 @@ add_custom_target(abi_target
2937
DEPENDS abi.conf
3038
)
3139

32-
add_dependencies(topologies2 topology2_cavs topology2_ace topology2_dev)
33-
add_subdirectory(avs-tplg)
40+
add_dependencies(topologies2 topology2_dev topology2_prod)
3441
add_subdirectory(development)
35-
add_subdirectory(sof-ace-tplg)
42+
add_subdirectory(production)

tools/topology/topology2/avs-tplg/CMakeLists.txt renamed to tools/topology/topology2/production/CMakeLists.txt

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
# SPDX-License-Identifier: BSD-3-Clause
22

3-
include(tplg-targets.cmake)
3+
include(tplg-targets-hda-generic.cmake)
4+
include(tplg-targets-cavs25.cmake)
5+
include(tplg-targets-ace1.cmake)
6+
include(tplg-targets-ace2.cmake)
47

5-
add_custom_target(topology2_cavs)
8+
add_custom_target(topology2_prod)
69

710
foreach(tplg ${TPLGS})
811
set(defines "")
@@ -22,6 +25,6 @@ foreach(tplg ${TPLGS})
2225
"${CMAKE_CURRENT_SOURCE_DIR}/../${input}" "${output}"
2326
"${CMAKE_CURRENT_SOURCE_DIR}/../" "${defines}")
2427

25-
add_custom_target(topology2_avs_${output} DEPENDS ${output}.tplg)
26-
add_dependencies(topology2_cavs topology2_avs_${output})
28+
add_custom_target(topology2_${output} DEPENDS ${output}.tplg)
29+
add_dependencies(topology2_prod topology2_${output})
2730
endforeach()

tools/topology/topology2/sof-ace-tplg/tplg-targets.cmake renamed to tools/topology/topology2/production/tplg-targets-ace1.cmake

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,7 @@
11
# SPDX-License-Identifier: BSD-3-Clause
22

33
# Array of "input-file-name;output-file-name;comma separated pre-processor variables"
4-
set(TPLGS
5-
# HDMI only topology with passthrough pipelines
6-
"sof-hda-generic\;sof-hda-generic-idisp\;"
7-
# HDA topology with mixer-based pipelines for HDA and passthrough pipelines for HDMI
8-
"sof-hda-generic\;sof-hda-generic\;HDA_CONFIG=mix"
9-
# If the alsatplg plugins for NHLT are not available, the NHLT blobs will not be added to the
10-
# topologies below.
11-
"sof-hda-generic\;sof-hda-generic-4ch\;PLATFORM=mtl,\
12-
HDA_CONFIG=mix,NUM_DMICS=4,PDM1_MIC_A_ENABLE=1,PDM1_MIC_B_ENABLE=1,PREPROCESS_PLUGINS=nhlt,\
13-
NHLT_BIN=nhlt-sof-hda-generic-4ch.bin"
14-
"sof-hda-generic\;sof-hda-generic-2ch\;PLATFORM=mtl,\
15-
HDA_CONFIG=mix,NUM_DMICS=2,PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-hda-generic-2ch.bin"
16-
4+
list(APPEND TPLGS
175
# SDW + DMIC topology with passthrough pipelines
186
# We will change NUM_HDMIS to 3 once HDMI is enabled on MTL RVP
197
"cavs-sdw\;sof-mtl-rt711-4ch\;PLATFORM=mtl,NUM_DMICS=4,PDM1_MIC_A_ENABLE=1,PDM1_MIC_B_ENABLE=1,\
@@ -91,19 +79,4 @@ PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-mtl-sdw-cs42l42-l0-max98363-l2.bin,\
9179
BT_NAME=SSP1-BT,BT_INDEX=1,BT_PCM_ID=20,BT_ID=8,BT_PCM_NAME=Bluetooth,ADD_BT=true,\
9280
NUM_SDW_AMP_LINKS=1,SDW_SPK_STREAM=SDW2-Playback,SDW_AMP_FEEDBACK=false,\
9381
SDW_JACK_CAPTURE_CH=1"
94-
95-
# SDW topology for LNL RVP
96-
"cavs-sdw\;sof-lnl-rt711-4ch\;PLATFORM=lnl,NUM_DMICS=4,PDM1_MIC_A_ENABLE=1,PDM1_MIC_B_ENABLE=1,\
97-
DMIC0_ID=2,DMIC1_ID=3,NUM_HDMIS=0,PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-lnl-rt711-4ch.bin"
98-
99-
"cavs-sdw\;sof-lnl-rt711-l0-rt1316-l23-rt714-l1\;PLATFORM=lnl,NUM_SDW_AMP_LINKS=2,SDW_DMIC=1,\
100-
NUM_HDMIS=0,SDW_SPK_STREAM=SDW2-Playback,SDW_SPK_IN_STREAM=SDW2-Capture,SDW_DMIC_STREAM=SDW1-Capture"
101-
102-
"cavs-sdw\;sof-lnl-rt712-l2-rt1712-l3\;PLATFORM=lnl,SDW_DMIC=1,NUM_HDMIS=0,NUM_SDW_AMP_LINKS=1,\
103-
SDW_AMP_FEEDBACK=false,SDW_SPK_STREAM=Playback-SmartAmp,SDW_DMIC_STREAM=Capture-SmartMic,\
104-
SDW_JACK_OUT_STREAM=Playback-SimpleJack,SDW_JACK_IN_STREAM=Capture-SimpleJack"
105-
106-
"cavs-sdw\;sof-lnl-rt722-l0\;PLATFORM=lnl,SDW_DMIC=1,NUM_HDMIS=0,NUM_SDW_AMP_LINKS=1,\
107-
SDW_AMP_FEEDBACK=false,SDW_SPK_STREAM=Playback-SmartAmp,SDW_DMIC_STREAM=Capture-SmartMic,\
108-
SDW_JACK_OUT_STREAM=Playback-SimpleJack,SDW_JACK_IN_STREAM=Capture-SimpleJack"
10982
)
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# SPDX-License-Identifier: BSD-3-Clause
2+
3+
# Array of "input-file-name;output-file-name;comma separated pre-processor variables"
4+
list(APPEND TPLGS
5+
# SDW topology for LNL RVP
6+
"cavs-sdw\;sof-lnl-rt711-4ch\;PLATFORM=lnl,NUM_DMICS=4,PDM1_MIC_A_ENABLE=1,PDM1_MIC_B_ENABLE=1,\
7+
DMIC0_ID=2,DMIC1_ID=3,NUM_HDMIS=0,PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-lnl-rt711-4ch.bin"
8+
9+
"cavs-sdw\;sof-lnl-rt711-l0-rt1316-l23-rt714-l1\;PLATFORM=lnl,NUM_SDW_AMP_LINKS=2,SDW_DMIC=1,\
10+
NUM_HDMIS=0,SDW_SPK_STREAM=SDW2-Playback,SDW_SPK_IN_STREAM=SDW2-Capture,SDW_DMIC_STREAM=SDW1-Capture"
11+
12+
"cavs-sdw\;sof-lnl-rt712-l2-rt1712-l3\;PLATFORM=lnl,SDW_DMIC=1,NUM_HDMIS=0,NUM_SDW_AMP_LINKS=1,\
13+
SDW_AMP_FEEDBACK=false,SDW_SPK_STREAM=Playback-SmartAmp,SDW_DMIC_STREAM=Capture-SmartMic,\
14+
SDW_JACK_OUT_STREAM=Playback-SimpleJack,SDW_JACK_IN_STREAM=Capture-SimpleJack"
15+
16+
"cavs-sdw\;sof-lnl-rt722-l0\;PLATFORM=lnl,SDW_DMIC=1,NUM_HDMIS=0,NUM_SDW_AMP_LINKS=1,\
17+
SDW_AMP_FEEDBACK=false,SDW_SPK_STREAM=Playback-SmartAmp,SDW_DMIC_STREAM=Capture-SmartMic,\
18+
SDW_JACK_OUT_STREAM=Playback-SimpleJack,SDW_JACK_IN_STREAM=Capture-SimpleJack"
19+
20+
)

tools/topology/topology2/avs-tplg/tplg-targets.cmake renamed to tools/topology/topology2/production/tplg-targets-cavs25.cmake

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,7 @@
11
# SPDX-License-Identifier: BSD-3-Clause
22

33
# Array of "input-file-name;output-file-name;comma separated pre-processor variables"
4-
set(TPLGS
5-
# CAVS HDMI only topology with passthrough pipelines
6-
"sof-hda-generic\;sof-hda-generic-idisp\;"
7-
# CAVS HDA topology with mixer-based pipelines for HDA and passthrough pipelines for HDMI
8-
"sof-hda-generic\;sof-hda-generic\;HDA_CONFIG=mix"
9-
# If the alsatplg plugins for NHLT are not available, the NHLT blobs will not be added to the
10-
# topologies below.
11-
"sof-hda-generic\;sof-hda-generic-2ch\;\
12-
HDA_CONFIG=mix,NUM_DMICS=2,PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-hda-generic-2ch.bin"
13-
"sof-hda-generic\;sof-hda-generic-4ch\;\
14-
HDA_CONFIG=mix,NUM_DMICS=4,PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-hda-generic-4ch.bin,\
15-
PDM1_MIC_A_ENABLE=1,PDM1_MIC_B_ENABLE=1"
16-
4+
list(APPEND TPLGS
175
# IPC4 topology for TGL rt711 Headset + rt1316 Amplifier + rt714 DMIC
186
"cavs-sdw\;sof-tgl-rt711-rt1316-rt714\;NUM_SDW_AMP_LINKS=2,SDW_DMIC=1,\
197
PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-tgl-rt711-rt1316-rt714.bin"
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# SPDX-License-Identifier: BSD-3-Clause
2+
3+
# Array of "input-file-name;output-file-name;comma separated pre-processor variables"
4+
list(APPEND TPLGS
5+
# HDMI only topology with passthrough pipelines
6+
"sof-hda-generic\;sof-hda-generic-idisp\;"
7+
# HDA topology with mixer-based pipelines for HDA and
8+
# passthrough pipelines for HDMI
9+
"sof-hda-generic\;sof-hda-generic\;HDA_CONFIG=mix"
10+
# HDA topology with mixer-based pipelines for HDA and
11+
# passthrough pipelines for HDMI and
12+
# 2 or 4 DMIC, no NHLT blob included in topology
13+
"sof-hda-generic\;sof-hda-generic-2ch\;HDA_CONFIG=mix,NUM_DMICS=2"
14+
"sof-hda-generic\;sof-hda-generic-4ch\;HDA_CONFIG=mix,NUM_DMICS=4,\
15+
PDM1_MIC_A_ENABLE=1,PDM1_MIC_B_ENABLE=1"
16+
17+
# HDA topology with mixer-based pipelines for HDA and
18+
# passthrough pipelines for HDMI and
19+
# 2 or 4 DMIC, no NHLT blob included in topology
20+
21+
# Note: If the alsatplg plugins for NHLT are not available, the NHLT blobs will
22+
# not be added to the topologies below.
23+
24+
# Topologies for CAVS2.5 architecture
25+
"sof-hda-generic\;sof-hda-generic-cavs25-2ch\;HDA_CONFIG=mix,NUM_DMICS=2,\
26+
PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-hda-generic-cavs25-2ch.bin"
27+
"sof-hda-generic\;sof-hda-generic-cavs25-4ch\;HDA_CONFIG=mix,NUM_DMICS=4,\
28+
PDM1_MIC_A_ENABLE=1,PDM1_MIC_B_ENABLE=1,\
29+
PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-hda-generic-cavs25-4ch.bin"
30+
31+
# Topologies for ACE1 and ACE2 architectures
32+
"sof-hda-generic\;sof-hda-generic-ace1-2ch\;PLATFORM=mtl,HDA_CONFIG=mix,NUM_DMICS=2,\
33+
PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-hda-generic-ace1-2ch.bin"
34+
"sof-hda-generic\;sof-hda-generic-ace1-4ch\;PLATFORM=mtl,HDA_CONFIG=mix,NUM_DMICS=4,\
35+
PDM1_MIC_A_ENABLE=1,PDM1_MIC_B_ENABLE=1,\
36+
PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-hda-generic-ace1-4ch.bin"
37+
)

tools/topology/topology2/sof-ace-tplg/CMakeLists.txt

Lines changed: 0 additions & 27 deletions
This file was deleted.

0 commit comments

Comments
 (0)