Skip to content
This repository was archived by the owner on Jan 17, 2019. It is now read-only.

Commit 1adb92a

Browse files
committed
topology: dai: rename sample_bits macro to config_data
Rename SAMPLE_BITS macro to a more generic CONFIG_DATA macro for SSP to also include the mclk id. Also modify users of the macro with the new name. Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
1 parent 6d9ad7a commit 1adb92a

18 files changed

Lines changed: 31 additions & 27 deletions

topology/m4/dai.m4

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ define(`DAI_TDM',
134134
` tx_slots 'STR($3)
135135
` rx_slots 'STR($4)
136136
)
137-
dnl SSP_CONFIG(format, mclk, bclk, fsync, tdm, ssp sample bits)
137+
dnl SSP_CONFIG(format, mclk, bclk, fsync, tdm, ssp_config_data)
138138
define(`SSP_CONFIG',
139139
` format "'$1`"'
140140
` '$2
@@ -145,12 +145,16 @@ define(`SSP_CONFIG',
145145
$6
146146
)
147147

148-
dnl SSP_SAMPLE_BITS(type, idx, valid bits)
149-
define(`SSP_SAMPLE_BITS',
148+
dnl SSP_CONFIG_DATA(type, idx, valid bits, mclk_id)
149+
dnl mclk_id is optional
150+
define(`SSP_CONFIG_DATA',
150151
`SectionVendorTuples."'N_DAI_CONFIG($1$2)`_tuples" {'
151-
` tokens "sof_dai_tokens"'
152+
` tokens "sof_ssp_tokens"'
152153
` tuples."word" {'
153-
` SOF_TKN_DAI_SAMPLE_BITS' STR($3)
154+
` SOF_TKN_INTEL_SSP_SAMPLE_BITS' STR($3)
155+
` }'
156+
` tuples."short" {'
157+
` SOF_TKN_INTEL_SSP_MCLK_ID' ifelse($4, `', "0", STR($4))
154158
` }'
155159
`}'
156160
`SectionData."'N_DAI_CONFIG($1$2)`_data" {'

topology/sof-apl-nocodec.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,4 +95,4 @@ DAI_CONFIG(SSP, 2, 0, NoCodec,
9595
DAI_CLOCK(bclk, 2400000, codec_slave),
9696
DAI_CLOCK(fsync, 48000, codec_slave),
9797
DAI_TDM(2, 25, 3, 3),
98-
SSP_SAMPLE_BITS(SSP, 2, 24)))
98+
SSP_CONFIG_DATA(SSP, 2, 24)))

topology/sof-apl-tdf8532.m4

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -183,42 +183,42 @@ DAI_CONFIG(SSP, 4, 4, SSP4-Codec,
183183
DAI_CLOCK(bclk, 12288000, codec_slave),
184184
DAI_CLOCK(fsync, 48000, codec_slave),
185185
DAI_TDM(8, 32, 15, 15),
186-
SSP_SAMPLE_BITS(SSP, 4, 32)))
186+
SSP_CONFIG_DATA(SSP, 4, 32)))
187187

188188
DAI_CONFIG(SSP, 2, 2, SSP2-Codec,
189189
SSP_CONFIG(DSP_B, DAI_CLOCK(mclk, 24576000, codec_mclk_in),
190190
DAI_CLOCK(bclk, 12288000, codec_slave),
191191
DAI_CLOCK(fsync, 48000, codec_slave),
192192
DAI_TDM(2, 32, 255, 255),
193-
SSP_SAMPLE_BITS(SSP, 2, 32)))
193+
SSP_CONFIG_DATA(SSP, 2, 32)))
194194

195195
DAI_CONFIG(SSP, 0, 0, SSP0-Codec,
196196
SSP_CONFIG(I2S, DAI_CLOCK(mclk, 24576000, codec_mclk_in),
197197
DAI_CLOCK(bclk, 1536000, codec_slave),
198198
DAI_CLOCK(fsync, 48000, codec_slave),
199199
DAI_TDM(2, 16, 3, 3),
200-
SSP_SAMPLE_BITS(SSP, 0, 16)))
200+
SSP_CONFIG_DATA(SSP, 0, 16)))
201201

202202
DAI_CONFIG(SSP, 1, 1, SSP1-Codec,
203203
SSP_CONFIG(I2S, DAI_CLOCK(mclk, 24576000, codec_mclk_in),
204204
DAI_CLOCK(bclk, 1536000, codec_slave),
205205
DAI_CLOCK(fsync, 48000, codec_slave),
206206
DAI_TDM(2, 16, 3, 3),
207-
SSP_SAMPLE_BITS(SSP, 1, 16)))
207+
SSP_CONFIG_DATA(SSP, 1, 16)))
208208

209209
DAI_CONFIG(SSP, 3, 3, SSP3-Codec,
210210
SSP_CONFIG(I2S, DAI_CLOCK(mclk, 24576000, codec_mclk_in),
211211
DAI_CLOCK(bclk, 1536000, codec_slave),
212212
DAI_CLOCK(fsync, 48000, codec_slave),
213213
DAI_TDM(2, 16, 3, 3),
214-
SSP_SAMPLE_BITS(SSP, 3, 16)))
214+
SSP_CONFIG_DATA(SSP, 3, 16)))
215215

216216
DAI_CONFIG(SSP, 5, 5, SSP5-Codec,
217217
SSP_CONFIG(I2S, DAI_CLOCK(mclk, 24576000, codec_mclk_in),
218218
DAI_CLOCK(bclk, 1536000, codec_slave),
219219
DAI_CLOCK(fsync, 48000, codec_slave),
220220
DAI_TDM(2, 16, 3, 3),
221-
SSP_SAMPLE_BITS(SSP, 5, 16)))
221+
SSP_CONFIG_DATA(SSP, 5, 16)))
222222

223223

224224
VIRTUAL_DAPM_ROUTE_IN(BtHfp_ssp0_in, SSP, 0, IN, 0)

topology/sof-bdw-rt286.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,4 +95,4 @@ DAI_CONFIG(SSP, 0, 0, Codec,
9595
DAI_CLOCK(bclk, 2400000, codec_slave),
9696
DAI_CLOCK(fsync, 48000, codec_slave),
9797
DAI_TDM(2, 25, 3, 3),
98-
SSP_SAMPLE_BITS(SSP, 0, 24)))
98+
SSP_CONFIG_DATA(SSP, 0, 24)))

topology/sof-bdw-rt5640.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,4 +95,4 @@ DAI_CONFIG(SSP, 0, 0, Codec,
9595
DAI_CLOCK(bclk, 2400000, codec_slave),
9696
DAI_CLOCK(fsync, 48000, codec_slave),
9797
DAI_TDM(2, 25, 3, 3),
98-
SSP_SAMPLE_BITS(SSP, 0, 24)))
98+
SSP_CONFIG_DATA(SSP, 0, 24)))

topology/sof-byt-da7213.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,4 +95,4 @@ DAI_CONFIG(SSP, 2, 0, SSP2-Codec,
9595
DAI_CLOCK(bclk, 2400000, codec_slave),
9696
DAI_CLOCK(fsync, 48000, codec_slave),
9797
DAI_TDM(2, 25, 3, 3),
98-
SSP_SAMPLE_BITS(SSP, 2, 24)))
98+
SSP_CONFIG_DATA(SSP, 2, 24)))

topology/sof-byt-nocodec.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,4 +95,4 @@ DAI_CONFIG(SSP, 2, 0, NoCodec,
9595
DAI_CLOCK(bclk, 2400000, codec_slave),
9696
DAI_CLOCK(fsync, 48000, codec_slave),
9797
DAI_TDM(2, 25, 3, 3),
98-
SSP_SAMPLE_BITS(SSP, 2, 24)))
98+
SSP_CONFIG_DATA(SSP, 2, 24)))

topology/sof-byt-rt5640.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,4 +95,4 @@ DAI_CONFIG(SSP, 2, 0, SSP2-Codec,
9595
DAI_CLOCK(bclk, 2400000, codec_slave),
9696
DAI_CLOCK(fsync, 48000, codec_slave),
9797
DAI_TDM(2, 25, 3, 3),
98-
SSP_SAMPLE_BITS(SSP, 2, 24)))
98+
SSP_CONFIG_DATA(SSP, 2, 24)))

topology/sof-byt-rt5645.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,4 +95,4 @@ DAI_CONFIG(SSP, 2, 0, SSP2-Codec,
9595
DAI_CLOCK(bclk, 2400000, codec_slave),
9696
DAI_CLOCK(fsync, 48000, codec_slave),
9797
DAI_TDM(2, 25, 3, 3),
98-
SSP_SAMPLE_BITS(SSP, 2, 24)))
98+
SSP_CONFIG_DATA(SSP, 2, 24)))

topology/sof-byt-rt5651.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,4 +95,4 @@ DAI_CONFIG(SSP, 2, 0, SSP2-Codec,
9595
DAI_CLOCK(bclk, 2400000, codec_slave),
9696
DAI_CLOCK(fsync, 48000, codec_slave),
9797
DAI_TDM(2, 25, 3, 3),
98-
SSP_SAMPLE_BITS(SSP, 2, 24)))
98+
SSP_CONFIG_DATA(SSP, 2, 24)))

0 commit comments

Comments
 (0)