[Sound-open-firmware] [PATCH 0/7] Multiple DAI type support in topology
This patchset adds the changes required for multiple DAI types in topology. The main changes are as follows:
1. The tplg build script was hardwired for SSP DAI type. Make changes to accomodate other types. 2. Changes to DAI_CONFIG to accomodate more than just SSP type DAI. 3. The test m4 files similarly were hardwired for SSP. This patchset makes them DAI type agnostic 4. Add DMIC DAI type config definition 5. Add DMIC specific tokens. This is the preliminary version. More tokens will be added as needed. 6. Add DMIC test topology
Ranjani Sridharan (7): [RFC]topology: separate ssp params from dai common params [RFC]topology: scripts: changes to accomodate different DAI types [RFC]topology: add DMIC tokens [RFC]topology: make m4 filenames dai type agnostic [RFC]topology: scripts: add dmic test topology [RFC]topology: add DMIC config definition to DAI config [RFC]topology: add DMIC dai support in test capture m4
topology/m4/dai.m4 | 66 ++++-- topology/sof-apl-nocodec.m4 | 11 +- topology/sof-apl-tdf8532.m4 | 22 +- topology/sof-bdw-rt286.m4 | 11 +- topology/sof-bdw-rt5640.m4 | 11 +- topology/sof-byt-da7213.m4 | 11 +- topology/sof-byt-nocodec.m4 | 11 +- topology/sof-byt-rt5640.m4 | 11 +- topology/sof-byt-rt5645.m4 | 11 +- topology/sof-byt-rt5651.m4 | 11 +- topology/sof-cht-max98090.m4 | 11 +- topology/sof-cht-nocodec.m4 | 11 +- topology/sof-cnl-rt274.m4 | 11 +- topology/sof-hsw-rt5640.m4 | 11 +- topology/sof/tokens.m4 | 14 ++ topology/test/{test-ssp.m4 => test-all.m4} | 39 ++-- .../{test-capture-ssp.m4 => test-capture.m4} | 39 ++-- ...{test-playback-ssp.m4 => test-playback.m4} | 31 +-- ...-playback-ssp.m4 => test-tone-playback.m4} | 25 ++- topology/test/tplg-build.sh | 192 +++++++++++------- 20 files changed, 343 insertions(+), 217 deletions(-) rename topology/test/{test-ssp.m4 => test-all.m4} (65%) rename topology/test/{test-capture-ssp.m4 => test-capture.m4} (55%) rename topology/test/{test-playback-ssp.m4 => test-playback.m4} (65%) rename topology/test/{test-tone-playback-ssp.m4 => test-tone-playback.m4} (65%)
Make tplg build script a bit generic to be able to choose only the required test cases.
Signed-off-by: Ranjani Sridharan ranjani.sridharan@linux.intel.com --- topology/test/tplg-build.sh | 118 ++++++++++++++---------------------- 1 file changed, 44 insertions(+), 74 deletions(-)
diff --git a/topology/test/tplg-build.sh b/topology/test/tplg-build.sh index 36b657e..26c70ad 100755 --- a/topology/test/tplg-build.sh +++ b/topology/test/tplg-build.sh @@ -32,7 +32,8 @@ M4_STRINGS="" #
function simple_test { - for i in ${SIMPLE_TESTS[@]} + TESTS=("${!12}") + for i in ${TESTS[@]} do TFILE="$i$5-${11}-$2-$4-$6-48k-$((${10} / 1000))k-$1" if [ "$USE_XARGS" == "yes" ] @@ -67,54 +68,23 @@ function simple_test { done }
-# process m4 tone test - -# tone_test(name, pipe_name, be_name, format, dai_id, dai_format, dai_phy_bits, dai_data_bits dai_bclk) -# 1) name - test filename suffix -# 2) pipe_name - test component pipeline filename in sof/ -# 3) be_name - BE DAI link name in machine driver, used for matching -# 4) format - PCM sample format -# 5) dai_id - SSP port number -# 6) dai_format - SSP sample format -# 7) dai_phy_bits - SSP physical number of BLKCs per slot/channel -# 8) dai_data_bits - SSP number of valid data bits per slot/channel -# 9) dai_bclk - SSP BCLK in HZ -# 10) dai_mclk - SSP MCLK in HZ -# -function tone_test { - TFILE="$TONE_TEST$5-$2-$4-$6-48k-$1" - echo "M4 pre-processing test $TONE_TEST -> ${TFILE}" - m4 \ - -DTEST_PIPE_NAME="$2" \ - -DTEST_DAI_LINK_NAME="$3" \ - -DTEST_SSP_PORT=$5 \ - -DTEST_SSP_FORMAT=$6 \ - -DTEST_PIPE_FORMAT=$4 \ - -DTEST_SSP_BCLK=$9 \ - -DTEST_SSP_MCLK=${10} \ - -DTEST_SSP_PHY_BITS=$7 \ - -DTEST_SSP_DATA_BITS=$8 \ - $TONE_TEST.m4 > ${TFILE}.conf - echo "Compiling test $TONE_TEST -> ${TFILE}.tplg" - alsatplg -v 1 -c ${TFILE}.conf -o ${TFILE}.tplg -} - echo "Preparing topology build input..."
# Pre-process the simple tests -simple_test nocodec passthrough "NoCodec" s16le 2 s16le 20 16 1920000 19200000 I2S -simple_test nocodec passthrough "NoCodec" s24le 2 s24le 25 24 2400000 19200000 I2S -simple_test nocodec volume "NoCodec" s16le 2 s16le 20 16 1920000 19200000 I2S -simple_test nocodec volume "NoCodec" s24le 2 s24le 25 24 2400000 19200000 I2S -simple_test nocodec volume "NoCodec" s16le 2 s24le 25 24 2400000 19200000 I2S -simple_test nocodec src "NoCodec" s24le 2 s24le 25 24 2400000 19200000 I2S - -simple_test codec passthrough "SSP2-Codec" s16le 2 s16le 20 16 1920000 19200000 I2S -simple_test codec passthrough "SSP2-Codec" s24le 2 s24le 25 24 2400000 19200000 I2S -simple_test codec volume "SSP2-Codec" s16le 2 s16le 20 16 1920000 19200000 I2S -simple_test codec volume "SSP2-Codec" s24le 2 s24le 25 24 2400000 19200000 I2S -simple_test codec volume "SSP2-Codec" s24le 2 s16le 20 16 1920000 19200000 I2S -simple_test codec volume "SSP2-Codec" s16le 2 s24le 25 24 2400000 19200000 I2S -simple_test codec src "SSP2-Codec" s24le 2 s24le 25 24 2400000 19200000 I2S +simple_test nocodec passthrough "NoCodec" s16le 2 s16le 20 16 1920000 19200000 I2S SIMPLE_TESTS[@] +simple_test nocodec passthrough "NoCodec" s24le 2 s24le 25 24 2400000 19200000 I2S SIMPLE_TESTS[@] +simple_test nocodec volume "NoCodec" s16le 2 s16le 20 16 1920000 19200000 I2S SIMPLE_TESTS[@] +simple_test nocodec volume "NoCodec" s24le 2 s24le 25 24 2400000 19200000 I2S SIMPLE_TESTS[@] +simple_test nocodec volume "NoCodec" s16le 2 s24le 25 24 2400000 19200000 I2S SIMPLE_TESTS[@] +simple_test nocodec src "NoCodec" s24le 2 s24le 25 24 2400000 19200000 I2S SIMPLE_TESTS[@] + +simple_test codec passthrough "SSP2-Codec" s16le 2 s16le 20 16 1920000 19200000 I2S SIMPLE_TESTS[@] +simple_test codec passthrough "SSP2-Codec" s24le 2 s24le 25 24 2400000 19200000 I2S SIMPLE_TESTS[@] +simple_test codec volume "SSP2-Codec" s16le 2 s16le 20 16 1920000 19200000 I2S SIMPLE_TESTS[@] +simple_test codec volume "SSP2-Codec" s24le 2 s24le 25 24 2400000 19200000 I2S SIMPLE_TESTS[@] +simple_test codec volume "SSP2-Codec" s24le 2 s16le 20 16 1920000 19200000 I2S SIMPLE_TESTS[@] +simple_test codec volume "SSP2-Codec" s16le 2 s24le 25 24 2400000 19200000 I2S SIMPLE_TESTS[@] +simple_test codec src "SSP2-Codec" s24le 2 s24le 25 24 2400000 19200000 I2S SIMPLE_TESTS[@]
# for APL APL_PROTOCOL_TESTS=(I2S LEFT_J DSP_A DSP_B) @@ -130,22 +100,22 @@ do do for format in ${APL_FORMAT_TESTS[@]} do - simple_test nocodec $mode "NoCodec" $format $ssp s16le 16 16 1536000 24576000 $protocol - simple_test nocodec $mode "NoCodec" $format $ssp s24le 32 24 3072000 24576000 $protocol - simple_test nocodec $mode "NoCodec" $format $ssp s32le 32 32 3072000 24576000 $protocol + simple_test nocodec $mode "NoCodec" $format $ssp s16le 16 16 1536000 24576000 $protocol SIMPLE_TESTS[@] + simple_test nocodec $mode "NoCodec" $format $ssp s24le 32 24 3072000 24576000 $protocol SIMPLE_TESTS[@] + simple_test nocodec $mode "NoCodec" $format $ssp s32le 32 32 3072000 24576000 $protocol SIMPLE_TESTS[@]
- simple_test codec $mode "SSP${ssp}-Codec" $format $ssp s16le 16 16 1536000 24576000 $protocol - simple_test codec $mode "SSP${ssp}-Codec" $format $ssp s24le 32 24 3072000 24576000 $protocol - simple_test codec $mode "SSP${ssp}-Codec" $format $ssp s32le 32 32 3072000 24576000 $protocol + simple_test codec $mode "SSP${ssp}-Codec" $format $ssp s16le 16 16 1536000 24576000 $protocol SIMPLE_TESTS[@] + simple_test codec $mode "SSP${ssp}-Codec" $format $ssp s24le 32 24 3072000 24576000 $protocol SIMPLE_TESTS[@] + simple_test codec $mode "SSP${ssp}-Codec" $format $ssp s32le 32 32 3072000 24576000 $protocol SIMPLE_TESTS[@] done done - simple_test nocodec passthrough "NoCodec" s16le $ssp s16le 16 16 1536000 24576000 $protocol - simple_test nocodec passthrough "NoCodec" s24le $ssp s24le 32 24 3072000 24576000 $protocol - simple_test nocodec passthrough "NoCodec" s32le $ssp s32le 32 32 3072000 24576000 $protocol + simple_test nocodec passthrough "NoCodec" s16le $ssp s16le 16 16 1536000 24576000 $protocol SIMPLE_TESTS[@] + simple_test nocodec passthrough "NoCodec" s24le $ssp s24le 32 24 3072000 24576000 $protocol SIMPLE_TESTS[@] + simple_test nocodec passthrough "NoCodec" s32le $ssp s32le 32 32 3072000 24576000 $protocol SIMPLE_TESTS[@]
- simple_test codec passthrough "SSP${ssp}-Codec" s16le $ssp s16le 16 16 1536000 24576000 $protocol - simple_test codec passthrough "SSP${ssp}-Codec" s24le $ssp s24le 32 24 3072000 24576000 $protocol - simple_test codec passthrough "SSP${ssp}-Codec" s32le $ssp s32le 32 32 3072000 24576000 $protocol + simple_test codec passthrough "SSP${ssp}-Codec" s16le $ssp s16le 16 16 1536000 24576000 $protocol SIMPLE_TESTS[@] + simple_test codec passthrough "SSP${ssp}-Codec" s24le $ssp s24le 32 24 3072000 24576000 $protocol SIMPLE_TESTS[@] + simple_test codec passthrough "SSP${ssp}-Codec" s32le $ssp s32le 32 32 3072000 24576000 $protocol SIMPLE_TESTS[@] done done
@@ -157,32 +127,32 @@ do do for format in ${APL_FORMAT_TESTS[@]} do - simple_test nocodec $mode "NoCodec" $format $ssp s16le 20 16 1920000 19200000 $protocol - simple_test nocodec $mode "NoCodec" $format $ssp s24le 25 24 2400000 19200000 $protocol + simple_test nocodec $mode "NoCodec" $format $ssp s16le 20 16 1920000 19200000 $protocol SIMPLE_TESTS[@] + simple_test nocodec $mode "NoCodec" $format $ssp s24le 25 24 2400000 19200000 $protocol SIMPLE_TESTS[@]
- simple_test codec $mode "SSP${ssp}-Codec" $format $ssp s16le 20 16 1920000 19200000 $protocol - simple_test codec $mode "SSP${ssp}-Codec" $format $ssp s24le 25 24 2400000 19200000 $protocol + simple_test codec $mode "SSP${ssp}-Codec" $format $ssp s16le 20 16 1920000 19200000 $protocol SIMPLE_TESTS[@] + simple_test codec $mode "SSP${ssp}-Codec" $format $ssp s24le 25 24 2400000 19200000 $protocol SIMPLE_TESTS[@] done done - simple_test nocodec passthrough "NoCodec" s16le $ssp s16le 20 16 1920000 19200000 $protocol - simple_test nocodec passthrough "NoCodec" s24le $ssp s24le 25 24 2400000 19200000 $protocol + simple_test nocodec passthrough "NoCodec" s16le $ssp s16le 20 16 1920000 19200000 $protocol SIMPLE_TESTS[@] + simple_test nocodec passthrough "NoCodec" s24le $ssp s24le 25 24 2400000 19200000 $protocol SIMPLE_TESTS[@]
- simple_test codec passthrough "SSP${ssp}-Codec" s16le $ssp s16le 20 16 1920000 19200000 $protocol - simple_test codec passthrough "SSP${ssp}-Codec" s24le $ssp s24le 25 24 2400000 19200000 $protocol + simple_test codec passthrough "SSP${ssp}-Codec" s16le $ssp s16le 20 16 1920000 19200000 $protocol SIMPLE_TESTS[@] + simple_test codec passthrough "SSP${ssp}-Codec" s24le $ssp s24le 25 24 2400000 19200000 $protocol SIMPLE_TESTS[@] done done
# for CNL -simple_test nocodec passthrough "NoCodec" s16le 2 s16le 25 16 2400000 24000000 I2S -simple_test nocodec passthrough "NoCodec" s24le 2 s24le 25 24 2400000 24000000 I2S -simple_test nocodec volume "NoCodec" s16le 2 s16le 25 16 2400000 24000000 I2S -simple_test nocodec volume "NoCodec" s16le 2 s24le 25 24 2400000 24000000 I2S -simple_test nocodec volume "NoCodec" s24le 2 s24le 25 24 2400000 24000000 I2S -simple_test nocodec volume "NoCodec" s24le 2 s16le 25 16 2400000 24000000 I2S -simple_test nocodec src "NoCodec" s24le 4 s24le 25 24 2400000 24000000 I2S +simple_test nocodec passthrough "NoCodec" s16le 2 s16le 25 16 2400000 24000000 I2S SIMPLE_TESTS[@] +simple_test nocodec passthrough "NoCodec" s24le 2 s24le 25 24 2400000 24000000 I2S SIMPLE_TESTS[@] +simple_test nocodec volume "NoCodec" s16le 2 s16le 25 16 2400000 24000000 I2S SIMPLE_TESTS[@] +simple_test nocodec volume "NoCodec" s16le 2 s24le 25 24 2400000 24000000 I2S SIMPLE_TESTS[@] +simple_test nocodec volume "NoCodec" s24le 2 s24le 25 24 2400000 24000000 I2S SIMPLE_TESTS[@] +simple_test nocodec volume "NoCodec" s24le 2 s16le 25 16 2400000 24000000 I2S SIMPLE_TESTS[@] +simple_test nocodec src "NoCodec" s24le 4 s24le 25 24 2400000 24000000 I2S SIMPLE_TESTS[@]
# Tone test: Tone component only supports s32le currently -tone_test codec tone "SSP2-Codec" s32le 2 s16le 20 16 1920000 19200000 +simple_test codec tone "SSP2-Codec" s32le 2 s16le 20 16 1920000 19200000 I2S TONE_TEST[@]
if [ "$USE_XARGS" == "yes" ] then
Please ignore this patch. Sent in error. Sorry for the inconvenience.
Ranjani
On Mon, 2018-05-21 at 23:54 -0700, Ranjani Sridharan wrote:
Make tplg build script a bit generic to be able to choose only the required test cases.
Signed-off-by: Ranjani Sridharan ranjani.sridharan@linux.intel.com
topology/test/tplg-build.sh | 118 ++++++++++++++------------------
1 file changed, 44 insertions(+), 74 deletions(-)
diff --git a/topology/test/tplg-build.sh b/topology/test/tplg- build.sh index 36b657e..26c70ad 100755 --- a/topology/test/tplg-build.sh +++ b/topology/test/tplg-build.sh @@ -32,7 +32,8 @@ M4_STRINGS="" #
function simple_test {
- for i in ${SIMPLE_TESTS[@]}
- TESTS=("${!12}")
- for i in ${TESTS[@]} do TFILE="$i$5-${11}-$2-$4-$6-48k-$((${10} / 1000))k-
$1" if [ "$USE_XARGS" == "yes" ] @@ -67,54 +68,23 @@ function simple_test { done }
-# process m4 tone test - -# tone_test(name, pipe_name, be_name, format, dai_id, dai_format, dai_phy_bits, dai_data_bits dai_bclk) -# 1) name - test filename suffix -# 2) pipe_name - test component pipeline filename in sof/ -# 3) be_name - BE DAI link name in machine driver, used for matching -# 4) format - PCM sample format -# 5) dai_id - SSP port number -# 6) dai_format - SSP sample format -# 7) dai_phy_bits - SSP physical number of BLKCs per slot/channel -# 8) dai_data_bits - SSP number of valid data bits per slot/channel -# 9) dai_bclk - SSP BCLK in HZ -# 10) dai_mclk - SSP MCLK in HZ -# -function tone_test {
- TFILE="$TONE_TEST$5-$2-$4-$6-48k-$1"
- echo "M4 pre-processing test $TONE_TEST -> ${TFILE}"
- m4 \
-DTEST_PIPE_NAME="$2" \
-DTEST_DAI_LINK_NAME="$3" \
-DTEST_SSP_PORT=$5 \
-DTEST_SSP_FORMAT=$6 \
-DTEST_PIPE_FORMAT=$4 \
-DTEST_SSP_BCLK=$9 \
-DTEST_SSP_MCLK=${10} \
-DTEST_SSP_PHY_BITS=$7 \
-DTEST_SSP_DATA_BITS=$8 \
$TONE_TEST.m4 > ${TFILE}.conf
- echo "Compiling test $TONE_TEST -> ${TFILE}.tplg"
- alsatplg -v 1 -c ${TFILE}.conf -o ${TFILE}.tplg
-}
echo "Preparing topology build input..."
# Pre-process the simple tests -simple_test nocodec passthrough "NoCodec" s16le 2 s16le 20 16 1920000 19200000 I2S -simple_test nocodec passthrough "NoCodec" s24le 2 s24le 25 24 2400000 19200000 I2S -simple_test nocodec volume "NoCodec" s16le 2 s16le 20 16 1920000 19200000 I2S -simple_test nocodec volume "NoCodec" s24le 2 s24le 25 24 2400000 19200000 I2S -simple_test nocodec volume "NoCodec" s16le 2 s24le 25 24 2400000 19200000 I2S -simple_test nocodec src "NoCodec" s24le 2 s24le 25 24 2400000 19200000 I2S
-simple_test codec passthrough "SSP2-Codec" s16le 2 s16le 20 16 1920000 19200000 I2S -simple_test codec passthrough "SSP2-Codec" s24le 2 s24le 25 24 2400000 19200000 I2S -simple_test codec volume "SSP2-Codec" s16le 2 s16le 20 16 1920000 19200000 I2S -simple_test codec volume "SSP2-Codec" s24le 2 s24le 25 24 2400000 19200000 I2S -simple_test codec volume "SSP2-Codec" s24le 2 s16le 20 16 1920000 19200000 I2S -simple_test codec volume "SSP2-Codec" s16le 2 s24le 25 24 2400000 19200000 I2S -simple_test codec src "SSP2-Codec" s24le 2 s24le 25 24 2400000 19200000 I2S +simple_test nocodec passthrough "NoCodec" s16le 2 s16le 20 16 1920000 19200000 I2S SIMPLE_TESTS[@] +simple_test nocodec passthrough "NoCodec" s24le 2 s24le 25 24 2400000 19200000 I2S SIMPLE_TESTS[@] +simple_test nocodec volume "NoCodec" s16le 2 s16le 20 16 1920000 19200000 I2S SIMPLE_TESTS[@] +simple_test nocodec volume "NoCodec" s24le 2 s24le 25 24 2400000 19200000 I2S SIMPLE_TESTS[@] +simple_test nocodec volume "NoCodec" s16le 2 s24le 25 24 2400000 19200000 I2S SIMPLE_TESTS[@] +simple_test nocodec src "NoCodec" s24le 2 s24le 25 24 2400000 19200000 I2S SIMPLE_TESTS[@]
+simple_test codec passthrough "SSP2-Codec" s16le 2 s16le 20 16 1920000 19200000 I2S SIMPLE_TESTS[@] +simple_test codec passthrough "SSP2-Codec" s24le 2 s24le 25 24 2400000 19200000 I2S SIMPLE_TESTS[@] +simple_test codec volume "SSP2-Codec" s16le 2 s16le 20 16 1920000 19200000 I2S SIMPLE_TESTS[@] +simple_test codec volume "SSP2-Codec" s24le 2 s24le 25 24 2400000 19200000 I2S SIMPLE_TESTS[@] +simple_test codec volume "SSP2-Codec" s24le 2 s16le 20 16 1920000 19200000 I2S SIMPLE_TESTS[@] +simple_test codec volume "SSP2-Codec" s16le 2 s24le 25 24 2400000 19200000 I2S SIMPLE_TESTS[@] +simple_test codec src "SSP2-Codec" s24le 2 s24le 25 24 2400000 19200000 I2S SIMPLE_TESTS[@]
# for APL APL_PROTOCOL_TESTS=(I2S LEFT_J DSP_A DSP_B) @@ -130,22 +100,22 @@ do do for format in ${APL_FORMAT_TESTS[@]} do
simple_test nocodec $mode "NoCodec"
$format $ssp s16le 16 16 1536000 24576000 $protocol
simple_test nocodec $mode "NoCodec"
$format $ssp s24le 32 24 3072000 24576000 $protocol
simple_test nocodec $mode "NoCodec"
$format $ssp s32le 32 32 3072000 24576000 $protocol
simple_test nocodec $mode "NoCodec"
$format $ssp s16le 16 16 1536000 24576000 $protocol SIMPLE_TESTS[@]
simple_test nocodec $mode "NoCodec"
$format $ssp s24le 32 24 3072000 24576000 $protocol SIMPLE_TESTS[@]
simple_test nocodec $mode "NoCodec"
$format $ssp s32le 32 32 3072000 24576000 $protocol SIMPLE_TESTS[@]
simple_test codec $mode "SSP${ssp}-
Codec" $format $ssp s16le 16 16 1536000 24576000 $protocol
simple_test codec $mode "SSP${ssp}-
Codec" $format $ssp s24le 32 24 3072000 24576000 $protocol
simple_test codec $mode "SSP${ssp}-
Codec" $format $ssp s32le 32 32 3072000 24576000 $protocol
simple_test codec $mode "SSP${ssp}-
Codec" $format $ssp s16le 16 16 1536000 24576000 $protocol SIMPLE_TESTS[@]
simple_test codec $mode "SSP${ssp}-
Codec" $format $ssp s24le 32 24 3072000 24576000 $protocol SIMPLE_TESTS[@]
simple_test codec $mode "SSP${ssp}-
Codec" $format $ssp s32le 32 32 3072000 24576000 $protocol SIMPLE_TESTS[@] done done
simple_test nocodec passthrough "NoCodec" s16le $ssp
s16le 16 16 1536000 24576000 $protocol
simple_test nocodec passthrough "NoCodec" s24le $ssp
s24le 32 24 3072000 24576000 $protocol
simple_test nocodec passthrough "NoCodec" s32le $ssp
s32le 32 32 3072000 24576000 $protocol
simple_test nocodec passthrough "NoCodec" s16le $ssp
s16le 16 16 1536000 24576000 $protocol SIMPLE_TESTS[@]
simple_test nocodec passthrough "NoCodec" s24le $ssp
s24le 32 24 3072000 24576000 $protocol SIMPLE_TESTS[@]
simple_test nocodec passthrough "NoCodec" s32le $ssp
s32le 32 32 3072000 24576000 $protocol SIMPLE_TESTS[@]
simple_test codec passthrough "SSP${ssp}-Codec"
s16le $ssp s16le 16 16 1536000 24576000 $protocol
simple_test codec passthrough "SSP${ssp}-Codec"
s24le $ssp s24le 32 24 3072000 24576000 $protocol
simple_test codec passthrough "SSP${ssp}-Codec"
s32le $ssp s32le 32 32 3072000 24576000 $protocol
simple_test codec passthrough "SSP${ssp}-Codec"
s16le $ssp s16le 16 16 1536000 24576000 $protocol SIMPLE_TESTS[@]
simple_test codec passthrough "SSP${ssp}-Codec"
s24le $ssp s24le 32 24 3072000 24576000 $protocol SIMPLE_TESTS[@]
simple_test codec passthrough "SSP${ssp}-Codec"
s32le $ssp s32le 32 32 3072000 24576000 $protocol SIMPLE_TESTS[@] done done
@@ -157,32 +127,32 @@ do do for format in ${APL_FORMAT_TESTS[@]} do
simple_test nocodec $mode "NoCodec"
$format $ssp s16le 20 16 1920000 19200000 $protocol
simple_test nocodec $mode "NoCodec"
$format $ssp s24le 25 24 2400000 19200000 $protocol
simple_test nocodec $mode "NoCodec"
$format $ssp s16le 20 16 1920000 19200000 $protocol SIMPLE_TESTS[@]
simple_test nocodec $mode "NoCodec"
$format $ssp s24le 25 24 2400000 19200000 $protocol SIMPLE_TESTS[@]
simple_test codec $mode "SSP${ssp}-
Codec" $format $ssp s16le 20 16 1920000 19200000 $protocol
simple_test codec $mode "SSP${ssp}-
Codec" $format $ssp s24le 25 24 2400000 19200000 $protocol
simple_test codec $mode "SSP${ssp}-
Codec" $format $ssp s16le 20 16 1920000 19200000 $protocol SIMPLE_TESTS[@]
simple_test codec $mode "SSP${ssp}-
Codec" $format $ssp s24le 25 24 2400000 19200000 $protocol SIMPLE_TESTS[@] done done
simple_test nocodec passthrough "NoCodec" s16le $ssp
s16le 20 16 1920000 19200000 $protocol
simple_test nocodec passthrough "NoCodec" s24le $ssp
s24le 25 24 2400000 19200000 $protocol
simple_test nocodec passthrough "NoCodec" s16le $ssp
s16le 20 16 1920000 19200000 $protocol SIMPLE_TESTS[@]
simple_test nocodec passthrough "NoCodec" s24le $ssp
s24le 25 24 2400000 19200000 $protocol SIMPLE_TESTS[@]
simple_test codec passthrough "SSP${ssp}-Codec"
s16le $ssp s16le 20 16 1920000 19200000 $protocol
simple_test codec passthrough "SSP${ssp}-Codec"
s24le $ssp s24le 25 24 2400000 19200000 $protocol
simple_test codec passthrough "SSP${ssp}-Codec"
s16le $ssp s16le 20 16 1920000 19200000 $protocol SIMPLE_TESTS[@]
simple_test codec passthrough "SSP${ssp}-Codec"
s24le $ssp s24le 25 24 2400000 19200000 $protocol SIMPLE_TESTS[@] done done
# for CNL -simple_test nocodec passthrough "NoCodec" s16le 2 s16le 25 16 2400000 24000000 I2S -simple_test nocodec passthrough "NoCodec" s24le 2 s24le 25 24 2400000 24000000 I2S -simple_test nocodec volume "NoCodec" s16le 2 s16le 25 16 2400000 24000000 I2S -simple_test nocodec volume "NoCodec" s16le 2 s24le 25 24 2400000 24000000 I2S -simple_test nocodec volume "NoCodec" s24le 2 s24le 25 24 2400000 24000000 I2S -simple_test nocodec volume "NoCodec" s24le 2 s16le 25 16 2400000 24000000 I2S -simple_test nocodec src "NoCodec" s24le 4 s24le 25 24 2400000 24000000 I2S +simple_test nocodec passthrough "NoCodec" s16le 2 s16le 25 16 2400000 24000000 I2S SIMPLE_TESTS[@] +simple_test nocodec passthrough "NoCodec" s24le 2 s24le 25 24 2400000 24000000 I2S SIMPLE_TESTS[@] +simple_test nocodec volume "NoCodec" s16le 2 s16le 25 16 2400000 24000000 I2S SIMPLE_TESTS[@] +simple_test nocodec volume "NoCodec" s16le 2 s24le 25 24 2400000 24000000 I2S SIMPLE_TESTS[@] +simple_test nocodec volume "NoCodec" s24le 2 s24le 25 24 2400000 24000000 I2S SIMPLE_TESTS[@] +simple_test nocodec volume "NoCodec" s24le 2 s16le 25 16 2400000 24000000 I2S SIMPLE_TESTS[@] +simple_test nocodec src "NoCodec" s24le 4 s24le 25 24 2400000 24000000 I2S SIMPLE_TESTS[@]
# Tone test: Tone component only supports s32le currently -tone_test codec tone "SSP2-Codec" s32le 2 s16le 20 16 1920000 19200000 +simple_test codec tone "SSP2-Codec" s32le 2 s16le 20 16 1920000 19200000 I2S TONE_TEST[@]
if [ "$USE_XARGS" == "yes" ] then
This patch makes the following changes to make way for handling different DAI types in tplg build script:
1. Define the test DAI type while processing m4 files 2. DAI format and DAI port might be relevant for other types of DAI's. So use generic TEST_DAI_PORT and TEST_DAI_FORMAT instead of TEST_SSP_PORT TEST_SSP_FORMAT
Signed-off-by: Ranjani Sridharan ranjani.sridharan@linux.intel.com --- topology/test/test-capture-ssp.m4 | 18 +-- topology/test/test-playback-ssp.m4 | 18 +-- topology/test/test-ssp.m4 | 26 ++-- topology/test/test-tone-playback-ssp.m4 | 12 +- topology/test/tplg-build.sh | 154 +++++++++++++----------- 5 files changed, 121 insertions(+), 107 deletions(-)
diff --git a/topology/test/test-capture-ssp.m4 b/topology/test/test-capture-ssp.m4 index af486ab..a1f283f 100644 --- a/topology/test/test-capture-ssp.m4 +++ b/topology/test/test-capture-ssp.m4 @@ -21,8 +21,8 @@ include(`dsps/byt.m4') # # TEST_PIPE_NAME - Pipe name # TEST_DAI_LINK_NAME - BE DAI link name e.g. "NoCodec" -# TEST_SSP_PORT - SSP port number e.g. 2 -# TEST_SSP_FORMAT - SSP data format e.g s16le +# TEST_DAI_PORT - SSP port number e.g. 2 +# TEST_DAI_FORMAT - SSP data format e.g s16le # TEST_PIPE_FORMAT - Pipeline format e.g. s16le # TEST_SSP_MCLK - SSP MCLK in Hz # TEST_SSP_BCLK - SSP BCLK in Hz @@ -34,7 +34,7 @@ include(`dsps/byt.m4') # # Define the pipeline # -# PCM0 <---> SSP TEST_SSP_PORT +# PCM0 <---> SSP TEST_DAI_PORT #
# Passthrough playback pipeline 2 on PCM 0 using max 2 channels of s24le. @@ -44,18 +44,18 @@ include(`dsps/byt.m4') PIPELINE_PCM_DAI_ADD(sof/pipe-TEST_PIPE_NAME-capture.m4, 2, 0, 2, TEST_PIPE_FORMAT, 48, 1000, 0, 0, 0, 1, - SSP, TEST_SSP_PORT, TEST_SSP_FORMAT, 2) + TEST_DAI_TYPE, TEST_DAI_PORT, TEST_DAI_FORMAT, 2)
# # DAI configuration # -# SSP port TEST_SSP_PORT is our only pipeline DAI +# SSP port TEST_DAI_PORT is our only pipeline DAI # -# capture DAI is SSP TEST_SSP_PORT using 2 periods +# capture DAI is SSP TEST_DAI_PORT using 2 periods # Buffers use s24le format, with 48 frame per 1000us on core 0 with priority 0 DAI_ADD(sof/pipe-dai-capture.m4, - 2, SSP, TEST_SSP_PORT, TEST_DAI_LINK_NAME, - PIPELINE_SINK_2, 2, TEST_SSP_FORMAT, + 2, TEST_DAI_TYPE, TEST_DAI_PORT, TEST_DAI_LINK_NAME, + PIPELINE_SINK_2, 2, TEST_DAI_FORMAT, 48, 1000, 0, 0)
# PCM Passthrough @@ -66,7 +66,7 @@ PCM_CAPTURE_ADD(Passthrough, 3, 0, 0, PIPELINE_PCM_2) # # Clocks masters wrt codec # -# TEST_SSP_DATA_BITS bit I2S using TEST_SSP_PHY_BITS bit sample conatiner on SSP TEST_SSP_PORT +# TEST_SSP_DATA_BITS bit I2S using TEST_SSP_PHY_BITS bit sample conatiner on SSP TEST_DAI_PORT # DAI_CONFIG(TEST_DAI_TYPE, TEST_DAI_PORT, TEST_DAI_LINK_NAME, SSP_CONFIG(TEST_SSP_MODE, diff --git a/topology/test/test-playback-ssp.m4 b/topology/test/test-playback-ssp.m4 index a2068fe..a5a2406 100644 --- a/topology/test/test-playback-ssp.m4 +++ b/topology/test/test-playback-ssp.m4 @@ -21,8 +21,8 @@ include(`dsps/byt.m4') # # TEST_PIPE_NAME - Pipe name # TEST_DAI_LINK_NAME - BE DAI link name e.g. "NoCodec" -# TEST_SSP_PORT - SSP port number e.g. 2 -# TEST_SSP_FORMAT - SSP data format e.g s16le +# TEST_DAI_PORT - SSP port number e.g. 2 +# TEST_DAI_FORMAT - SSP data format e.g s16le # TEST_PIPE_FORMAT - Pipeline format e.g. s16le # TEST_SSP_MCLK - SSP MCLK in Hz # TEST_SSP_BCLK - SSP BCLK in Hz @@ -34,7 +34,7 @@ include(`dsps/byt.m4') # # Define the pipeline # -# PCM0 <---> SSP TEST_SSP_PORT +# PCM0 <---> SSP TEST_DAI_PORT #
# Passthrough playback pipeline 1 on PCM 0 using max 2 channels of s24le. @@ -44,18 +44,18 @@ include(`dsps/byt.m4') PIPELINE_PCM_DAI_ADD(sof/pipe-TEST_PIPE_NAME-playback.m4, 1, 0, 2, TEST_PIPE_FORMAT, 48, 1000, 0, 0, 0, 1, - SSP, TEST_SSP_PORT, TEST_SSP_FORMAT, 2) + TEST_DAI_TYPE, TEST_DAI_PORT, TEST_DAI_FORMAT, 2) # # DAI configuration # -# SSP port TEST_SSP_PORT is our only pipeline DAI +# SSP port TEST_DAI_PORT is our only pipeline DAI #
-# playback DAI is SSP TEST_SSP_PORT using 2 periods +# playback DAI is SSP TEST_DAI_PORT using 2 periods # Buffers use s24le format, with 48 frame per 1000us on core 0 with priority 0 DAI_ADD(sof/pipe-dai-playback.m4, - 1, SSP, TEST_SSP_PORT, TEST_DAI_LINK_NAME, - PIPELINE_SOURCE_1, 2, TEST_SSP_FORMAT, + 1, TEST_DAI_TYPE, TEST_DAI_PORT, TEST_DAI_LINK_NAME, + PIPELINE_SOURCE_1, 2, TEST_DAI_FORMAT, 48, 1000, 0, 0)
# PCM Passthrough @@ -66,7 +66,7 @@ PCM_PLAYBACK_ADD(Passthrough, 3, 0, 0, PIPELINE_PCM_1) # # Clocks masters wrt codec # -# TEST_SSP_DATA_BITS bit I2S using TEST_SSP_PHY_BITS bit sample conatiner on SSP TEST_SSP_PORT +# TEST_SSP_DATA_BITS bit I2S using TEST_SSP_PHY_BITS bit sample conatiner on SSP TEST_DAI_PORT # DAI_CONFIG(TEST_DAI_TYPE, TEST_DAI_PORT, TEST_DAI_LINK_NAME, SSP_CONFIG(TEST_SSP_MODE, diff --git a/topology/test/test-ssp.m4 b/topology/test/test-ssp.m4 index b121e9a..6b975c2 100644 --- a/topology/test/test-ssp.m4 +++ b/topology/test/test-ssp.m4 @@ -21,8 +21,8 @@ include(`dsps/byt.m4') # # TEST_PIPE_NAME - Pipe name # TEST_DAI_LINK_NAME - BE DAI link name e.g. "NoCodec" -# TEST_SSP_PORT - SSP port number e.g. 2 -# TEST_SSP_FORMAT - SSP data format e.g s16le +# TEST_DAI_PORT - SSP port number e.g. 2 +# TEST_DAI_FORMAT - SSP data format e.g s16le # TEST_PIPE_FORMAT - Pipeline format e.g. s16le # TEST_SSP_MCLK - SSP BCLK in Hz # TEST_SSP_BCLK - SSP BCLK in Hz @@ -34,7 +34,7 @@ include(`dsps/byt.m4') # # Define the pipeline # -# PCM0 <-- TEST_PIPE_NAME pipe --> SSP TEST_SSP_PORT +# PCM0 <-- TEST_PIPE_NAME pipe --> SSP TEST_DAI_PORT #
# Passthrough playback pipeline 1 on PCM 0 using max 2 channels of s24le. @@ -44,7 +44,7 @@ include(`dsps/byt.m4') PIPELINE_PCM_DAI_ADD(sof/pipe-TEST_PIPE_NAME-playback.m4, 1, 0, 2, TEST_PIPE_FORMAT, 48, 1000, 0, 0, 0, 1, - SSP, TEST_SSP_PORT, TEST_SSP_FORMAT, 2) + TEST_DAI_TYPE, TEST_DAI_PORT, TEST_DAI_FORMAT, 2)
# Passthrough playback pipeline 2 on PCM 0 using max 2 channels of s24le. @@ -54,26 +54,26 @@ PIPELINE_PCM_DAI_ADD(sof/pipe-TEST_PIPE_NAME-playback.m4, PIPELINE_PCM_DAI_ADD(sof/pipe-TEST_PIPE_NAME-capture.m4, 2, 0, 2, TEST_PIPE_FORMAT, 48, 1000, 0, 0, 0, 1, - SSP, TEST_SSP_PORT, TEST_SSP_FORMAT, 2) + TEST_DAI_TYPE, TEST_DAI_PORT, TEST_DAI_FORMAT, 2)
# # DAI configuration # -# SSP port TEST_SSP_PORT is our only pipeline DAI +# SSP port TEST_DAI_PORT is our only pipeline DAI #
-# playback DAI is SSP TEST_SSP_PORT using 2 periods +# playback DAI is SSP TEST_DAI_PORT using 2 periods # Buffers use s24le format, with 48 frame per 1000us on core 0 with priority 0 DAI_ADD(sof/pipe-dai-playback.m4, - 1, SSP, TEST_SSP_PORT, TEST_DAI_LINK_NAME, - PIPELINE_SOURCE_1, 2, TEST_SSP_FORMAT, + 1, TEST_DAI_TYPE, TEST_DAI_PORT, TEST_DAI_LINK_NAME, + PIPELINE_SOURCE_1, 2, TEST_DAI_FORMAT, 48, 1000, 0, 0)
-# capture DAI is SSP TEST_SSP_PORT using 2 periods +# capture DAI is SSP TEST_DAI_PORT using 2 periods # Buffers use s24le format, with 48 frame per 1000us on core 0 with priority 0 DAI_ADD(sof/pipe-dai-capture.m4, - 2, SSP, TEST_SSP_PORT, TEST_DAI_LINK_NAME, - PIPELINE_SINK_2, 2, TEST_SSP_FORMAT, + 2, TEST_DAI_TYPE, TEST_DAI_PORT, TEST_DAI_LINK_NAME, + PIPELINE_SINK_2, 2, TEST_DAI_FORMAT, 48, 1000, 0, 0)
# PCM Passthrough @@ -84,7 +84,7 @@ PCM_DUPLEX_ADD(Passthrough, 3, 0, 0, PIPELINE_PCM_1, PIPELINE_PCM_2) # # Clocks masters wrt codec # -# TEST_SSP_DATA_BITS bit I2S using TEST_SSP_PHY_BITS bit sample conatiner on SSP TEST_SSP_PORT +# TEST_SSP_DATA_BITS bit I2S using TEST_SSP_PHY_BITS bit sample conatiner on SSP TEST_DAI_PORT # DAI_CONFIG(TEST_DAI_TYPE, TEST_DAI_PORT, TEST_DAI_LINK_NAME, SSP_CONFIG(TEST_SSP_MODE, diff --git a/topology/test/test-tone-playback-ssp.m4 b/topology/test/test-tone-playback-ssp.m4 index 6dba1fd..276ab2f 100644 --- a/topology/test/test-tone-playback-ssp.m4 +++ b/topology/test/test-tone-playback-ssp.m4 @@ -21,8 +21,8 @@ include(`dsps/byt.m4') # # TEST_PIPE_NAME - Pipe name # TEST_DAI_LINK_NAME - BE DAI link name e.g. "NoCodec" -# TEST_SSP_PORT - SSP port number e.g. 2 -# TEST_SSP_FORMAT - SSP data format e.g s16le +# TEST_DAI_PORT - SSP port number e.g. 2 +# TEST_DAI_FORMAT - SSP data format e.g s16le # TEST_PIPE_FORMAT - Pipeline format e.g. s16le # TEST_SSP_MCLK - SSP MCLK in Hz # TEST_SSP_BCLK - SSP BCLK in Hz @@ -43,10 +43,10 @@ PIPELINE_ADD(sof/pipe-tone.m4, 48, 1000, 0, 0)
# playback DAI is SSP2 using 2 periods -# Buffers use TEST_SSP_FORMAT format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use TEST_DAI_FORMAT format, with 48 frame per 1000us on core 0 with priority 0 DAI_ADD(sof/pipe-dai-playback.m4, - 5, SSP, TEST_SSP_PORT, TEST_DAI_LINK_NAME, - PIPELINE_SOURCE_5, 2, TEST_SSP_FORMAT, + 5, TEST_DAI_TYPE, TEST_DAI_PORT, TEST_DAI_LINK_NAME, + PIPELINE_SOURCE_5, 2, TEST_DAI_FORMAT, 48, 1000, 2, 0)
# @@ -54,7 +54,7 @@ DAI_ADD(sof/pipe-dai-playback.m4, # # Clocks masters wrt codec # -# TEST_SSP_DATA_BITS bit I2S using TEST_SSP_PHY_BITS bit sample conatiner on SSP TEST_SSP_PORT +# TEST_SSP_DATA_BITS bit I2S using TEST_SSP_PHY_BITS bit sample conatiner on SSP TEST_DAI_PORT # DAI_CONFIG(TEST_DAI_TYPE, TEST_DAI_PORT, TEST_DAI_LINK_NAME, SSP_CONFIG(TEST_SSP_MODE, diff --git a/topology/test/tplg-build.sh b/topology/test/tplg-build.sh index 26c70ad..b4bf364 100755 --- a/topology/test/tplg-build.sh +++ b/topology/test/tplg-build.sh @@ -14,6 +14,7 @@ export M4PATH="../:../m4:../common" # can be used on components with 1 sink and 1 source. SIMPLE_TESTS=(test-ssp test-capture-ssp test-playback-ssp) TONE_TEST=test-tone-playback-ssp +DMIC_TEST=test-capture-ssp TEST_STRINGS="" M4_STRINGS="" # process m4 simple tests - @@ -22,6 +23,7 @@ M4_STRINGS="" # 2) pipe_name - test component pipeline filename in sof/ # 3) be_name - BE DAI link name in machine driver, used for matching # 4) format - PCM sample format +# 5) dai_type - dai type e.g. SSP/DMIC # 5) dai_id - SSP port number # 6) dai_format - SSP sample format # 7) dai_phy_bits - SSP physical number of BLKCs per slot/channel @@ -32,59 +34,71 @@ M4_STRINGS="" #
function simple_test { - TESTS=("${!12}") + if [ $5 == "SSP" ] + then + TESTS=("${!13}") + fi for i in ${TESTS[@]} do - TFILE="$i$5-${11}-$2-$4-$6-48k-$((${10} / 1000))k-$1" + TFILE="$i$6-${12}-$2-$4-$7-48k-$((${11} / 1000))k-$1" if [ "$USE_XARGS" == "yes" ] then - #create input string for batch m4 processing - M4_STRINGS+="-DTEST_PIPE_NAME=$2,-DTEST_DAI_LINK_NAME=$3\ - -DTEST_SSP_PORT=$5,-DTEST_SSP_FORMAT=$6\ - -DTEST_PIPE_FORMAT=$4,-DTEST_SSP_BCLK=$9\ - -DTEST_SSP_MCLK=${10},-DTEST_SSP_PHY_BITS=$7\ - -DTEST_SSP_DATA_BITS=$8,-DTEST_SSP_MODE=${11}\ - $i.m4,${TFILE}," - #create input string for batch processing of conf files - TEST_STRINGS+=${TFILE}"," + #if DAI type is SSP, define the SSP specific params + if [ $5 == "SSP" ] + then + #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 - echo "M4 pre-processing test $i -> ${TFILE}" - m4 ${M4_FLAGS} \ - -DTEST_PIPE_NAME="$2" \ - -DTEST_DAI_LINK_NAME="$3" \ - -DTEST_SSP_PORT=$5 \ - -DTEST_SSP_FORMAT=$6 \ - -DTEST_PIPE_FORMAT=$4 \ - -DTEST_SSP_BCLK=$9 \ - -DTEST_SSP_MCLK=${10} \ - -DTEST_SSP_PHY_BITS=$7 \ - -DTEST_SSP_DATA_BITS=$8 \ - -DTEST_SSP_MODE=${11} \ - $i.m4 > ${TFILE}.conf - echo "Compiling test $i -> ${TFILE}.tplg" - alsatplg -v 1 -c ${TFILE}.conf -o ${TFILE}.tplg + #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 }
echo "Preparing topology build input..."
# Pre-process the simple tests -simple_test nocodec passthrough "NoCodec" s16le 2 s16le 20 16 1920000 19200000 I2S SIMPLE_TESTS[@] -simple_test nocodec passthrough "NoCodec" s24le 2 s24le 25 24 2400000 19200000 I2S SIMPLE_TESTS[@] -simple_test nocodec volume "NoCodec" s16le 2 s16le 20 16 1920000 19200000 I2S SIMPLE_TESTS[@] -simple_test nocodec volume "NoCodec" s24le 2 s24le 25 24 2400000 19200000 I2S SIMPLE_TESTS[@] -simple_test nocodec volume "NoCodec" s16le 2 s24le 25 24 2400000 19200000 I2S SIMPLE_TESTS[@] -simple_test nocodec src "NoCodec" s24le 2 s24le 25 24 2400000 19200000 I2S SIMPLE_TESTS[@] - -simple_test codec passthrough "SSP2-Codec" s16le 2 s16le 20 16 1920000 19200000 I2S SIMPLE_TESTS[@] -simple_test codec passthrough "SSP2-Codec" s24le 2 s24le 25 24 2400000 19200000 I2S SIMPLE_TESTS[@] -simple_test codec volume "SSP2-Codec" s16le 2 s16le 20 16 1920000 19200000 I2S SIMPLE_TESTS[@] -simple_test codec volume "SSP2-Codec" s24le 2 s24le 25 24 2400000 19200000 I2S SIMPLE_TESTS[@] -simple_test codec volume "SSP2-Codec" s24le 2 s16le 20 16 1920000 19200000 I2S SIMPLE_TESTS[@] -simple_test codec volume "SSP2-Codec" s16le 2 s24le 25 24 2400000 19200000 I2S SIMPLE_TESTS[@] -simple_test codec src "SSP2-Codec" s24le 2 s24le 25 24 2400000 19200000 I2S SIMPLE_TESTS[@] +simple_test nocodec passthrough "NoCodec" s16le SSP 2 s16le 20 16 1920000 19200000 I2S SIMPLE_TESTS[@] +simple_test nocodec passthrough "NoCodec" s24le SSP 2 s24le 25 24 2400000 19200000 I2S SIMPLE_TESTS[@] +simple_test nocodec volume "NoCodec" s16le SSP 2 s16le 20 16 1920000 19200000 I2S SIMPLE_TESTS[@] +simple_test nocodec volume "NoCodec" s24le SSP 2 s24le 25 24 2400000 19200000 I2S SIMPLE_TESTS[@] +simple_test nocodec volume "NoCodec" s16le SSP 2 s24le 25 24 2400000 19200000 I2S SIMPLE_TESTS[@] +simple_test nocodec src "NoCodec" 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[@]
# for APL APL_PROTOCOL_TESTS=(I2S LEFT_J DSP_A DSP_B) @@ -100,22 +114,22 @@ do do for format in ${APL_FORMAT_TESTS[@]} do - simple_test nocodec $mode "NoCodec" $format $ssp s16le 16 16 1536000 24576000 $protocol SIMPLE_TESTS[@] - simple_test nocodec $mode "NoCodec" $format $ssp s24le 32 24 3072000 24576000 $protocol SIMPLE_TESTS[@] - simple_test nocodec $mode "NoCodec" $format $ssp s32le 32 32 3072000 24576000 $protocol SIMPLE_TESTS[@] + simple_test nocodec $mode "NoCodec" $format SSP $ssp s16le 16 16 1536000 24576000 $protocol SIMPLE_TESTS[@] + simple_test nocodec $mode "NoCodec" $format SSP $ssp s24le 32 24 3072000 24576000 $protocol SIMPLE_TESTS[@] + simple_test nocodec $mode "NoCodec" $format SSP $ssp s32le 32 32 3072000 24576000 $protocol SIMPLE_TESTS[@]
- simple_test codec $mode "SSP${ssp}-Codec" $format $ssp s16le 16 16 1536000 24576000 $protocol SIMPLE_TESTS[@] - simple_test codec $mode "SSP${ssp}-Codec" $format $ssp s24le 32 24 3072000 24576000 $protocol SIMPLE_TESTS[@] - simple_test codec $mode "SSP${ssp}-Codec" $format $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[@] done done - simple_test nocodec passthrough "NoCodec" s16le $ssp s16le 16 16 1536000 24576000 $protocol SIMPLE_TESTS[@] - simple_test nocodec passthrough "NoCodec" s24le $ssp s24le 32 24 3072000 24576000 $protocol SIMPLE_TESTS[@] - simple_test nocodec passthrough "NoCodec" s32le $ssp s32le 32 32 3072000 24576000 $protocol SIMPLE_TESTS[@] + simple_test nocodec passthrough "NoCodec" s16le SSP $ssp s16le 16 16 1536000 24576000 $protocol SIMPLE_TESTS[@] + simple_test nocodec passthrough "NoCodec" s24le SSP $ssp s24le 32 24 3072000 24576000 $protocol SIMPLE_TESTS[@] + simple_test nocodec passthrough "NoCodec" s32le SSP $ssp s32le 32 32 3072000 24576000 $protocol SIMPLE_TESTS[@]
- simple_test codec passthrough "SSP${ssp}-Codec" s16le $ssp s16le 16 16 1536000 24576000 $protocol SIMPLE_TESTS[@] - simple_test codec passthrough "SSP${ssp}-Codec" s24le $ssp s24le 32 24 3072000 24576000 $protocol SIMPLE_TESTS[@] - simple_test codec passthrough "SSP${ssp}-Codec" s32le $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 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[@] done done
@@ -127,39 +141,39 @@ do do for format in ${APL_FORMAT_TESTS[@]} do - simple_test nocodec $mode "NoCodec" $format $ssp s16le 20 16 1920000 19200000 $protocol SIMPLE_TESTS[@] - simple_test nocodec $mode "NoCodec" $format $ssp s24le 25 24 2400000 19200000 $protocol SIMPLE_TESTS[@] + simple_test nocodec $mode "NoCodec" $format SSP $ssp s16le 20 16 1920000 19200000 $protocol SIMPLE_TESTS[@] + simple_test nocodec $mode "NoCodec" $format SSP $ssp s24le 25 24 2400000 19200000 $protocol SIMPLE_TESTS[@]
- simple_test codec $mode "SSP${ssp}-Codec" $format $ssp s16le 20 16 1920000 19200000 $protocol SIMPLE_TESTS[@] - simple_test codec $mode "SSP${ssp}-Codec" $format $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 SIMPLE_TESTS[@] + simple_test codec $mode "SSP${ssp}-Codec" $format SSP $ssp s24le 25 24 2400000 19200000 $protocol SIMPLE_TESTS[@] done done - simple_test nocodec passthrough "NoCodec" s16le $ssp s16le 20 16 1920000 19200000 $protocol SIMPLE_TESTS[@] - simple_test nocodec passthrough "NoCodec" s24le $ssp s24le 25 24 2400000 19200000 $protocol SIMPLE_TESTS[@] + simple_test nocodec passthrough "NoCodec" s16le SSP $ssp s16le 20 16 1920000 19200000 $protocol SIMPLE_TESTS[@] + simple_test nocodec passthrough "NoCodec" s24le SSP $ssp s24le 25 24 2400000 19200000 $protocol SIMPLE_TESTS[@]
- simple_test codec passthrough "SSP${ssp}-Codec" s16le $ssp s16le 20 16 1920000 19200000 $protocol SIMPLE_TESTS[@] - simple_test codec passthrough "SSP${ssp}-Codec" s24le $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 SIMPLE_TESTS[@] + simple_test codec passthrough "SSP${ssp}-Codec" s24le SSP $ssp s24le 25 24 2400000 19200000 $protocol SIMPLE_TESTS[@] done done
# for CNL -simple_test nocodec passthrough "NoCodec" s16le 2 s16le 25 16 2400000 24000000 I2S SIMPLE_TESTS[@] -simple_test nocodec passthrough "NoCodec" s24le 2 s24le 25 24 2400000 24000000 I2S SIMPLE_TESTS[@] -simple_test nocodec volume "NoCodec" s16le 2 s16le 25 16 2400000 24000000 I2S SIMPLE_TESTS[@] -simple_test nocodec volume "NoCodec" s16le 2 s24le 25 24 2400000 24000000 I2S SIMPLE_TESTS[@] -simple_test nocodec volume "NoCodec" s24le 2 s24le 25 24 2400000 24000000 I2S SIMPLE_TESTS[@] -simple_test nocodec volume "NoCodec" s24le 2 s16le 25 16 2400000 24000000 I2S SIMPLE_TESTS[@] -simple_test nocodec src "NoCodec" s24le 4 s24le 25 24 2400000 24000000 I2S SIMPLE_TESTS[@] +simple_test nocodec passthrough "NoCodec" s16le SSP 2 s16le 25 16 2400000 24000000 I2S SIMPLE_TESTS[@] +simple_test nocodec passthrough "NoCodec" s24le SSP 2 s24le 25 24 2400000 24000000 I2S SIMPLE_TESTS[@] +simple_test nocodec volume "NoCodec" s16le SSP 2 s16le 25 16 2400000 24000000 I2S SIMPLE_TESTS[@] +simple_test nocodec volume "NoCodec" s16le SSP 2 s24le 25 24 2400000 24000000 I2S SIMPLE_TESTS[@] +simple_test nocodec volume "NoCodec" s24le SSP 2 s24le 25 24 2400000 24000000 I2S SIMPLE_TESTS[@] +simple_test nocodec volume "NoCodec" s24le SSP 2 s16le 25 16 2400000 24000000 I2S SIMPLE_TESTS[@] +simple_test nocodec src "NoCodec" s24le SSP 4 s24le 25 24 2400000 24000000 I2S SIMPLE_TESTS[@]
# Tone test: Tone component only supports s32le currently -simple_test codec tone "SSP2-Codec" s32le 2 s16le 20 16 1920000 19200000 I2S TONE_TEST[@] +simple_test codec tone "SSP2-Codec" s32le SSP 2 s16le 20 16 1920000 19200000 I2S TONE_TEST[@]
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 ',' -n12 bash -c 'm4 "${@:1:${#}-1}" > ${12}.conf' m4 + echo $M4_STRINGS | tr " " "," | tr '\n' '\0' | xargs -P0 -d ',' -n13 bash -c 'm4 "${@:1:${#}-1}" > ${13}.conf' m4
#execute alsatplg to create topology binary TEST_STRINGS=${TEST_STRINGS%?}
This patch introduces the DMIC specific config parameter tokens in topology.
Signed-off-by: Ranjani Sridharan ranjani.sridharan@linux.intel.com --- topology/sof/tokens.m4 | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
diff --git a/topology/sof/tokens.m4 b/topology/sof/tokens.m4 index e9aa302..ab3b812 100644 --- a/topology/sof/tokens.m4 +++ b/topology/sof/tokens.m4 @@ -60,3 +60,17 @@ SectionVendorTokens."sof_ssp_tokens" { SOF_TKN_INTEL_SSP_BCLK_KEEP_ACTIVE "501" SOF_TKN_INTEL_SSP_FS_KEEP_ACTIVE "502" } + +SectionVendorTokens."sof_dmic_tokens" { + SOF_TKN_INTEL_DMIC_DRIVER_VERSION "600" + SOF_TKN_INTEL_DMIC_CLK_MIN "601" + SOF_TKN_INTEL_DMIC_CLK_MAX "602" + SOF_TKN_INTEL_DMIC_DUTY_MIN "603" + SOF_TKN_INTEL_DMIC_DUTY_MAX "604" + SOF_TKN_INTEL_DMIC_REQUESTED_PDM_COUNT "605" + SOF_TKN_INTEL_DMIC_PDM_0_ENABLE "606" + SOF_TKN_INTEL_DMIC_PDM_1_ENABLE "607" + SOF_TKN_INTEL_DMIC_SAMPLE_RATE "608" +} + +
Signed-off-by: Ranjani Sridharan ranjani.sridharan@linux.intel.com --- topology/test/{test-ssp.m4 => test-all.m4} | 0 .../test/{test-capture-ssp.m4 => test-capture.m4} | 0 .../test/{test-playback-ssp.m4 => test-playback.m4} | 0 ...t-tone-playback-ssp.m4 => test-tone-playback.m4} | 0 topology/test/tplg-build.sh | 13 +++++++++---- 5 files changed, 9 insertions(+), 4 deletions(-) rename topology/test/{test-ssp.m4 => test-all.m4} (100%) rename topology/test/{test-capture-ssp.m4 => test-capture.m4} (100%) rename topology/test/{test-playback-ssp.m4 => test-playback.m4} (100%) rename topology/test/{test-tone-playback-ssp.m4 => test-tone-playback.m4} (100%)
diff --git a/topology/test/test-ssp.m4 b/topology/test/test-all.m4 similarity index 100% rename from topology/test/test-ssp.m4 rename to topology/test/test-all.m4 diff --git a/topology/test/test-capture-ssp.m4 b/topology/test/test-capture.m4 similarity index 100% rename from topology/test/test-capture-ssp.m4 rename to topology/test/test-capture.m4 diff --git a/topology/test/test-playback-ssp.m4 b/topology/test/test-playback.m4 similarity index 100% rename from topology/test/test-playback-ssp.m4 rename to topology/test/test-playback.m4 diff --git a/topology/test/test-tone-playback-ssp.m4 b/topology/test/test-tone-playback.m4 similarity index 100% rename from topology/test/test-tone-playback-ssp.m4 rename to topology/test/test-tone-playback.m4 diff --git a/topology/test/tplg-build.sh b/topology/test/tplg-build.sh index b4bf364..8c31213 100755 --- a/topology/test/tplg-build.sh +++ b/topology/test/tplg-build.sh @@ -12,9 +12,9 @@ export M4PATH="../:../m4:../common"
# Simple component test cases # can be used on components with 1 sink and 1 source. -SIMPLE_TESTS=(test-ssp test-capture-ssp test-playback-ssp) -TONE_TEST=test-tone-playback-ssp -DMIC_TEST=test-capture-ssp +SIMPLE_TESTS=(test-all test-capture test-playback) +TONE_TEST=test-tone-playback +DMIC_TEST=test-capture TEST_STRINGS="" M4_STRINGS="" # process m4 simple tests - @@ -40,12 +40,17 @@ function simple_test { fi for i in ${TESTS[@]} do - TFILE="$i$6-${12}-$2-$4-$7-48k-$((${11} / 1000))k-$1" if [ "$USE_XARGS" == "yes" ] then #if DAI type is SSP, define the SSP specific params if [ $5 == "SSP" ] then + 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\
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..."
This patch adds the DMIC config definition and the DMIC config entry in DAI config.
Signed-off-by: Ranjani Sridharan ranjani.sridharan@linux.intel.com --- topology/m4/dai.m4 | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-)
diff --git a/topology/m4/dai.m4 b/topology/m4/dai.m4 index e635caf..f9a9c34 100644 --- a/topology/m4/dai.m4 +++ b/topology/m4/dai.m4 @@ -160,16 +160,38 @@ define(`SSP_SAMPLE_BITS', `}' )
+dnl DMIC_CONFIG(driver_version, clk_min, clk_mac, duty_min, duty_max, req_pdm_count, pdm 0 enable, pdm 1 enable, smaple_rate, type, idx) +define(`DMIC_CONFIG', +`SectionVendorTuples."'N_DAI_CONFIG($10$11)`_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_REQUESTED_PDM_COUNT' STR($6) +` SOF_TKN_INTEL_DMIC_PDM_0_ENABLE' STR($7) +` SOF_TKN_INTEL_DMIC_PDM_1_ENABLE' STR($8) +` SOF_TKN_INTEL_DMIC_SAMPLE_RATE' STR($9) +` }' +`}' +`SectionData."'N_DAI_CONFIG($10$11)`_data" {' +` tuples "'N_DAI_CONFIG($10$11)`_tuples"' +`}' +) + dnl DAI Config) define(`N_DAI_CONFIG', `DAICONFIG.'$1)
-dnl DAI_CONFIG(type, idx, name, ssp_config) +dnl DAI_CONFIG(type, idx, name, ssp_config/dmic_config) define(`DAI_CONFIG', `SectionHWConfig."'$1$2`" {' `' ` id "'$2`"' `' ` ifelse($1, `SSP', $4, `}')' +`ifelse($1, `DMIC', $4, `')' `SectionVendorTuples."'N_DAI_CONFIG($1$2)`_tuples_str" {' ` tokens "sof_dai_tokens"' ` tuples."string" {'
Add support for adding DMIC config for DMIC DAI type.
Signed-off-by: Ranjani Sridharan ranjani.sridharan@linux.intel.com --- topology/test/test-capture.m4 | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-)
diff --git a/topology/test/test-capture.m4 b/topology/test/test-capture.m4 index a1f283f..33e6517 100644 --- a/topology/test/test-capture.m4 +++ b/topology/test/test-capture.m4 @@ -69,10 +69,18 @@ PCM_CAPTURE_ADD(Passthrough, 3, 0, 0, PIPELINE_PCM_2) # TEST_SSP_DATA_BITS bit I2S using TEST_SSP_PHY_BITS bit sample conatiner on SSP TEST_DAI_PORT # DAI_CONFIG(TEST_DAI_TYPE, TEST_DAI_PORT, TEST_DAI_LINK_NAME, - SSP_CONFIG(TEST_SSP_MODE, - DAI_CLOCK(mclk, TEST_SSP_MCLK, codec_mclk_in), - DAI_CLOCK(bclk, TEST_SSP_BCLK, codec_slave), - DAI_CLOCK(fsync, 48000, codec_slave), - DAI_TDM(2, TEST_SSP_PHY_BITS, 3, 3), - SSP_SAMPLE_BITS(TEST_DAI_TYPE, TEST_DAI_PORT, - TEST_SSP_DATA_BITS))) + ifelse(TEST_DAI_TYPE, `SSP', + SSP_CONFIG(TEST_SSP_MODE, + DAI_CLOCK(mclk, TEST_SSP_MCLK, codec_mclk_in), + DAI_CLOCK(bclk, TEST_SSP_BCLK, codec_slave), + DAI_CLOCK(fsync, 48000, codec_slave), + DAI_TDM(2, TEST_SSP_PHY_BITS, 3, 3), + SSP_SAMPLE_BITS(TEST_DAI_TYPE, TEST_DAI_PORT, + TEST_SSP_DATA_BITS)), + TEST_DAI_TYPE, `DMIC', + DMIC_CONFIG(TEST_DMIC_DRIVER_VERSION,TEST_DMIC_CLK_MIN, + TEST_DMIC_CLK_MAX, TEST_DMIC_DUTY_MIN, + TEST_DMIC_DUTY_MAX, TEST_DMIC_REQUESTED_PDM_COUNT, + TEST_DMIC_PDM_0_ENABLE, TEST_DMIC_PDM_1_ENABLE, + TEST_DMIC_SAMPLE_RATE, TEST_DAI_TYPE, TEST_DAI_PORT), + `'))
On Mon, 2018-05-21 at 23:54 -0700, Ranjani Sridharan wrote:
This patchset adds the changes required for multiple DAI types in topology. The main changes are as follows:
- The tplg build script was hardwired for SSP DAI type. Make changes to
accomodate other types. 2. Changes to DAI_CONFIG to accomodate more than just SSP type DAI. 3. The test m4 files similarly were hardwired for SSP. This patchset makes them DAI type agnostic 4. Add DMIC DAI type config definition 5. Add DMIC specific tokens. This is the preliminary version. More tokens will be added as needed. 6. Add DMIC test topology
Sorry does not apply.
Applying: topology: separate ssp params from dai common params error: patch failed: topology/sof-cnl-rt274.m4:64 error: topology/sof-cnl-rt274.m4: patch does not apply Patch failed at 0001 topology: separate ssp params from dai common params Use 'git am --show-current-patch' to see the failed patch When you have resolved this problem, run "git am --continue". If you prefer to skip this patch, run "git am --skip" instead. To restore the original branch and stop patching, run "git am --abort".
Liam
On Tue, 2018-05-22 at 09:18 +0100, Liam Girdwood wrote:
On Mon, 2018-05-21 at 23:54 -0700, Ranjani Sridharan wrote:
This patchset adds the changes required for multiple DAI types in topology. The main changes are as follows:
- The tplg build script was hardwired for SSP DAI type. Make
changes to accomodate other types. 2. Changes to DAI_CONFIG to accomodate more than just SSP type DAI. 3. The test m4 files similarly were hardwired for SSP. This patchset makes them DAI type agnostic 4. Add DMIC DAI type config definition 5. Add DMIC specific tokens. This is the preliminary version. More tokens will be added as needed. 6. Add DMIC test topology
Sorry does not apply.
Apologies! v2 on the way
Applying: topology: separate ssp params from dai common params error: patch failed: topology/sof-cnl-rt274.m4:64 error: topology/sof-cnl-rt274.m4: patch does not apply Patch failed at 0001 topology: separate ssp params from dai common params Use 'git am --show-current-patch' to see the failed patch When you have resolved this problem, run "git am --continue". If you prefer to skip this patch, run "git am --skip" instead. To restore the original branch and stop patching, run "git am -- abort".
Liam
participants (2)
-
Liam Girdwood
-
Ranjani Sridharan