This patch makes changes to DAI config in topology to separate out SSP specific params from common params in preparation for other DAI types coming soon.
Signed-off-by: Ranjani Sridharan ranjani.sridharan@linux.intel.com --- topology/m4/dai.m4 | 43 ++++++++------ topology/sof-apl-nocodec.m4 | 11 ++-- topology/sof-apl-tdf8532.m4 | 79 ++++++++++++++----------- 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 | 12 ++-- 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/test/test-capture-ssp.m4 | 13 ++-- topology/test/test-playback-ssp.m4 | 13 ++-- topology/test/test-ssp.m4 | 13 ++-- topology/test/test-tone-playback-ssp.m4 | 13 ++-- 18 files changed, 173 insertions(+), 134 deletions(-)
diff --git a/topology/m4/dai.m4 b/topology/m4/dai.m4 index ba6cba4..8a79ebc 100644 --- a/topology/m4/dai.m4 +++ b/topology/m4/dai.m4 @@ -131,27 +131,45 @@ define(`DAI_CLOCK',
dnl DAI_TDM(slots, width, tx_mask, rx_mask) define(`DAI_TDM', -` tdm_slots 'STR($1) +`tdm_slots 'STR($1) ` tdm_slot_width 'STR($2) ` tx_slots 'STR($3) ` rx_slots 'STR($4) ) +dnl SSP_CONFIG(format, mclk, bclk, fsync, tdm, ssp sample bits) +define(`SSP_CONFIG', +` format "'$1`"' +` '$2 +` '$3 +` '$4 +` '$5 +`}' +$6 +) + +dnl SSP_SAMPLE_BITS(type, idx, valid bits) +define(`SSP_SAMPLE_BITS', +`SectionVendorTuples."'N_DAI_CONFIG($1$2)`_tuples" {' +` tokens "sof_dai_tokens"' +` tuples."word" {' +` SOF_TKN_DAI_SAMPLE_BITS' STR($3) +` }' +`}' +`SectionData."'N_DAI_CONFIG($1$2)`_data" {' +` tuples "'N_DAI_CONFIG($1$2)`_tuples"' +`}' +)
dnl DAI Config) define(`N_DAI_CONFIG', `DAICONFIG.'$1)
-dnl DAI_CONFIG(type, idx, link_id, name, format, valid bits, mclk, bclk, fsync, tdm) +dnl DAI_CONFIG(type, idx, link_id, name, ssp_config) define(`DAI_CONFIG', `SectionHWConfig."'$1$2`" {' `' ` id "'$2`"' -` format "'$5`"' `' -` '$7 -` '$8 -` '$9 -` '$10 -`}' +` ifelse($1, `SSP', $5, `}')' `SectionVendorTuples."'N_DAI_CONFIG($1$2)`_tuples_str" {' ` tokens "sof_dai_tokens"' ` tuples."string" {' @@ -161,15 +179,6 @@ define(`DAI_CONFIG', `SectionData."'N_DAI_CONFIG($1$2)`_data_str" {' ` tuples "'N_DAI_CONFIG($1$2)`_tuples_str"' `}' -`SectionVendorTuples."'N_DAI_CONFIG($1$2)`_tuples" {' -` tokens "sof_dai_tokens"' -` tuples."word" {' -` SOF_TKN_DAI_SAMPLE_BITS' STR($6) -` }' -`}' -`SectionData."'N_DAI_CONFIG($1$2)`_data" {' -` tuples "'N_DAI_CONFIG($1$2)`_tuples"' -`}' `' `SectionBE."'$4`" {' ` id "'$3`"' diff --git a/topology/sof-apl-nocodec.m4 b/topology/sof-apl-nocodec.m4 index 68380e4..ac3ee75 100644 --- a/topology/sof-apl-nocodec.m4 +++ b/topology/sof-apl-nocodec.m4 @@ -93,8 +93,9 @@ PCM_DUPLEX_ADD(Low Latency, 6, 0, 0, PIPELINE_PCM_1, PIPELINE_PCM_2) # # BE configurations - overrides config in ACPI if present # -DAI_CONFIG(SSP, 2, 0, NoCodec, I2S, 24, - DAI_CLOCK(mclk, 19200000, codec_mclk_in), - DAI_CLOCK(bclk, 2400000, codec_slave), - DAI_CLOCK(fsync, 48000, codec_slave), - DAI_TDM(2, 25, 3, 3)) +DAI_CONFIG(SSP, 2, 0, NoCodec, + SSP_CONFIG(I2S, DAI_CLOCK(mclk, 19200000, codec_mclk_in), + DAI_CLOCK(bclk, 2400000, codec_slave), + DAI_CLOCK(fsync, 48000, codec_slave), + DAI_TDM(2, 25, 3, 3), + SSP_SAMPLE_BITS(SSP, 2, 24))) diff --git a/topology/sof-apl-tdf8532.m4 b/topology/sof-apl-tdf8532.m4 index c737a65..5554e58 100644 --- a/topology/sof-apl-tdf8532.m4 +++ b/topology/sof-apl-tdf8532.m4 @@ -187,41 +187,49 @@ PCM_DUPLEX_ADD(Port5, 5, 5, 5, PIPELINE_PCM_9, PIPELINE_PCM_10) # # BE configurations - overrides config in ACPI if present # -DAI_CONFIG(SSP, 4, 4, SSP4-Codec, DSP_B, 32, - DAI_CLOCK(mclk, 24576000, codec_mclk_in), - DAI_CLOCK(bclk, 12288000, codec_slave), - DAI_CLOCK(fsync, 48000, codec_slave), - DAI_TDM(8, 32, 15, 15)) - -DAI_CONFIG(SSP, 2, 2, SSP2-Codec, I2S, 16, - DAI_CLOCK(mclk, 24576000, codec_mclk_in), - DAI_CLOCK(bclk, 1536000, codec_slave), - DAI_CLOCK(fsync, 48000, codec_slave), - DAI_TDM(2, 16, 3, 3)) - -DAI_CONFIG(SSP, 0, 0, SSP0-Codec, I2S, 16, - DAI_CLOCK(mclk, 24576000, codec_mclk_in), - DAI_CLOCK(bclk, 1536000, codec_slave), - DAI_CLOCK(fsync, 48000, codec_slave), - DAI_TDM(2, 16, 3, 3)) - -DAI_CONFIG(SSP, 1, 1, SSP1-Codec, I2S, 16, - DAI_CLOCK(mclk, 24576000, codec_mclk_in), - DAI_CLOCK(bclk, 1536000, codec_slave), - DAI_CLOCK(fsync, 48000, codec_slave), - DAI_TDM(2, 16, 3, 3)) - -DAI_CONFIG(SSP, 3, 3, SSP3-Codec, I2S, 16, - DAI_CLOCK(mclk, 24576000, codec_mclk_in), - DAI_CLOCK(bclk, 1536000, codec_slave), - DAI_CLOCK(fsync, 48000, codec_slave), - DAI_TDM(2, 16, 3, 3)) - -DAI_CONFIG(SSP, 5, 5, SSP5-Codec, I2S, 16, - DAI_CLOCK(mclk, 24576000, codec_mclk_in), - DAI_CLOCK(bclk, 1536000, codec_slave), - DAI_CLOCK(fsync, 48000, codec_slave), - DAI_TDM(2, 16, 3, 3)) + +DAI_CONFIG(SSP, 4, 4, SSP4-Codec, + SSP_CONFIG(DSP_B, DAI_CLOCK(mclk, 24576000, codec_mclk_in), + DAI_CLOCK(bclk, 12288000, codec_slave), + DAI_CLOCK(fsync, 48000, codec_slave), + DAI_TDM(8, 32, 15, 15), + SSP_SAMPLE_BITS(SSP, 4, 32))) + +DAI_CONFIG(SSP, 2, 2, SSP2-Codec, + SSP_CONFIG(I2S, DAI_CLOCK(mclk, 24576000, codec_mclk_in), + DAI_CLOCK(bclk, 1536000, codec_slave), + DAI_CLOCK(fsync, 48000, codec_slave), + DAI_TDM(2, 16, 3, 3), + SSP_SAMPLE_BITS(SSP, 2, 16))) + +DAI_CONFIG(SSP, 0, 0, SSP0-Codec, + SSP_CONFIG(I2S, DAI_CLOCK(mclk, 24576000, codec_mclk_in), + DAI_CLOCK(bclk, 1536000, codec_slave), + DAI_CLOCK(fsync, 48000, codec_slave), + DAI_TDM(2, 16, 3, 3), + SSP_SAMPLE_BITS(SSP, 0, 16))) + +DAI_CONFIG(SSP, 1, 1, SSP1-Codec, + SSP_CONFIG(I2S, DAI_CLOCK(mclk, 24576000, codec_mclk_in), + DAI_CLOCK(bclk, 1536000, codec_slave), + DAI_CLOCK(fsync, 48000, codec_slave), + DAI_TDM(2, 16, 3, 3), + SSP_SAMPLE_BITS(SSP, 1, 16))) + +DAI_CONFIG(SSP, 3, 3, SSP3-Codec, + SSP_CONFIG(I2S, DAI_CLOCK(mclk, 24576000, codec_mclk_in), + DAI_CLOCK(bclk, 1536000, codec_slave), + DAI_CLOCK(fsync, 48000, codec_slave), + DAI_TDM(2, 16, 3, 3), + SSP_SAMPLE_BITS(SSP, 3, 16))) + +DAI_CONFIG(SSP, 5, 5, SSP5-Codec, + SSP_CONFIG(I2S, DAI_CLOCK(mclk, 24576000, codec_mclk_in), + DAI_CLOCK(bclk, 1536000, codec_slave), + DAI_CLOCK(fsync, 48000, codec_slave), + DAI_TDM(2, 16, 3, 3), + SSP_SAMPLE_BITS(SSP, 5, 16))) +
VIRTUAL_DAPM_ROUTE_IN(BtHfp_ssp0_in, SSP, 0, IN, 0) VIRTUAL_DAPM_ROUTE_OUT(BtHfp_ssp0_out, SSP, 0, OUT, 1) @@ -245,4 +253,3 @@ VIRTUAL_WIDGET(ssp3 Rx, 18) VIRTUAL_WIDGET(ssp4 Tx, 19) VIRTUAL_WIDGET(ssp5 Tx, 20) VIRTUAL_WIDGET(ssp5 Rx, 21) - diff --git a/topology/sof-bdw-rt286.m4 b/topology/sof-bdw-rt286.m4 index 098d4c8..6d09e2e 100644 --- a/topology/sof-bdw-rt286.m4 +++ b/topology/sof-bdw-rt286.m4 @@ -93,8 +93,9 @@ PCM_DUPLEX_ADD(Low Latency, 6, 0, 0, PIPELINE_PCM_1, PIPELINE_PCM_2) # # BE configurations - overrides config in ACPI if present # -DAI_CONFIG(SSP, 0, 0, Codec, I2S, 24, - DAI_CLOCK(mclk, 24000000, codec_mclk_in), - DAI_CLOCK(bclk, 2400000, codec_slave), - DAI_CLOCK(fsync, 48000, codec_slave), - DAI_TDM(2, 25, 3, 3)) +DAI_CONFIG(SSP, 0, 0, Codec, + SSP_CONFIG(I2S, DAI_CLOCK(mclk, 24000000, codec_mclk_in), + DAI_CLOCK(bclk, 2400000, codec_slave), + DAI_CLOCK(fsync, 48000, codec_slave), + DAI_TDM(2, 25, 3, 3), + SSP_SAMPLE_BITS(SSP, 0, 24))) diff --git a/topology/sof-bdw-rt5640.m4 b/topology/sof-bdw-rt5640.m4 index bbbbbe4..2f9badb 100644 --- a/topology/sof-bdw-rt5640.m4 +++ b/topology/sof-bdw-rt5640.m4 @@ -93,8 +93,9 @@ PCM_DUPLEX_ADD(Low Latency, 6, 0, 0, PIPELINE_PCM_1, PIPELINE_PCM_2) # # BE configurations - overrides config in ACPI if present # -DAI_CONFIG(SSP, 0, 0, Codec, I2S, 24, - DAI_CLOCK(mclk, 24000000, codec_mclk_in), - DAI_CLOCK(bclk, 2400000, codec_slave), - DAI_CLOCK(fsync, 48000, codec_slave), - DAI_TDM(2, 25, 3, 3)) +DAI_CONFIG(SSP, 0, 0, Codec, + SSP_CONFIG(I2S, DAI_CLOCK(mclk, 24000000, codec_mclk_in), + DAI_CLOCK(bclk, 2400000, codec_slave), + DAI_CLOCK(fsync, 48000, codec_slave), + DAI_TDM(2, 25, 3, 3), + SSP_SAMPLE_BITS(SSP, 0, 24))) diff --git a/topology/sof-byt-da7213.m4 b/topology/sof-byt-da7213.m4 index e3c7952..090b034 100644 --- a/topology/sof-byt-da7213.m4 +++ b/topology/sof-byt-da7213.m4 @@ -93,8 +93,9 @@ PCM_DUPLEX_ADD(Low Latency, 6, 0, 0, PIPELINE_PCM_1, PIPELINE_PCM_2) # # BE configurations - overrides config in ACPI if present # -DAI_CONFIG(SSP, 2, 0, SSP2-Codec, I2S, 24, - DAI_CLOCK(mclk, 19200000, codec_mclk_in), - DAI_CLOCK(bclk, 2400000, codec_slave), - DAI_CLOCK(fsync, 48000, codec_slave), - DAI_TDM(2, 25, 3, 3)) +DAI_CONFIG(SSP, 2, 0, SSP2-Codec, + SSP_CONFIG(I2S, DAI_CLOCK(mclk, 19200000, codec_mclk_in), + DAI_CLOCK(bclk, 2400000, codec_slave), + DAI_CLOCK(fsync, 48000, codec_slave), + DAI_TDM(2, 25, 3, 3), + SSP_SAMPLE_BITS(SSP, 2, 24))) diff --git a/topology/sof-byt-nocodec.m4 b/topology/sof-byt-nocodec.m4 index 5c65fb0..9bed36e 100644 --- a/topology/sof-byt-nocodec.m4 +++ b/topology/sof-byt-nocodec.m4 @@ -93,8 +93,9 @@ PCM_DUPLEX_ADD(Low Latency, 6, 0, 0, PIPELINE_PCM_1, PIPELINE_PCM_2) # # BE configurations - overrides config in ACPI if present # -DAI_CONFIG(SSP, 2, 0, NoCodec, I2S, 24, - DAI_CLOCK(mclk, 19200000, codec_mclk_in), - DAI_CLOCK(bclk, 2400000, codec_slave), - DAI_CLOCK(fsync, 48000, codec_slave), - DAI_TDM(2, 25, 3, 3)) +DAI_CONFIG(SSP, 2, 0, NoCodec, + SSP_CONFIG(I2S, DAI_CLOCK(mclk, 19200000, codec_mclk_in), + DAI_CLOCK(bclk, 2400000, codec_slave), + DAI_CLOCK(fsync, 48000, codec_slave), + DAI_TDM(2, 25, 3, 3), + SSP_SAMPLE_BITS(SSP, 2, 24))) diff --git a/topology/sof-byt-rt5640.m4 b/topology/sof-byt-rt5640.m4 index 7fae6f0..f852616 100644 --- a/topology/sof-byt-rt5640.m4 +++ b/topology/sof-byt-rt5640.m4 @@ -93,8 +93,9 @@ PCM_DUPLEX_ADD(Low Latency, 6, 0, 0, PIPELINE_PCM_1, PIPELINE_PCM_2) # # BE configurations - overrides config in ACPI if present # -DAI_CONFIG(SSP, 2, 0, SSP2-Codec, I2S, 24, - DAI_CLOCK(mclk, 19200000, codec_mclk_in), - DAI_CLOCK(bclk, 2400000, codec_slave), - DAI_CLOCK(fsync, 48000, codec_slave), - DAI_TDM(2, 25, 3, 3)) +DAI_CONFIG(SSP, 2, 0, SSP2-Codec, + SSP_CONFIG(I2S, DAI_CLOCK(mclk, 19200000, codec_mclk_in), + DAI_CLOCK(bclk, 2400000, codec_slave), + DAI_CLOCK(fsync, 48000, codec_slave), + DAI_TDM(2, 25, 3, 3), + SSP_SAMPLE_BITS(SSP, 2, 24))) diff --git a/topology/sof-byt-rt5645.m4 b/topology/sof-byt-rt5645.m4 index 7b81cbd..7d8eee5 100644 --- a/topology/sof-byt-rt5645.m4 +++ b/topology/sof-byt-rt5645.m4 @@ -93,8 +93,9 @@ PCM_DUPLEX_ADD(Low Latency, 6, 0, 0, PIPELINE_PCM_1, PIPELINE_PCM_2) # # BE configurations - overrides config in ACPI if present # -DAI_CONFIG(SSP, 2, 0, SSP2-Codec, I2S, 24, - DAI_CLOCK(mclk, 19200000, codec_mclk_in), - DAI_CLOCK(bclk, 2400000, codec_slave), - DAI_CLOCK(fsync, 48000, codec_slave), - DAI_TDM(2, 25, 3, 3)) +DAI_CONFIG(SSP, 2, 0, SSP2-Codec, + SSP_CONFIG(I2S, DAI_CLOCK(mclk, 19200000, codec_mclk_in), + DAI_CLOCK(bclk, 2400000, codec_slave), + DAI_CLOCK(fsync, 48000, codec_slave), + DAI_TDM(2, 25, 3, 3), + SSP_SAMPLE_BITS(SSP, 2, 24))) diff --git a/topology/sof-byt-rt5651.m4 b/topology/sof-byt-rt5651.m4 index 91324ae..894602a 100644 --- a/topology/sof-byt-rt5651.m4 +++ b/topology/sof-byt-rt5651.m4 @@ -93,9 +93,9 @@ PCM_DUPLEX_ADD(Low Latency, 3, 0, 0, PIPELINE_PCM_1, PIPELINE_PCM_2) # # BE configurations - overrides config in ACPI if present # -DAI_CONFIG(SSP, 2, 0, SSP2-Codec, I2S, 24, - DAI_CLOCK(mclk, 19200000, codec_mclk_in), - DAI_CLOCK(bclk, 2400000, codec_slave), - DAI_CLOCK(fsync, 48000, codec_slave), - DAI_TDM(2, 25, 3, 3)) - +DAI_CONFIG(SSP, 2, 0, SSP2-Codec, + SSP_CONFIG(I2S, DAI_CLOCK(mclk, 19200000, codec_mclk_in), + DAI_CLOCK(bclk, 2400000, codec_slave), + DAI_CLOCK(fsync, 48000, codec_slave), + DAI_TDM(2, 25, 3, 3), + SSP_SAMPLE_BITS(SSP, 2, 24))) diff --git a/topology/sof-cht-max98090.m4 b/topology/sof-cht-max98090.m4 index 5fb7802..2d5192a 100644 --- a/topology/sof-cht-max98090.m4 +++ b/topology/sof-cht-max98090.m4 @@ -93,8 +93,9 @@ PCM_DUPLEX_ADD(Low Latency, 6, 0, 0, PIPELINE_PCM_1, PIPELINE_PCM_2) # # BE configurations - overrides config in ACPI if present # -DAI_CONFIG(SSP, 2, 0, SSP2-Codec, I2S, 16, - DAI_CLOCK(mclk, 19200000, codec_mclk_in), - DAI_CLOCK(bclk, 1920000, codec_slave), - DAI_CLOCK(fsync, 48000, codec_slave), - DAI_TDM(2, 20, 3, 3)) +DAI_CONFIG(SSP, 2, 0, SSP2-Codec, + SSP_CONFIG(I2S, DAI_CLOCK(mclk, 19200000, codec_mclk_in), + DAI_CLOCK(bclk, 1920000, codec_slave), + DAI_CLOCK(fsync, 48000, codec_slave), + DAI_TDM(2, 20, 3, 3), + SSP_SAMPLE_BITS(SSP, 2, 16))) diff --git a/topology/sof-cht-nocodec.m4 b/topology/sof-cht-nocodec.m4 index bd4d969..68abf37 100644 --- a/topology/sof-cht-nocodec.m4 +++ b/topology/sof-cht-nocodec.m4 @@ -93,8 +93,9 @@ PCM_DUPLEX_ADD(Low Latency, 6, 0, 0, PIPELINE_PCM_1, PIPELINE_PCM_2) # # BE configurations - overrides config in ACPI if present # -DAI_CONFIG(SSP, 2, 0, NoCodec, I2S, 24, - DAI_CLOCK(mclk, 19200000, codec_mclk_in), - DAI_CLOCK(bclk, 2400000, codec_slave), - DAI_CLOCK(fsync, 48000, codec_slave), - DAI_TDM(2, 25, 3, 3)) +DAI_CONFIG(SSP, 2, 0, NoCodec, + SSP_CONFIG(I2S, DAI_CLOCK(mclk, 19200000, codec_mclk_in), + DAI_CLOCK(bclk, 2400000, codec_slave), + DAI_CLOCK(fsync, 48000, codec_slave), + DAI_TDM(2, 25, 3, 3), + SSP_SAMPLE_BITS(SSP, 2, 24))) diff --git a/topology/sof-cnl-rt274.m4 b/topology/sof-cnl-rt274.m4 index 01cd203..25a4913 100644 --- a/topology/sof-cnl-rt274.m4 +++ b/topology/sof-cnl-rt274.m4 @@ -64,11 +64,12 @@ PCM_DUPLEX_ADD(Passthrough, 3, 0, 0, PIPELINE_PCM_1, PIPELINE_PCM_2) # # BE configurations - overrides config in ACPI if present # -DAI_CONFIG(SSP, 0, 0, SSP0-Codec, DSP_B, 24, - DAI_CLOCK(mclk, 24000000, codec_mclk_in), - DAI_CLOCK(bclk, 4800000, codec_slave), - DAI_CLOCK(fsync, 48000, codec_slave), - DAI_TDM(4, 25, 3, 3)) +DAI_CONFIG(SSP, 0, 0, SSP0-Codec, + SSP_CONFIG(DSP_B, DAI_CLOCK(mclk, 24000000, codec_mclk_in), + DAI_CLOCK(bclk, 4800000, codec_slave), + DAI_CLOCK(fsync, 48000, codec_slave), + DAI_TDM(4, 25, 3, 3), + SSP_SAMPLE_BITS(SSP, 0, 24)))
VIRTUAL_DAPM_ROUTE_OUT(codec0_out, SSP, 0, OUT, 0) VIRTUAL_DAPM_ROUTE_OUT(codec1_out, SSP, 0, OUT, 1) diff --git a/topology/sof-hsw-rt5640.m4 b/topology/sof-hsw-rt5640.m4 index 28d5c6a..22d79d5 100644 --- a/topology/sof-hsw-rt5640.m4 +++ b/topology/sof-hsw-rt5640.m4 @@ -93,8 +93,9 @@ PCM_DUPLEX_ADD(Low Latency, 6, 0, 0, PIPELINE_PCM_1, PIPELINE_PCM_2) # # BE configurations - overrides config in ACPI if present # -DAI_CONFIG(SSP, 0, 0, Codec, I2S, 24, - DAI_CLOCK(mclk, 24000000, codec_mclk_in), - DAI_CLOCK(bclk, 2400000, codec_slave), - DAI_CLOCK(fsync, 48000, codec_slave), - DAI_TDM(2, 25, 3, 3)) +DAI_CONFIG(SSP, 0, 0, Codec, + SSP_CONFIG(I2S, DAI_CLOCK(mclk, 24000000, codec_mclk_in), + DAI_CLOCK(bclk, 2400000, codec_slave), + DAI_CLOCK(fsync, 48000, codec_slave), + DAI_TDM(2, 25, 3, 3), + SSP_SAMPLE_BITS(SSP, 0, 24))) diff --git a/topology/test/test-capture-ssp.m4 b/topology/test/test-capture-ssp.m4 index b6f0935..65a3bcd 100644 --- a/topology/test/test-capture-ssp.m4 +++ b/topology/test/test-capture-ssp.m4 @@ -68,8 +68,11 @@ 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(SSP, TEST_SSP_PORT, 0, TEST_DAI_LINK_NAME, TEST_SSP_MODE, TEST_SSP_DATA_BITS, - 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)) +DAI_CONFIG(TEST_DAI_TYPE, TEST_DAI_PORT, 0, 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))) diff --git a/topology/test/test-playback-ssp.m4 b/topology/test/test-playback-ssp.m4 index a12db57..b0f3fec 100644 --- a/topology/test/test-playback-ssp.m4 +++ b/topology/test/test-playback-ssp.m4 @@ -68,8 +68,11 @@ 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_DAI_PORT # -DAI_CONFIG(SSP, TEST_SSP_PORT, 0, TEST_DAI_LINK_NAME, TEST_SSP_MODE, TEST_SSP_DATA_BITS, - DAI_CLOCK(mclk, TEST_SSP_MCLK, codec_slave), - DAI_CLOCK(bclk, TEST_SSP_BCLK, codec_slave), - DAI_CLOCK(fsync, 48000, codec_slave), - DAI_TDM(2, TEST_SSP_PHY_BITS, 3, 3)) +DAI_CONFIG(TEST_DAI_TYPE, TEST_DAI_PORT, 0, TEST_DAI_LINK_NAME, + SSP_CONFIG(TEST_SSP_MODE, + DAI_CLOCK(mclk, TEST_SSP_MCLK, codec_slave), + 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))) diff --git a/topology/test/test-ssp.m4 b/topology/test/test-ssp.m4 index 05c6fee..383a397 100644 --- a/topology/test/test-ssp.m4 +++ b/topology/test/test-ssp.m4 @@ -86,8 +86,11 @@ 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_DAI_PORT # -DAI_CONFIG(SSP, TEST_SSP_PORT, 0, TEST_DAI_LINK_NAME, TEST_SSP_MODE, TEST_SSP_DATA_BITS, - 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)) +DAI_CONFIG(TEST_DAI_TYPE, TEST_DAI_PORT, 0, 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))) diff --git a/topology/test/test-tone-playback-ssp.m4 b/topology/test/test-tone-playback-ssp.m4 index a530354..1c38c09 100644 --- a/topology/test/test-tone-playback-ssp.m4 +++ b/topology/test/test-tone-playback-ssp.m4 @@ -56,8 +56,11 @@ DAI_ADD(sof/pipe-dai-playback.m4, # # TEST_SSP_DATA_BITS bit I2S using TEST_SSP_PHY_BITS bit sample conatiner on SSP TEST_DAI_PORT # -DAI_CONFIG(SSP, TEST_SSP_PORT, 0, TEST_DAI_LINK_NAME, I2S, TEST_SSP_DATA_BITS, - 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)) +DAI_CONFIG(TEST_DAI_TYPE, TEST_DAI_PORT, 0, 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)))