[Sound-open-firmware] [PATCH] topology: test: make mclk configurable
The mclk may be different for different platforms, here make it configurable for test topology files.
Signed-off-by: Keyon Jie yang.jie@linux.intel.com --- topology/test/test-capture-ssp.m4 | 3 ++- topology/test/test-playback-ssp.m4 | 3 ++- topology/test/test-ssp.m4 | 3 ++- topology/test/tplg-build.sh | 43 ++++++++++++++++++++++---------------- 4 files changed, 31 insertions(+), 21 deletions(-)
diff --git a/topology/test/test-capture-ssp.m4 b/topology/test/test-capture-ssp.m4 index 613e666..2c808ba 100644 --- a/topology/test/test-capture-ssp.m4 +++ b/topology/test/test-capture-ssp.m4 @@ -23,6 +23,7 @@ include(`dsps/byt.m4') # TEST_SSP_PORT - SSP port number e.g. 2 # TEST_SSP_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 # TEST_SSP_PHY_BITS - SSP physical slot size # TEST_SSP_DATA_BITS - SSP data slot size @@ -66,7 +67,7 @@ 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_SSP_PORT # DAI_CONFIG(SSP, TEST_SSP_PORT, TEST_DAI_LINK_NAME, I2S, TEST_SSP_DATA_BITS, - DAI_CLOCK(mclk, 19200000, slave), + DAI_CLOCK(mclk, TEST_SSP_MCLK, slave), DAI_CLOCK(bclk, TEST_SSP_BCLK, slave), DAI_CLOCK(fsync, 48000, slave), DAI_TDM(2, TEST_SSP_PHY_BITS, 3, 3)) diff --git a/topology/test/test-playback-ssp.m4 b/topology/test/test-playback-ssp.m4 index 351b8af..093ad17 100644 --- a/topology/test/test-playback-ssp.m4 +++ b/topology/test/test-playback-ssp.m4 @@ -23,6 +23,7 @@ include(`dsps/byt.m4') # TEST_SSP_PORT - SSP port number e.g. 2 # TEST_SSP_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 # TEST_SSP_PHY_BITS - SSP physical slot size # TEST_SSP_DATA_BITS - SSP data slot size @@ -66,7 +67,7 @@ PCM_PLAYBACK_ADD(Passthrough, 3, 0, 0, PIPELINE_PCM_1) # TEST_SSP_DATA_BITS bit I2S using TEST_SSP_PHY_BITS bit sample conatiner on SSP TEST_SSP_PORT # DAI_CONFIG(SSP, TEST_SSP_PORT, TEST_DAI_LINK_NAME, I2S, TEST_SSP_DATA_BITS, - DAI_CLOCK(mclk, 19200000, slave), + DAI_CLOCK(mclk, TEST_SSP_MCLK, slave), DAI_CLOCK(bclk, TEST_SSP_BCLK, slave), DAI_CLOCK(fsync, 48000, slave), DAI_TDM(2, TEST_SSP_PHY_BITS, 3, 3)) diff --git a/topology/test/test-ssp.m4 b/topology/test/test-ssp.m4 index 92e91bf..304aab9 100644 --- a/topology/test/test-ssp.m4 +++ b/topology/test/test-ssp.m4 @@ -23,6 +23,7 @@ include(`dsps/byt.m4') # TEST_SSP_PORT - SSP port number e.g. 2 # TEST_SSP_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 # TEST_SSP_PHY_BITS - SSP physical slot size # TEST_SSP_DATA_BITS - SSP data slot size @@ -84,7 +85,7 @@ PCM_DUPLEX_ADD(Passthrough, 3, 0, 0, PIPELINE_PCM_1, PIPELINE_PCM_2) # TEST_SSP_DATA_BITS bit I2S using TEST_SSP_PHY_BITS bit sample conatiner on SSP TEST_SSP_PORT # DAI_CONFIG(SSP, TEST_SSP_PORT, TEST_DAI_LINK_NAME, I2S, TEST_SSP_DATA_BITS, - DAI_CLOCK(mclk, 19200000, slave), + DAI_CLOCK(mclk, TEST_SSP_MCLK, slave), DAI_CLOCK(bclk, TEST_SSP_BCLK, slave), DAI_CLOCK(fsync, 48000, slave), DAI_TDM(2, TEST_SSP_PHY_BITS, 3, 3)) diff --git a/topology/test/tplg-build.sh b/topology/test/tplg-build.sh index 5d7cd49..71bb120 100755 --- a/topology/test/tplg-build.sh +++ b/topology/test/tplg-build.sh @@ -25,6 +25,7 @@ SIMPLE_TESTS=(test-ssp test-capture-ssp test-playback-ssp) # 7) dai_phy_bits - SSP physical number of BLKCs per slot/channel # 8) dai_data_bits - SSP number of valid daat bits per slot/channel # 9) dai_bclk - SSP BCLK in HZ +# 10) dai_mclk - SSP MCLK in HZ # function simple_test { for i in ${SIMPLE_TESTS[@]} @@ -38,6 +39,7 @@ function simple_test { -DTEST_SSP_FORMAT=$6 \ -DTEST_PIPE_FORMAT=$4 \ -DTEST_SSP_BCLK=$9 \ + -DTEST_SSP_BCLK=$10 \ -DTEST_SSP_PHY_BITS=$7 \ -DTEST_SSP_DATA_BITS=$8 \ $i.m4 > ${TFILE}.conf @@ -47,23 +49,28 @@ function simple_test { }
# Pre-process the simple tests -simple_test nocodec passthrough "NoCodec" s16le 2 s16le 20 16 1920000 -simple_test nocodec passthrough "NoCodec" s24le 2 s24le 25 24 2400000 -simple_test nocodec volume "NoCodec" s16le 2 s16le 20 16 1920000 -simple_test nocodec volume "NoCodec" s24le 2 s24le 25 24 2400000 -simple_test nocodec volume "NoCodec" s16le 2 s24le 25 24 2400000 -simple_test nocodec src "NoCodec" s24le 2 s24le 25 24 2400000 +simple_test nocodec passthrough "NoCodec" s16le 2 s16le 20 16 1920000 19200000 +simple_test nocodec passthrough "NoCodec" s24le 2 s24le 25 24 2400000 19200000 +simple_test nocodec volume "NoCodec" s16le 2 s16le 20 16 1920000 19200000 +simple_test nocodec volume "NoCodec" s24le 2 s24le 25 24 2400000 19200000 +simple_test nocodec volume "NoCodec" s16le 2 s24le 25 24 2400000 19200000 +simple_test nocodec src "NoCodec" s24le 2 s24le 25 24 2400000 19200000 + +simple_test codec passthrough "SSP2-Codec" s16le 2 s16le 20 16 1920000 19200000 +simple_test codec passthrough "SSP2-Codec" s24le 2 s24le 25 24 2400000 19200000 +simple_test codec volume "SSP2-Codec" s16le 2 s16le 20 16 1920000 19200000 +simple_test codec volume "SSP2-Codec" s24le 2 s24le 25 24 2400000 19200000 +simple_test codec volume "SSP2-Codec" s16le 2 s24le 25 24 2400000 19200000 +simple_test codec src "SSP2-Codec" s24le 2 s24le 25 24 2400000 19200000 + +simple_test baytrail passthrough "Baytrail Audio" s16le 2 s16le 20 16 1920000 19200000 +simple_test baytrail passthrough "Baytrail Audio" s24le 2 s24le 25 24 2400000 19200000 +simple_test baytrail volume "Baytrail Audio" s16le 2 s16le 20 16 1920000 19200000 +simple_test baytrail volume "Baytrail Audio" s24le 2 s24le 25 24 2400000 19200000 +simple_test baytrail volume "Baytrail Audio" s16le 2 s24le 25 24 2400000 19200000 +simple_test baytrail src "Baytrail Audio" s24le 2 s24le 25 24 2400000 19200000 + +simple_test nocodec passthrough "NoCodec" s16le 4 s16le 16 16 1536000 24576000 +simple_test apollolake passthrough "SSP4-Codec" s16le 4 s16le 16 16 1536000 24576000
-simple_test codec passthrough "SSP2-Codec" s16le 2 s16le 20 16 1920000 -simple_test codec passthrough "SSP2-Codec" s24le 2 s24le 25 24 2400000 -simple_test codec volume "SSP2-Codec" s16le 2 s16le 20 16 1920000 -simple_test codec volume "SSP2-Codec" s24le 2 s24le 25 24 2400000 -simple_test codec volume "SSP2-Codec" s16le 2 s24le 25 24 2400000 -simple_test codec src "SSP2-Codec" s24le 2 s24le 25 24 2400000
-simple_test baytrail passthrough "Baytrail Audio" s16le 2 s16le 20 16 1920000 -simple_test baytrail passthrough "Baytrail Audio" s24le 2 s24le 25 24 2400000 -simple_test baytrail volume "Baytrail Audio" s16le 2 s16le 20 16 1920000 -simple_test baytrail volume "Baytrail Audio" s24le 2 s24le 25 24 2400000 -simple_test baytrail volume "Baytrail Audio" s16le 2 s24le 25 24 2400000 -simple_test baytrail src "Baytrail Audio" s24le 2 s24le 25 24 2400000
On Mon, 2017-12-25 at 20:42 +0800, Keyon Jie wrote:
The mclk may be different for different platforms, here make it configurable for test topology files.
Signed-off-by: Keyon Jie yang.jie@linux.intel.com
topology/test/test-capture-ssp.m4 | 3 ++- topology/test/test-playback-ssp.m4 | 3 ++- topology/test/test-ssp.m4 | 3 ++- topology/test/tplg-build.sh | 43 ++++++++++++++++++++++----
4 files changed, 31 insertions(+), 21 deletions(-)
Applied.
Thanks
Liam --------------------------------------------------------------------- Intel Corporation (UK) Limited Registered No. 1134945 (England) Registered Office: Pipers Way, Swindon SN3 1RJ VAT No: 860 2173 47
This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.
participants (2)
-
Keyon Jie
-
Liam Girdwood