Skip to content

Commit

Permalink
Merge pull request #6 from ranj063/test_topology
Browse files Browse the repository at this point in the history
Add more test topologies
  • Loading branch information
lgirdwood authored Jun 26, 2018
2 parents 75440af + ddbd2d6 commit f756455
Show file tree
Hide file tree
Showing 6 changed files with 113 additions and 80 deletions.
37 changes: 23 additions & 14 deletions topology/platform/intel/dmic.m4
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,14 @@ define(`PDM_TUPLES',
` }'
)

dnl PDM_CONFIG(type, idx, pdm tuples list)
dnl PDM_CONFIG(type, idx, num pdm active, pdm tuples list)
define(`PDM_CONFIG',
` SOF_TKN_INTEL_DMIC_NUM_PDM_ACTIVE' STR($3)
` }'
`}'
`SectionVendorTuples."'N_DAI_CONFIG($1$2)`_pdm_tuples" {'
` tokens "sof_dmic_pdm_tokens"'
$3
$4
`}'
)

Expand All @@ -30,31 +33,37 @@ define(`DMIC_WORD_LENGTH',
`ifelse($1, `s16le', 16, $1, `s32le', 32, `')')

dnl DMIC_CONFIG(driver_version, clk_min, clk_mac, duty_min, duty_max,
dnl req pdm count, sample_rate,
dnl sample_rate,
dnl fifo word length, type, idx, pdm controller config)
define(`DMIC_CONFIG',
`SectionVendorTuples."'N_DAI_CONFIG($9$10)`_dmic_tuples" {'
`SectionVendorTuples."'N_DAI_CONFIG($8$9)`_dmic_tuples" {'
` tokens "sof_dmic_tokens"'
` tuples."word" {'
` SOF_TKN_INTEL_DMIC_DRIVER_VERSION' STR($1)
` SOF_TKN_INTEL_DMIC_CLK_MIN' STR($2)
` SOF_TKN_INTEL_DMIC_CLK_MAX' STR($3)
` SOF_TKN_INTEL_DMIC_DUTY_MIN' STR($4)
` SOF_TKN_INTEL_DMIC_DUTY_MAX' STR($5)
` SOF_TKN_INTEL_DMIC_NUM_PDM_ACTIVE' STR($6)
` SOF_TKN_INTEL_DMIC_SAMPLE_RATE' STR($7)
` SOF_TKN_INTEL_DMIC_FIFO_WORD_LENGTH' STR($8)
` }'
`}'
` SOF_TKN_INTEL_DMIC_SAMPLE_RATE' STR($6)
` SOF_TKN_INTEL_DMIC_FIFO_WORD_LENGTH' STR($7)
dnl PDM config for the number of active PDM controllers
$11
`SectionData."'N_DAI_CONFIG($9$10)`_pdm_data" {'
` tuples "'N_DAI_CONFIG($9$10)`_pdm_tuples"'
$10
`SectionData."'N_DAI_CONFIG($8$9)`_pdm_data" {'
` tuples "'N_DAI_CONFIG($8$9)`_pdm_tuples"'
`}'
`SectionData."'N_DAI_CONFIG($9$10)`_data" {'
` tuples "'N_DAI_CONFIG($9$10)`_dmic_tuples"'
`SectionData."'N_DAI_CONFIG($8$9)`_data" {'
` tuples "'N_DAI_CONFIG($8$9)`_dmic_tuples"'

`}'
)

dnl DMIC PDM configurations
dnl macros to get the number of active pdm's and their config
define(`MONO_PDM0_MICA', `1, LIST(`', PDM_TUPLES(0, 1, 0, 0, 0, 0, 0))')
define(`MONO_PDM0_MICB', `1, LIST(`', PDM_TUPLES(0, 0, 1, 0, 0, 0, 0))')
define(`STEREO_PDM0', `1, LIST(`', PDM_TUPLES(0, 1, 1, 0, 0, 0, 0))')
define(`STEREO_PDM1', `1, LIST(`', PDM_TUPLES(1, 1, 1, 0, 0, 0, 0))')
define(`FOUR_CH_PDM0_PDM1',
`2, LIST(`', PDM_TUPLES(0, 1, 1, 0, 0, 0, 0), PDM_TUPLES(1, 1, 1, 0, 0, 0, 0))')

divert(0)dnl
2 changes: 1 addition & 1 deletion topology/test/test-all.m4
Original file line number Diff line number Diff line change
Expand Up @@ -92,4 +92,4 @@ DAI_CONFIG(TEST_DAI_TYPE, TEST_DAI_PORT, TEST_DAI_PORT, TEST_DAI_LINK_NAME,
SSP_CLOCK(fsync, 48000, codec_slave),
SSP_TDM(2, TEST_SSP_PHY_BITS, 3, 3),
SSP_CONFIG_DATA(TEST_DAI_TYPE, TEST_DAI_PORT,
TEST_SSP_DATA_BITS)))
TEST_SSP_DATA_BITS, TEST_SSP_MCLK_ID)))
10 changes: 5 additions & 5 deletions topology/test/test-capture.m4
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,13 @@ DAI_CONFIG(TEST_DAI_TYPE, TEST_DAI_PORT, TEST_DAI_PORT, TEST_DAI_LINK_NAME,
SSP_CLOCK(fsync, 48000, codec_slave),
SSP_TDM(2, TEST_SSP_PHY_BITS, 3, 3),
SSP_CONFIG_DATA(TEST_DAI_TYPE, TEST_DAI_PORT,
TEST_SSP_DATA_BITS)),
TEST_SSP_DATA_BITS, TEST_SSP_MCLK_ID)),
TEST_DAI_TYPE, `DMIC',
DMIC_CONFIG(TEST_DMIC_DRIVER_VERSION,TEST_DMIC_CLK_MIN,
DMIC_CONFIG(TEST_DMIC_DRIVER_VERSION, TEST_DMIC_CLK_MIN,
TEST_DMIC_CLK_MAX, TEST_DMIC_DUTY_MIN,
TEST_DMIC_DUTY_MAX, TEST_PDM_ACTIVE,
TEST_DMIC_SAMPLE_RATE, DMIC_WORD_LENGTH(TEST_DAI_FORMAT),
TEST_DMIC_DUTY_MAX, TEST_DMIC_SAMPLE_RATE,
DMIC_WORD_LENGTH(TEST_DAI_FORMAT),
TEST_DAI_TYPE, TEST_DAI_PORT,
PDM_CONFIG(TEST_DAI_TYPE, TEST_DAI_PORT,
LIST(`', PDM_TUPLES(0, 1, 1, 0, 0, 0, 0)))),
TEST_DMIC_PDM_CONFIG)),
`'))
2 changes: 1 addition & 1 deletion topology/test/test-playback.m4
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,4 @@ DAI_CONFIG(TEST_DAI_TYPE, TEST_DAI_PORT, TEST_DAI_PORT, TEST_DAI_LINK_NAME,
SSP_CLOCK(fsync, 48000, codec_slave),
SSP_TDM(2, TEST_SSP_PHY_BITS, 3, 3),
SSP_CONFIG_DATA(TEST_DAI_TYPE, TEST_DAI_PORT,
TEST_SSP_DATA_BITS)))
TEST_SSP_DATA_BITS, TEST_SSP_MCLK_ID)))
2 changes: 1 addition & 1 deletion topology/test/test-tone-playback.m4
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,4 @@ DAI_CONFIG(TEST_DAI_TYPE, TEST_DAI_PORT, TEST_DAI_PORT, TEST_DAI_LINK_NAME,
SSP_CLOCK(fsync, 48000, codec_slave),
SSP_TDM(2, TEST_SSP_PHY_BITS, 3, 3),
SSP_CONFIG_DATA(TEST_DAI_TYPE, TEST_DAI_PORT,
TEST_SSP_DATA_BITS)))
TEST_SSP_DATA_BITS, TEST_SSP_MCLK_ID)))
140 changes: 82 additions & 58 deletions topology/test/tplg-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,14 @@ M4_STRINGS=""
# 9) dai_bclk - SSP BCLK in HZ
# 10) dai_mclk - SSP MCLK in HZ
# 11) SSP mode - SSP mode e.g. I2S, LEFT_J, DSP_A and DSP_B
# 12) SSP mclk_id
# 13) Test pipelines
#

function simple_test {
if [ $5 == "SSP" ]
then
TESTS=("${!13}")
TESTS=("${!14}")
elif [ $5 == "DMIC" ]
then
TESTS=("${!15}")
Expand All @@ -45,7 +47,7 @@ function simple_test {
do
if [ $5 == "DMIC" ]
then
TFILE="$i-dmic$6-$2-$4-$7-48k-$1"
TFILE="$i-dmic$6-${14}-$2-$4-$7-$((${13} / 1000))k-$1"
echo "M4 pre-processing test $i -> ${TFILE}"
m4 ${M4_FLAGS} \
-DTEST_PIPE_NAME="$2" \
Expand All @@ -59,8 +61,8 @@ function simple_test {
-DTEST_DMIC_CLK_MAX=${10} \
-DTEST_DMIC_DUTY_MIN=${11} \
-DTEST_DMIC_DUTY_MAX=${12} \
-DTEST_PDM_ACTIVE=${13} \
-DTEST_DMIC_SAMPLE_RATE=${14} \
-DTEST_DMIC_SAMPLE_RATE=${13} \
-DTEST_DMIC_PDM_CONFIG=${14} \
$i.m4 > ${TFILE}.conf
echo "Compiling test $i -> ${TFILE}.tplg"
alsatplg -v 1 -c ${TFILE}.conf -o ${TFILE}.tplg
Expand All @@ -72,17 +74,17 @@ function simple_test {
then
if [ $i == "test-all" ]
then
TFILE="test-ssp$6-${12}-$2-$4-$7-48k-$((${11} / 1000))k-$1"
TFILE="test-ssp$6-mclk-${13}-${12}-$2-$4-$7-48k-$((${11} / 1000))k-$1"
else
TFILE="$i-ssp$6-${12}-$2-$4-$7-48k-$((${11} / 1000))k-$1"
TFILE="$i-ssp$6-mclk-${13}-${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\
-DTEST_SSP_MCLK_ID=${13},-DTEST_DAI_TYPE=$5\
$i.m4,${TFILE},"
#create input string for batch processing of conf files
TEST_STRINGS+=${TFILE}","
Expand All @@ -93,9 +95,9 @@ function simple_test {
then
if [ $i == "test-all" ]
then
TFILE="test-ssp$6-${12}-$2-$4-$7-48k-$((${11} / 1000))k-$1"
TFILE="test-ssp$6-mclk-${13}-${12}-$2-$4-$7-48k-$((${11} / 1000))k-$1"
else
TFILE="$i-ssp$6-${12}-$2-$4-$7-48k-$((${11} / 1000))k-$1"
TFILE="$i-ssp$6-mclk-${13}-${12}-$2-$4-$7-48k-$((${11} / 1000))k-$1"
fi
echo "M4 pre-processing test $i -> ${TFILE}"
m4 ${M4_FLAGS} \
Expand All @@ -109,6 +111,7 @@ function simple_test {
-DTEST_SSP_PHY_BITS=$8 \
-DTEST_SSP_DATA_BITS=$9 \
-DTEST_SSP_MODE=${12} \
-DTEST_SSP_MCLK_ID=${13} \
-DTEST_DAI_TYPE=$5 \
$i.m4 > ${TFILE}.conf
echo "Compiling test $i -> ${TFILE}.tplg"
Expand All @@ -122,26 +125,27 @@ function simple_test {
echo "Preparing topology build input..."

# Pre-process the simple tests
simple_test nocodec passthrough "NoCodec-2" s16le SSP 2 s16le 20 16 1920000 19200000 I2S SIMPLE_TESTS[@]
simple_test nocodec passthrough "NoCodec-2" s24le SSP 2 s24le 25 24 2400000 19200000 I2S SIMPLE_TESTS[@]
simple_test nocodec volume "NoCodec-2" s16le SSP 2 s16le 20 16 1920000 19200000 I2S SIMPLE_TESTS[@]
simple_test nocodec volume "NoCodec-2" s24le SSP 2 s24le 25 24 2400000 19200000 I2S SIMPLE_TESTS[@]
simple_test nocodec volume "NoCodec-2" s16le SSP 2 s24le 25 24 2400000 19200000 I2S SIMPLE_TESTS[@]
simple_test nocodec src "NoCodec-2" s24le SSP 2 s24le 25 24 2400000 19200000 I2S SIMPLE_TESTS[@]

simple_test codec passthrough "SSP2-Codec" s16le SSP 2 s16le 20 16 1920000 19200000 I2S SIMPLE_TESTS[@]
simple_test codec passthrough "SSP2-Codec" s24le SSP 2 s24le 25 24 2400000 19200000 I2S SIMPLE_TESTS[@]
simple_test codec volume "SSP2-Codec" s16le SSP 2 s16le 20 16 1920000 19200000 I2S SIMPLE_TESTS[@]
simple_test codec volume "SSP2-Codec" s24le SSP 2 s24le 25 24 2400000 19200000 I2S SIMPLE_TESTS[@]
simple_test codec volume "SSP2-Codec" s24le SSP 2 s16le 20 16 1920000 19200000 I2S SIMPLE_TESTS[@]
simple_test codec volume "SSP2-Codec" s16le SSP 2 s24le 25 24 2400000 19200000 I2S SIMPLE_TESTS[@]
simple_test codec src "SSP2-Codec" s24le SSP 2 s24le 25 24 2400000 19200000 I2S SIMPLE_TESTS[@]
simple_test nocodec passthrough "NoCodec-2" s16le SSP 2 s16le 20 16 1920000 19200000 I2S 0 SIMPLE_TESTS[@]
simple_test nocodec passthrough "NoCodec-2" s24le SSP 2 s24le 25 24 2400000 19200000 I2S 0 SIMPLE_TESTS[@]
simple_test nocodec volume "NoCodec-2" s16le SSP 2 s16le 20 16 1920000 19200000 I2S 0 SIMPLE_TESTS[@]
simple_test nocodec volume "NoCodec-2" s24le SSP 2 s24le 25 24 2400000 19200000 I2S 0 SIMPLE_TESTS[@]
simple_test nocodec volume "NoCodec-2" s16le SSP 2 s24le 25 24 2400000 19200000 I2S 0 SIMPLE_TESTS[@]
simple_test nocodec src "NoCodec-2" s24le SSP 2 s24le 25 24 2400000 19200000 I2S 0 SIMPLE_TESTS[@]

simple_test codec passthrough "SSP2-Codec" s16le SSP 2 s16le 20 16 1920000 19200000 I2S 0 SIMPLE_TESTS[@]
simple_test codec passthrough "SSP2-Codec" s24le SSP 2 s24le 25 24 2400000 19200000 I2S 0 SIMPLE_TESTS[@]
simple_test codec volume "SSP2-Codec" s16le SSP 2 s16le 20 16 1920000 19200000 I2S 0 SIMPLE_TESTS[@]
simple_test codec volume "SSP2-Codec" s24le SSP 2 s24le 25 24 2400000 19200000 I2S 0 SIMPLE_TESTS[@]
simple_test codec volume "SSP2-Codec" s24le SSP 2 s16le 20 16 1920000 19200000 I2S 0 SIMPLE_TESTS[@]
simple_test codec volume "SSP2-Codec" s16le SSP 2 s24le 25 24 2400000 19200000 I2S 0 SIMPLE_TESTS[@]
simple_test codec src "SSP2-Codec" s24le SSP 2 s24le 25 24 2400000 19200000 I2S 0 SIMPLE_TESTS[@]

# for APL
APL_PROTOCOL_TESTS=(I2S LEFT_J DSP_A DSP_B)
APL_SSP_TESTS=(0 1 2 3 4 5)
APL_MODE_TESTS=(volume src)
APL_FORMAT_TESTS=(s16le s24le s32le)
MCLK_IDS=(0 1)

for protocol in ${APL_PROTOCOL_TESTS[@]}
do
Expand All @@ -151,22 +155,28 @@ do
do
for format in ${APL_FORMAT_TESTS[@]}
do
simple_test nocodec $mode "NoCodec-${ssp}" $format SSP $ssp s16le 16 16 1536000 24576000 $protocol SIMPLE_TESTS[@]
simple_test nocodec $mode "NoCodec-${ssp}" $format SSP $ssp s24le 32 24 3072000 24576000 $protocol SIMPLE_TESTS[@]
simple_test nocodec $mode "NoCodec-${ssp}" $format SSP $ssp s32le 32 32 3072000 24576000 $protocol SIMPLE_TESTS[@]

simple_test codec $mode "SSP${ssp}-Codec" $format SSP $ssp s16le 16 16 1536000 24576000 $protocol SIMPLE_TESTS[@]
simple_test codec $mode "SSP${ssp}-Codec" $format SSP $ssp s24le 32 24 3072000 24576000 $protocol SIMPLE_TESTS[@]
simple_test codec $mode "SSP${ssp}-Codec" $format SSP $ssp s32le 32 32 3072000 24576000 $protocol SIMPLE_TESTS[@]
for mclk_id in ${MCLK_IDS[@]}
do
simple_test nocodec $mode "NoCodec-${ssp}" $format SSP $ssp s16le 16 16 1536000 24576000 $protocol $mclk_id SIMPLE_TESTS[@]
simple_test nocodec $mode "NoCodec-${ssp}" $format SSP $ssp s24le 32 24 3072000 24576000 $protocol $mclk_id SIMPLE_TESTS[@]
simple_test nocodec $mode "NoCodec-${ssp}" $format SSP $ssp s32le 32 32 3072000 24576000 $protocol $mclk_id SIMPLE_TESTS[@]

simple_test codec $mode "SSP${ssp}-Codec" $format SSP $ssp s16le 16 16 1536000 24576000 $protocol $mclk_id SIMPLE_TESTS[@]
simple_test codec $mode "SSP${ssp}-Codec" $format SSP $ssp s24le 32 24 3072000 24576000 $protocol $mclk_id SIMPLE_TESTS[@]
simple_test codec $mode "SSP${ssp}-Codec" $format SSP $ssp s32le 32 32 3072000 24576000 $protocol $mclk_id SIMPLE_TESTS[@]
done
done
done
simple_test nocodec passthrough "NoCodec-${ssp}" s16le SSP $ssp s16le 16 16 1536000 24576000 $protocol SIMPLE_TESTS[@]
simple_test nocodec passthrough "NoCodec-${ssp}" s24le SSP $ssp s24le 32 24 3072000 24576000 $protocol SIMPLE_TESTS[@]
simple_test nocodec passthrough "NoCodec-${ssp}" s32le SSP $ssp s32le 32 32 3072000 24576000 $protocol SIMPLE_TESTS[@]
for mclk_id in ${MCLK_IDS[@]}
do
simple_test nocodec passthrough "NoCodec-${ssp}" s16le SSP $ssp s16le 16 16 1536000 24576000 $protocol $mclk_id SIMPLE_TESTS[@]
simple_test nocodec passthrough "NoCodec-${ssp}" s24le SSP $ssp s24le 32 24 3072000 24576000 $protocol $mclk_id SIMPLE_TESTS[@]
simple_test nocodec passthrough "NoCodec-${ssp}" s32le SSP $ssp s32le 32 32 3072000 24576000 $protocol $mclk_id SIMPLE_TESTS[@]

simple_test codec passthrough "SSP${ssp}-Codec" s16le SSP $ssp s16le 16 16 1536000 24576000 $protocol SIMPLE_TESTS[@]
simple_test codec passthrough "SSP${ssp}-Codec" s24le SSP $ssp s24le 32 24 3072000 24576000 $protocol SIMPLE_TESTS[@]
simple_test codec passthrough "SSP${ssp}-Codec" s32le SSP $ssp s32le 32 32 3072000 24576000 $protocol SIMPLE_TESTS[@]
simple_test codec passthrough "SSP${ssp}-Codec" s16le SSP $ssp s16le 16 16 1536000 24576000 $protocol $mclk_id SIMPLE_TESTS[@]
simple_test codec passthrough "SSP${ssp}-Codec" s24le SSP $ssp s24le 32 24 3072000 24576000 $protocol $mclk_id SIMPLE_TESTS[@]
simple_test codec passthrough "SSP${ssp}-Codec" s32le SSP $ssp s32le 32 32 3072000 24576000 $protocol $mclk_id SIMPLE_TESTS[@]
done
done
done

Expand All @@ -178,46 +188,60 @@ do
do
for format in ${APL_FORMAT_TESTS[@]}
do
simple_test nocodec $mode "NoCodec-${ssp}" $format SSP $ssp s16le 20 16 1920000 19200000 $protocol SIMPLE_TESTS[@]
simple_test nocodec $mode "NoCodec-${ssp}" $format SSP $ssp s24le 25 24 2400000 19200000 $protocol SIMPLE_TESTS[@]
simple_test nocodec $mode "NoCodec-${ssp}" $format SSP $ssp s16le 20 16 1920000 19200000 $protocol 0 SIMPLE_TESTS[@]
simple_test nocodec $mode "NoCodec-${ssp}" $format SSP $ssp s24le 25 24 2400000 19200000 $protocol 0 SIMPLE_TESTS[@]

simple_test codec $mode "SSP${ssp}-Codec" $format SSP $ssp s16le 20 16 1920000 19200000 $protocol SIMPLE_TESTS[@]
simple_test codec $mode "SSP${ssp}-Codec" $format SSP $ssp s24le 25 24 2400000 19200000 $protocol SIMPLE_TESTS[@]
simple_test codec $mode "SSP${ssp}-Codec" $format SSP $ssp s16le 20 16 1920000 19200000 $protocol 0 SIMPLE_TESTS[@]
simple_test codec $mode "SSP${ssp}-Codec" $format SSP $ssp s24le 25 24 2400000 19200000 $protocol 0 SIMPLE_TESTS[@]
done
done
simple_test nocodec passthrough "NoCodec-${ssp}" s16le SSP $ssp s16le 20 16 1920000 19200000 $protocol SIMPLE_TESTS[@]
simple_test nocodec passthrough "NoCodec-${ssp}" s24le SSP $ssp s24le 25 24 2400000 19200000 $protocol SIMPLE_TESTS[@]
simple_test nocodec passthrough "NoCodec-${ssp}" s16le SSP $ssp s16le 20 16 1920000 19200000 $protocol 0 SIMPLE_TESTS[@]
simple_test nocodec passthrough "NoCodec-${ssp}" s24le SSP $ssp s24le 25 24 2400000 19200000 $protocol 0 SIMPLE_TESTS[@]

simple_test codec passthrough "SSP${ssp}-Codec" s16le SSP $ssp s16le 20 16 1920000 19200000 $protocol SIMPLE_TESTS[@]
simple_test codec passthrough "SSP${ssp}-Codec" s24le SSP $ssp s24le 25 24 2400000 19200000 $protocol SIMPLE_TESTS[@]
simple_test codec passthrough "SSP${ssp}-Codec" s16le SSP $ssp s16le 20 16 1920000 19200000 $protocol 0 SIMPLE_TESTS[@]
simple_test codec passthrough "SSP${ssp}-Codec" s24le SSP $ssp s24le 25 24 2400000 19200000 $protocol 0 SIMPLE_TESTS[@]
done
done

# for CNL
simple_test nocodec passthrough "NoCodec-2" s16le SSP 2 s16le 25 16 2400000 24000000 I2S SIMPLE_TESTS[@]
simple_test nocodec passthrough "NoCodec-2" s24le SSP 2 s24le 25 24 2400000 24000000 I2S SIMPLE_TESTS[@]
simple_test nocodec volume "NoCodec-2" s16le SSP 2 s16le 25 16 2400000 24000000 I2S SIMPLE_TESTS[@]
simple_test nocodec volume "NoCodec-2" s16le SSP 2 s24le 25 24 2400000 24000000 I2S SIMPLE_TESTS[@]
simple_test nocodec volume "NoCodec-2" s24le SSP 2 s24le 25 24 2400000 24000000 I2S SIMPLE_TESTS[@]
simple_test nocodec volume "NoCodec-2" s24le SSP 2 s16le 25 16 2400000 24000000 I2S SIMPLE_TESTS[@]
simple_test nocodec src "NoCodec-4" s24le SSP 4 s24le 25 24 2400000 24000000 I2S SIMPLE_TESTS[@]
simple_test nocodec passthrough "NoCodec-2" s16le SSP 2 s16le 25 16 2400000 24000000 I2S 0 SIMPLE_TESTS[@]
simple_test nocodec passthrough "NoCodec-2" s24le SSP 2 s24le 25 24 2400000 24000000 I2S 0 SIMPLE_TESTS[@]
simple_test nocodec volume "NoCodec-2" s16le SSP 2 s16le 25 16 2400000 24000000 I2S 0 SIMPLE_TESTS[@]
simple_test nocodec volume "NoCodec-2" s16le SSP 2 s24le 25 24 2400000 24000000 I2S 0 SIMPLE_TESTS[@]
simple_test nocodec volume "NoCodec-2" s24le SSP 2 s24le 25 24 2400000 24000000 I2S 0 SIMPLE_TESTS[@]
simple_test nocodec volume "NoCodec-2" s24le SSP 2 s16le 25 16 2400000 24000000 I2S 0 SIMPLE_TESTS[@]
simple_test nocodec src "NoCodec-4" s24le SSP 4 s24le 25 24 2400000 24000000 I2S 0 SIMPLE_TESTS[@]

# 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[@]
simple_test codec tone "SSP2-Codec" s32le SSP 2 s16le 20 16 1920000 19200000 I2S 0 TONE_TEST[@]
#Tone Test for APL
simple_test codec tone "SSP5-Codec" s32le SSP 5 s24le 32 24 3072000 24576000 I2S TONE_TEST[@]
simple_test codec tone "SSP5-Codec" s32le SSP 5 s32le 32 32 3072000 24576000 I2S TONE_TEST[@]
simple_test codec tone "SSP5-Codec" s32le SSP 5 s24le 32 24 3072000 24576000 I2S 0 TONE_TEST[@]
simple_test codec tone "SSP5-Codec" s32le SSP 5 s32le 32 32 3072000 24576000 I2S 0 TONE_TEST[@]

#DMIC Test
simple_test nocodec passthrough "DMIC0" s32le DMIC 0 s32le 1 500000 4800000\
40 60 1 48000 DMIC_TEST[@]
# DMIC Test Topologies for APL/GLK
DMIC_PDM_CONFIGS=(MONO_PDM0_MICA MONO_PDM0_MICB STEREO_PDM0 STEREO_PDM1 FOUR_CH_PDM0_PDM1)
DMIC_SAMPLE_RATE=(8000 16000 24000 32000 48000 64000 96000)
DMIC_SAMPLE_FORMATS=(s16le s32le)

for pdm in ${DMIC_PDM_CONFIGS[@]}
do
for rate in ${DMIC_SAMPLE_RATE[@]}
do
for format in ${DMIC_SAMPLE_FORMATS[@]}
do
simple_test nocodec passthrough "DMIC0" $format DMIC 0\
$format 1 500000 4800000 40 60 $rate $pdm\
DMIC_TEST[@]
done
done
done

if [ "$USE_XARGS" == "yes" ]
then
echo "Batch processing m4 files..."
M4_STRINGS=${M4_STRINGS%?}
#m4 processing
echo $M4_STRINGS | tr " " "," | tr '\n' '\0' | xargs -P0 -d ',' -n13 bash -c 'm4 "${@:1:${#}-1}" > ${13}.conf' m4
echo $M4_STRINGS | tr " " "," | tr '\n' '\0' | xargs -P0 -d ',' -n14 bash -c 'm4 "${@:1:${#}-1}" > ${14}.conf' m4

#execute alsatplg to create topology binary
TEST_STRINGS=${TEST_STRINGS%?}
Expand Down

0 comments on commit f756455

Please sign in to comment.