This patch adds the dmic test case to the tplg generating script.
Signed-off-by: Ranjani Sridharan ranjani.sridharan@linux.intel.com --- topology/test/tplg-build.sh | 107 +++++++++++++++++++++++------------- 1 file changed, 69 insertions(+), 38 deletions(-)
diff --git a/topology/test/tplg-build.sh b/topology/test/tplg-build.sh index 8c31213..004e8b1 100755 --- a/topology/test/tplg-build.sh +++ b/topology/test/tplg-build.sh @@ -37,51 +37,79 @@ function simple_test { if [ $5 == "SSP" ] then TESTS=("${!13}") + elif [ $5 == "DMIC" ] + then + TESTS=("${!17}") fi for i in ${TESTS[@]} do - if [ "$USE_XARGS" == "yes" ] + if [ $5 == "DMIC" ] then - #if DAI type is SSP, define the SSP specific params - if [ $5 == "SSP" ] + TFILE="$i-dmic$6-$2-$4-$7-48k-$1" + echo "M4 pre-processing test $i -> ${TFILE}" + m4 ${M4_FLAGS} \ + -DTEST_PIPE_NAME="$2" \ + -DTEST_DAI_LINK_NAME="$3" \ + -DTEST_DAI_PORT=$6 \ + -DTEST_DAI_FORMAT=$7 \ + -DTEST_PIPE_FORMAT=$4 \ + -DTEST_DAI_TYPE=$5 \ + -DTEST_DMIC_DRIVER_VERSION=$8 \ + -DTEST_DMIC_CLK_MIN=$9 \ + -DTEST_DMIC_CLK_MAX=${10} \ + -DTEST_DMIC_DUTY_MIN=${11} \ + -DTEST_DMIC_DUTY_MAX=${12} \ + -DTEST_DMIC_REQUESTED_PDM_COUNT=${13} \ + -DTEST_DMIC_PDM_0_ENABLE=${14} \ + -DTEST_DMIC_PDM_1_ENABLE=${15} \ + -DTEST_DMIC_SAMPLE_RATE=${16} \ + $i.m4 > ${TFILE}.conf + echo "Compiling test $i -> ${TFILE}.tplg" + alsatplg -v 1 -c ${TFILE}.conf -o ${TFILE}.tplg + else + if [ "$USE_XARGS" == "yes" ] then - if [ $i == "test-all" ] + #if DAI type is SSP, define the SSP specific params + if [ $5 == "SSP" ] then - TFILE="test-ssp$6-${12}-$2-$4-$7-48k-$((${11} / 1000))k-$1" - else - TFILE="$i-ssp$6-${12}-$2-$4-$7-48k-$((${11} / 1000))k-$1" + if [ $i == "test-all" ] + then + TFILE="test-ssp$6-${12}-$2-$4-$7-48k-$((${11} / 1000))k-$1" + else + TFILE="$i-ssp$6-${12}-$2-$4-$7-48k-$((${11} / 1000))k-$1" + fi + #create input string for batch m4 processing + M4_STRINGS+="-DTEST_PIPE_NAME=$2,-DTEST_DAI_LINK_NAME=$3\ + -DTEST_DAI_PORT=$6,-DTEST_DAI_FORMAT=$7\ + -DTEST_PIPE_FORMAT=$4,-DTEST_SSP_BCLK=${10}\ + -DTEST_SSP_MCLK=${11},-DTEST_SSP_PHY_BITS=$8\ + -DTEST_SSP_DATA_BITS=$9,-DTEST_SSP_MODE=${12}\ + -DTEST_DAI_TYPE=$5\ + $i.m4,${TFILE}," + #create input string for batch processing of conf files + TEST_STRINGS+=${TFILE}"," + fi + else + #if DAI type is SSP, define the SSP specific params + if [ $5 == "SSP" ] + then + echo "M4 pre-processing test $i -> ${TFILE}" + m4 ${M4_FLAGS} \ + -DTEST_PIPE_NAME="$2" \ + -DTEST_DAI_LINK_NAME="$3" \ + -DTEST_DAI_PORT=$6 \ + -DTEST_DAI_FORMAT=$7 \ + -DTEST_PIPE_FORMAT=$4 \ + -DTEST_SSP_BCLK=${10} \ + -DTEST_SSP_MCLK=${11} \ + -DTEST_SSP_PHY_BITS=$8 \ + -DTEST_SSP_DATA_BITS=$9 \ + -DTEST_SSP_MODE=${12} \ + -DTEST_DAI_TYPE=$5 \ + $i.m4 > ${TFILE}.conf + echo "Compiling test $i -> ${TFILE}.tplg" + alsatplg -v 1 -c ${TFILE}.conf -o ${TFILE}.tplg fi - #create input string for batch m4 processing - M4_STRINGS+="-DTEST_PIPE_NAME=$2,-DTEST_DAI_LINK_NAME=$3\ - -DTEST_DAI_PORT=$6,-DTEST_DAI_FORMAT=$7\ - -DTEST_PIPE_FORMAT=$4,-DTEST_SSP_BCLK=${10}\ - -DTEST_SSP_MCLK=${11},-DTEST_SSP_PHY_BITS=$8\ - -DTEST_SSP_DATA_BITS=$9,-DTEST_SSP_MODE=${12}\ - -DTEST_DAI_TYPE=$5\ - $i.m4,${TFILE}," - #create input string for batch processing of conf files - TEST_STRINGS+=${TFILE}"," - fi - else - #if DAI type is SSP, define the SSP specific params - if [ $5 == "SSP" ] - then - echo "M4 pre-processing test $i -> ${TFILE}" - m4 ${M4_FLAGS} \ - -DTEST_PIPE_NAME="$2" \ - -DTEST_DAI_LINK_NAME="$3" \ - -DTEST_DAI_PORT=$6 \ - -DTEST_DAI_FORMAT=$7 \ - -DTEST_PIPE_FORMAT=$4 \ - -DTEST_SSP_BCLK=${10} \ - -DTEST_SSP_MCLK=${11} \ - -DTEST_SSP_PHY_BITS=$8 \ - -DTEST_SSP_DATA_BITS=$9 \ - -DTEST_SSP_MODE=${12} \ - -DTEST_DAI_TYPE=$5 \ - $i.m4 > ${TFILE}.conf - echo "Compiling test $i -> ${TFILE}.tplg" - alsatplg -v 1 -c ${TFILE}.conf -o ${TFILE}.tplg fi fi done @@ -173,6 +201,9 @@ simple_test nocodec src "NoCodec" s24le SSP 4 s24le 25 24 2400000 24000000 I2S S # Tone test: Tone component only supports s32le currently simple_test codec tone "SSP2-Codec" s32le SSP 2 s16le 20 16 1920000 19200000 I2S TONE_TEST[@]
+#DMIC Test +simple_test nocodec passthrough "DMIC0" s32le DMIC 0 s32le 1 500000 4800000 40 60 2 1 0 48000 DMIC_TEST[@] + if [ "$USE_XARGS" == "yes" ] then echo "Batch processing m4 files..."