Add a token for number of bits in a sample for DAI configs
Signed-off-by: Liam Girdwood liam.r.girdwood@linux.intel.com --- topology/m4/local.m4 | 29 +++++++++++++++++++++++++++-- topology/reef-apl-nocodec.m4 | 4 ++-- topology/reef-bdw-rt286.m4 | 4 ++-- topology/reef-bdw-rt5640.m4 | 4 ++-- topology/reef-bxt-nocodec.m4 | 4 ++-- topology/reef-byt-nocodec.m4 | 4 ++-- topology/reef-byt-rt5640.m4 | 4 ++-- topology/reef-byt-rt5651.m4 | 4 ++-- topology/reef-cht-nocodec.m4 | 4 ++-- topology/reef-hsw-rt5640.m4 | 4 ++-- topology/sof/tokens.m4 | 1 + 11 files changed, 46 insertions(+), 20 deletions(-)
diff --git a/topology/m4/local.m4 b/topology/m4/local.m4 index a14f310..a559670 100644 --- a/topology/m4/local.m4 +++ b/topology/m4/local.m4 @@ -394,17 +394,38 @@ define(`DAI_TDM', ` rx_slots 'STR($4) )
-dnl DAI_CONFIG(type, idx, name, sname, format, mclk, bclk, fsync, tdm) +dnl Pipeline name) +define(`N_DAI_CONFIG', `DAICONFIG.'$1) + +dnl DAI_CONFIG(type, idx, name, sname, format, valid bits, mclk, bclk, fsync, tdm) define(`DAI_CONFIG', `SectionHWConfig."'$1$2`" {' `' ` id "'$2`"' ` format "'$5`"' `' -` '$6 ` '$7 ` '$8 ` '$9 +` '$10 +`}' +`SectionVendorTuples."'N_DAI_CONFIG($1$2)`_tuples_str" {' +` tokens "sof_dai_tokens"' +` tuples."string" {' +` SOF_TKN_DAI_TYPE' STR($1) +` }' +`}' +`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."'$3`" {' @@ -414,6 +435,10 @@ define(`DAI_CONFIG', ` hw_configs [' ` "'$1$2`"' ` ]' +` data [' +` "'N_DAI_CONFIG($1$2)`_data"' +` "'N_DAI_CONFIG($1$2)`_data_str"' +` ]' `}')
dnl COMP_SAMPLE_SIZE(FMT) diff --git a/topology/reef-apl-nocodec.m4 b/topology/reef-apl-nocodec.m4 index 93febe0..93b57fe 100644 --- a/topology/reef-apl-nocodec.m4 +++ b/topology/reef-apl-nocodec.m4 @@ -82,8 +82,8 @@ DAI_ADD(sof/pipe-dai-capture.m4, SSP, 2, I2S, PIPELINE_SINK_2, 2) # # BE configurations - overrides config in ACPI if present # -DAI_CONFIG(SSP, 2, NoCodec, I2S, I2S, +DAI_CONFIG(SSP, 2, NoCodec, I2S, I2S, 24, DAI_CLOCK(mclk, 19200000, slave), DAI_CLOCK(bclk, 2400000, slave), DAI_CLOCK(fsync, 48000, slave), - DAI_TDM(2, 24, 3, 3)) + DAI_TDM(2, 25, 3, 3)) diff --git a/topology/reef-bdw-rt286.m4 b/topology/reef-bdw-rt286.m4 index 4135353..e4b600a 100644 --- a/topology/reef-bdw-rt286.m4 +++ b/topology/reef-bdw-rt286.m4 @@ -82,8 +82,8 @@ DAI_ADD(sof/pipe-dai-capture.m4, SSP, 0, I2S, PIPELINE_SINK_2, 2) # # BE configurations - overrides config in ACPI if present # -DAI_CONFIG(SSP, 0, Codec, I2S, I2S, +DAI_CONFIG(SSP, 0, Codec, I2S, I2S, 24, DAI_CLOCK(mclk, 24000000, slave), DAI_CLOCK(bclk, 2400000, slave), DAI_CLOCK(fsync, 48000, slave), - DAI_TDM(2, 24, 3, 3)) + DAI_TDM(2, 25, 3, 3)) diff --git a/topology/reef-bdw-rt5640.m4 b/topology/reef-bdw-rt5640.m4 index 540ac4c..5d96236 100644 --- a/topology/reef-bdw-rt5640.m4 +++ b/topology/reef-bdw-rt5640.m4 @@ -82,8 +82,8 @@ DAI_ADD(sof/pipe-dai-capture.m4, SSP, 0, I2S, PIPELINE_SINK_2, 2) # # BE configurations - overrides config in ACPI if present # -DAI_CONFIG(SSP, 0, Codec, I2S, I2S, +DAI_CONFIG(SSP, 0, Codec, I2S, I2S, 24, DAI_CLOCK(mclk, 24000000, slave), DAI_CLOCK(bclk, 2400000, slave), DAI_CLOCK(fsync, 48000, slave), - DAI_TDM(2, 24, 3, 3)) + DAI_TDM(2, 25, 3, 3)) diff --git a/topology/reef-bxt-nocodec.m4 b/topology/reef-bxt-nocodec.m4 index 564e78c..a8fd320 100644 --- a/topology/reef-bxt-nocodec.m4 +++ b/topology/reef-bxt-nocodec.m4 @@ -82,8 +82,8 @@ DAI_ADD(sof/pipe-dai-capture.m4, SSP, 2, I2S, PIPELINE_SINK_2, 2) # # BE configurations - overrides config in ACPI if present # -DAI_CONFIG(SSP, 2, NoCodec, I2S, I2S, +DAI_CONFIG(SSP, 2, NoCodec, I2S, I2S, 24, DAI_CLOCK(mclk, 19200000, slave), DAI_CLOCK(bclk, 2400000, slave), DAI_CLOCK(fsync, 48000, slave), - DAI_TDM(2, 24, 3, 3)) + DAI_TDM(2, 25, 3, 3)) diff --git a/topology/reef-byt-nocodec.m4 b/topology/reef-byt-nocodec.m4 index ab0cd8e..96e2e4b 100644 --- a/topology/reef-byt-nocodec.m4 +++ b/topology/reef-byt-nocodec.m4 @@ -82,8 +82,8 @@ DAI_ADD(sof/pipe-dai-capture.m4, SSP, 2, I2S, PIPELINE_SINK_2, 2) # # BE configurations - overrides config in ACPI if present # -DAI_CONFIG(SSP, 2, NoCodec, I2S, I2S, +DAI_CONFIG(SSP, 2, NoCodec, I2S, I2S, 24, DAI_CLOCK(mclk, 19200000, slave), DAI_CLOCK(bclk, 2400000, slave), DAI_CLOCK(fsync, 48000, slave), - DAI_TDM(2, 24, 3, 3)) + DAI_TDM(2, 25, 3, 3)) diff --git a/topology/reef-byt-rt5640.m4 b/topology/reef-byt-rt5640.m4 index 2cee093..c135fed 100644 --- a/topology/reef-byt-rt5640.m4 +++ b/topology/reef-byt-rt5640.m4 @@ -82,8 +82,8 @@ DAI_ADD(sof/pipe-dai-capture.m4, SSP, 2, I2S, PIPELINE_SINK_2, 2) # # BE configurations - overrides config in ACPI if present # -DAI_CONFIG(SSP, 2, Baytrail Audio, Audio, I2S, +DAI_CONFIG(SSP, 2, Baytrail Audio, Audio, I2S, 24, DAI_CLOCK(mclk, 19200000, slave), DAI_CLOCK(bclk, 2400000, slave), DAI_CLOCK(fsync, 48000, slave), - DAI_TDM(2, 24, 3, 3)) + DAI_TDM(2, 25, 3, 3)) diff --git a/topology/reef-byt-rt5651.m4 b/topology/reef-byt-rt5651.m4 index 4679343..877492a 100644 --- a/topology/reef-byt-rt5651.m4 +++ b/topology/reef-byt-rt5651.m4 @@ -82,8 +82,8 @@ DAI_ADD(sof/pipe-dai-capture.m4, SSP, 2, I2S, PIPELINE_SINK_2, 2) # # BE configurations - overrides config in ACPI if present # -DAI_CONFIG(SSP, 2, Baytrail Audio, Audio, I2S, +DAI_CONFIG(SSP, 2, Baytrail Audio, Audio, I2S, 24, DAI_CLOCK(mclk, 19200000, slave), DAI_CLOCK(bclk, 2400000, slave), DAI_CLOCK(fsync, 48000, slave), - DAI_TDM(2, 24, 3, 3)) + DAI_TDM(2, 25, 3, 3)) diff --git a/topology/reef-cht-nocodec.m4 b/topology/reef-cht-nocodec.m4 index f754551..381ff12 100644 --- a/topology/reef-cht-nocodec.m4 +++ b/topology/reef-cht-nocodec.m4 @@ -82,8 +82,8 @@ DAI_ADD(sof/pipe-dai-capture.m4, SSP, 2, I2S, PIPELINE_SINK_2, 2) # # BE configurations - overrides config in ACPI if present # -DAI_CONFIG(SSP, 2, NoCodec, I2S, I2S, +DAI_CONFIG(SSP, 2, NoCodec, I2S, I2S, 24, DAI_CLOCK(mclk, 19200000, slave), DAI_CLOCK(bclk, 2400000, slave), DAI_CLOCK(fsync, 48000, slave), - DAI_TDM(2, 24, 3, 3)) + DAI_TDM(2, 25, 3, 3)) diff --git a/topology/reef-hsw-rt5640.m4 b/topology/reef-hsw-rt5640.m4 index cbbbfbe..3a76223 100644 --- a/topology/reef-hsw-rt5640.m4 +++ b/topology/reef-hsw-rt5640.m4 @@ -82,8 +82,8 @@ DAI_ADD(sof/pipe-dai-capture.m4, SSP, 0, I2S, PIPELINE_SINK_2, 2) # # BE configurations - overrides config in ACPI if present # -DAI_CONFIG(SSP, 0, Codec, I2S, I2S, +DAI_CONFIG(SSP, 0, Codec, I2S, I2S, 24, DAI_CLOCK(mclk, 24000000, slave), DAI_CLOCK(bclk, 2400000, slave), DAI_CLOCK(fsync, 48000, slave), - DAI_TDM(2, 24, 3, 3)) + DAI_TDM(2, 25, 3, 3)) diff --git a/topology/sof/tokens.m4 b/topology/sof/tokens.m4 index 3902c36..530220a 100644 --- a/topology/sof/tokens.m4 +++ b/topology/sof/tokens.m4 @@ -19,6 +19,7 @@ SectionVendorTokens."sof_dai_tokens" { SOF_TKN_DAI_DMAC_CONFIG "153" SOF_TKN_DAI_TYPE "154" SOF_TKN_DAI_INDEX "155" + SOF_TKN_DAI_SAMPLE_BITS "156" }
SectionVendorTokens."sof_sched_tokens" {