Skip to content
Merged
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
15 changes: 11 additions & 4 deletions tools/topology/topology2/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,15 @@
# 3.17 required: foreach(<loop_var>... IN ZIP_LISTS <lists>)
cmake_minimum_required(VERSION 3.17)

add_custom_target(topologies2)
add_custom_target(topologies2 ALL
# Create directory structure to be provided for deployment
COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/target/sof-ipc4-tplg
COMMAND ${CMAKE_COMMAND} -E create_symlink sof-ipc4-tplg ${CMAKE_CURRENT_BINARY_DIR}/target/sof-ace-tplg
COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/target/development
# copy the topology files only to target
COMMAND ${CMAKE_COMMAND} -E copy_if_different production/*.tplg ${CMAKE_CURRENT_BINARY_DIR}/target/sof-ipc4-tplg/
COMMAND ${CMAKE_COMMAND} -E copy_if_different development/*.tplg ${CMAKE_CURRENT_BINARY_DIR}/target/development/
)

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

add_dependencies(topologies2 topology2_cavs topology2_ace topology2_dev)
add_subdirectory(avs-tplg)
add_dependencies(topologies2 topology2_dev topology2_prod)
add_subdirectory(development)
add_subdirectory(sof-ace-tplg)
add_subdirectory(production)
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
# SPDX-License-Identifier: BSD-3-Clause

include(tplg-targets.cmake)
include(tplg-targets-cavs25.cmake)
include(tplg-targets-ace.cmake)
include(tplg-targets-hda-generic.cmake)

add_custom_target(topology2_cavs)

add_custom_target(topology2_prod)

foreach(tplg ${TPLGS})
set(defines "")
Expand All @@ -22,6 +25,6 @@ foreach(tplg ${TPLGS})
"${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})
add_custom_target(topology2_${output} DEPENDS ${output}.tplg)
add_dependencies(topology2_prod topology2_${output})
endforeach()
Original file line number Diff line number Diff line change
@@ -1,21 +1,15 @@
# 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
"sof-hda-generic\;sof-hda-generic-idisp\;DEEPBUFFER_FW_DMA_MS=100,\
DEEPBUFFER_D0I3_COMPATIBLE=true"
# HDA topology with mixer-based pipelines for HDA and passthrough pipelines for HDMI
"sof-hda-generic\;sof-hda-generic\;HDA_CONFIG=mix,DEEPBUFFER_FW_DMA_MS=100,\
DEEPBUFFER_D0I3_COMPATIBLE=true"
Copy link
Contributor

Choose a reason for hiding this comment

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

could have been done in the previous patch..

list(APPEND TPLGS
# If the alsatplg plugins for NHLT are not available, the NHLT blobs will not be added to the
# topologies below.
"sof-hda-generic\;sof-hda-generic-4ch\;PLATFORM=mtl,\
"sof-hda-generic\;sof-hda-generic-ace1-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,DEEPBUFFER_FW_DMA_MS=100,\
NHLT_BIN=nhlt-sof-hda-generic-ace1-4ch.bin,DEEPBUFFER_FW_DMA_MS=100,\
DEEPBUFFER_D0I3_COMPATIBLE=true"
"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,\
"sof-hda-generic\;sof-hda-generic-ace1-2ch\;PLATFORM=mtl,\
HDA_CONFIG=mix,NUM_DMICS=2,PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-hda-generic-ace1-2ch.bin,\
DEEPBUFFER_FW_DMA_MS=100,DEEPBUFFER_D0I3_COMPATIBLE=true"

# SDW + DMIC topology with passthrough pipelines
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
# 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
"sof-hda-generic\;sof-hda-generic-idisp\;DEEPBUFFER_FW_DMA_MS=100"
# CAVS HDA topology with mixer-based pipelines for HDA and passthrough pipelines for HDMI
"sof-hda-generic\;sof-hda-generic\;HDA_CONFIG=mix,DEEPBUFFER_FW_DMA_MS=100"
Copy link
Contributor

Choose a reason for hiding this comment

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

why?

Copy link
Collaborator Author

@marc-hb marc-hb Feb 14, 2024

Choose a reason for hiding this comment

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

Otherwise these would clash in the next commit with the identical ones in sof-ace-tplg/

PS: to see this thread in the relevant context you must open the commit "avs-tplg: drop the NHLT-free, cavs25 variants of HDA generic". Otherwise Github makes a mess.

list(APPEND TPLGS
Copy link
Contributor

Choose a reason for hiding this comment

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

This change is not related to topic, unless it is part of the 'preparation' umbrella.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Correct, this could have been another "preparation" commit. However I felt like this commit was small and easy enough to review. Moreover this CMake change makes no output difference at this early stage.


# If the alsatplg plugins for NHLT are not available, the NHLT blobs will not be added to the
# topologies below.
"sof-hda-generic\;sof-hda-generic-2ch\;\
HDA_CONFIG=mix,NUM_DMICS=2,PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-hda-generic-2ch.bin,\
"sof-hda-generic\;sof-hda-generic-cavs25-2ch\;\
HDA_CONFIG=mix,NUM_DMICS=2,PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-hda-generic-cavs25-2ch.bin,\
DEEPBUFFER_FW_DMA_MS=100"
"sof-hda-generic\;sof-hda-generic-4ch\;\
HDA_CONFIG=mix,NUM_DMICS=4,PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-hda-generic-4ch.bin,\
"sof-hda-generic\;sof-hda-generic-cavs25-4ch\;\
HDA_CONFIG=mix,NUM_DMICS=4,PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-hda-generic-cavs25-4ch.bin,\
DEEPBUFFER_FW_DMA_MS=100,\
PDM1_MIC_A_ENABLE=1,PDM1_MIC_B_ENABLE=1"

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@

list(APPEND TPLGS
# HDMI only topology with passthrough pipelines
"sof-hda-generic\;sof-hda-generic-idisp\;DEEPBUFFER_FW_DMA_MS=100,\
DEEPBUFFER_D0I3_COMPATIBLE=true"
# HDA topology with mixer-based pipelines for HDA and passthrough pipelines for HDMI
"sof-hda-generic\;sof-hda-generic\;HDA_CONFIG=mix,DEEPBUFFER_FW_DMA_MS=100,\
DEEPBUFFER_D0I3_COMPATIBLE=true"

# HDA topology with mixer-based pipelines for HDA and
# passthrough pipelines for HDMI and
# 2 or 4 DMIC, no NHLT blob included in topology
"sof-hda-generic\;sof-hda-generic-2ch\;HDA_CONFIG=mix,NUM_DMICS=2,\
Copy link
Contributor

Choose a reason for hiding this comment

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

so, at the previous patch the tplg2 build was incomplete?
I know bisecting is not a primary concern, just pointing out.

DEEPBUFFER_FW_DMA_MS=100,DEEPBUFFER_D0I3_COMPATIBLE=true"
"sof-hda-generic\;sof-hda-generic-4ch\;HDA_CONFIG=mix,NUM_DMICS=4,\
Copy link
Collaborator

@ranj063 ranj063 Feb 14, 2024

Choose a reason for hiding this comment

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

when you have NUM_DMICS as 4 you also need PDM1_MIC_A_ENABLE=1,PDM1_MIC_B_ENABLE=1

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Please correct me but I think it is there... I copied it from 65e4c1f

DEEPBUFFER_FW_DMA_MS=100,DEEPBUFFER_D0I3_COMPATIBLE=true,\
PDM1_MIC_A_ENABLE=1,PDM1_MIC_B_ENABLE=1"
)
27 changes: 0 additions & 27 deletions tools/topology/topology2/sof-ace-tplg/CMakeLists.txt

This file was deleted.