topology: add development folder for test and validation

Add development folder for topologies that not for production.
First add sof-tgl-nocodec-ci as a validation topology.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
This commit is contained in:
Pan Xiuli 2020-08-17 04:00:03 +00:00 committed by Keyon Jie
parent 41ca1d8827
commit a0fc1de515
3 changed files with 65 additions and 1 deletions

View File

@ -120,7 +120,6 @@ set(TPLGS
"sof-cml-rt1011-rt5682\;sof-cml-rt1011-rt5682\;-DPLATFORM=cml\;-DPPROC=volume" "sof-cml-rt1011-rt5682\;sof-cml-rt1011-rt5682\;-DPLATFORM=cml\;-DPPROC=volume"
"sof-cml-rt1011-rt5682\;sof-cml-eq-rt1011-rt5682\;-DPLATFORM=cml\;-DPPROC=eq-iir-eq-fir-volume" "sof-cml-rt1011-rt5682\;sof-cml-eq-rt1011-rt5682\;-DPLATFORM=cml\;-DPPROC=eq-iir-eq-fir-volume"
"sof-tgl-nocodec\;sof-tgl-nocodec" "sof-tgl-nocodec\;sof-tgl-nocodec"
"sof-tgl-nocodec-ci\;sof-tgl-nocodec-ci"
"sof-tgl-rt711-i2s-rt1308\;sof-tgl-rt711-i2s-rt1308-2ch\;-DHDMI=1\;-DCHANNELS=2" "sof-tgl-rt711-i2s-rt1308\;sof-tgl-rt711-i2s-rt1308-2ch\;-DHDMI=1\;-DCHANNELS=2"
"sof-tgl-rt711-i2s-rt1308\;sof-tgl-rt711-i2s-rt1308-4ch\;-DHDMI=1\;-DCHANNELS=4" "sof-tgl-rt711-i2s-rt1308\;sof-tgl-rt711-i2s-rt1308-4ch\;-DHDMI=1\;-DCHANNELS=4"
"sof-tgl-rt711-rt1308\;sof-tgl-rt711-rt1308-2ch\;-DCHANNELS=2" "sof-tgl-rt711-rt1308\;sof-tgl-rt711-rt1308-2ch\;-DCHANNELS=2"
@ -203,3 +202,5 @@ foreach(tplg ${TPLGS})
add_custom_target(topology_${output} DEPENDS ${output}.tplg) add_custom_target(topology_${output} DEPENDS ${output}.tplg)
add_dependencies(topologies topology_${output}) add_dependencies(topologies topology_${output})
endforeach() endforeach()
add_subdirectory(development)

View File

@ -0,0 +1,63 @@
# SPDX-License-Identifier: BSD-3-Clause
set(TPLGS
"sof-tgl-nocodec-ci\;sof-tgl-nocodec-ci"
)
add_custom_target(dev_topologies ALL)
foreach(tplg ${TPLGS})
list(GET tplg 0 input)
list(GET tplg 1 output)
list(LENGTH tplg tplg_len)
math(EXPR num_args "${tplg_len} - 1")
set(DEFINES "")
if (${num_args} GREATER 1)
foreach(index RANGE 2 ${num_args})
list(GET tplg ${index} custom_define)
list(APPEND DEFINES ${custom_define})
endforeach()
endif()
add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${output}.conf
COMMAND m4 --fatal-warnings
${DEFINES}
-I ${CMAKE_CURRENT_SOURCE_DIR}/../m4
-I ${CMAKE_CURRENT_SOURCE_DIR}/../common
-I ${CMAKE_CURRENT_SOURCE_DIR}/../platform/common
-I ${CMAKE_CURRENT_SOURCE_DIR}/../
-I ${CMAKE_CURRENT_BINARY_DIR}/../
${CMAKE_CURRENT_SOURCE_DIR}/../common/abi.m4
${CMAKE_CURRENT_SOURCE_DIR}/${input}.m4
> ${output}.conf
DEPENDS abi
VERBATIM
USES_TERMINAL
)
# This use of VERBOSE relies on original CMake behavior.
# From the add_custom_command() manual:
#
# Use of VERBATIM is recommended as it enables correct behavior.
# When VERBATIM is not given the behavior is platform specific because
# there is no protection of tool-specific special characters.
#
# This is fine because:
# - We don't expect alsatplg to work on Windows any time soon.
# - CMake is too afraid to remove the original, no-VERBATIM behavior:
# https://gitlab.kitware.com/cmake/cmake/issues/18849
#
# Also note that in alsa-utils commit v1.2.2~15-gcbabe7a3f0cc, alsatplg
# (accidentally?) started ignoring the verbosity level, now it's just
# verbose or not.
add_custom_command(
OUTPUT ${output}.tplg
COMMAND alsatplg \$\${VERBOSE:+-v 1} -c ${output}.conf -o ${output}.tplg
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${output}.conf
USES_TERMINAL
)
add_custom_target(topology_${output} DEPENDS ${output}.tplg)
add_dependencies(dev_topologies topology_${output})
endforeach()