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

Commit 8f27227

Browse files
committed
topology: add SSP bespoke config data for SSP dais
Add DAI bespoke config data for dai_in widget, bind DAI bespoke config to DAI comp. Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
1 parent 9d6283e commit 8f27227

18 files changed

Lines changed: 70 additions & 28 deletions

topology/m4/dai.m4

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ define(`N_DAI', DAI_NAME)
77
define(`N_DAI_OUT', DAI_NAME`.OUT')
88
define(`N_DAI_IN', DAI_NAME`.IN')
99

10-
dnl W_DAI_OUT(type, index, dai_link, format, periods_sink, periods_source, preload)
10+
dnl W_DAI_OUT(type, index, dai_link, format, periods_sink, periods_source, preload, bespoke_data)
1111
define(`W_DAI_OUT',
1212
`SectionVendorTuples."'N_DAI_OUT($2)`_tuples_w_comp" {'
1313
` tokens "sof_comp_tokens"'
@@ -47,6 +47,7 @@ define(`W_DAI_OUT',
4747
`SectionData."'N_DAI_OUT($2)`_data_comp_str" {'
4848
` tuples "'N_DAI_OUT($2)`_tuples_comp_str"'
4949
`}'
50+
$8
5051
`SectionWidget."'N_DAI_OUT`" {'
5152
` index "'PIPELINE_ID`"'
5253
` type "dai_in"'
@@ -57,6 +58,7 @@ define(`W_DAI_OUT',
5758
` "'N_DAI_OUT($2)`_data_w_comp"'
5859
` "'N_DAI_OUT($2)`_data_str"'
5960
` "'N_DAI_OUT($2)`_data_comp_str"'
61+
`ifelse($8, `', `',` "'N_DAI_OUT($2)`_data_bespoke_w"')'
6062
` ]'
6163
`}')
6264

@@ -159,8 +161,8 @@ define(`DAI_CONFIG',
159161

160162
dnl DAI_ADD(pipeline,
161163
dnl pipe id, dai type, dai_index, dai_be,
162-
dnl buffer, periods, format,
163-
dnl frames, deadline, priority, core)
164+
dnl buffer, periods, format,frames, deadline,
165+
dnl priority, core, bespoken_config)
164166
define(`DAI_ADD',
165167
`undefine(`PIPELINE_ID')'
166168
`undefine(`DAI_TYPE')'
@@ -173,6 +175,7 @@ define(`DAI_ADD',
173175
`undefine(`SCHEDULE_DEADLINE')'
174176
`undefine(`SCHEDULE_PRIORITY')'
175177
`undefine(`SCHEDULE_CORE')'
178+
`undefine(`DAI_BESPOKE_CONFIG')'
176179
`define(`PIPELINE_ID', $2)'
177180
`define(`DAI_TYPE', STR($3))'
178181
`define(`DAI_INDEX', STR($4))'
@@ -185,6 +188,7 @@ define(`DAI_ADD',
185188
`define(`SCHEDULE_DEADLINE', $10)'
186189
`define(`SCHEDULE_PRIORITY', $11)'
187190
`define(`SCHEDULE_CORE', $12)'
191+
`define(`DAI_BESPOKE_CONFIG', $13)'
188192
`include($1)'
189193
)
190194

topology/platform/common/ssp.m4

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,18 @@ define(`SSP_CONFIG_DATA',
4343
`}'
4444
)
4545

46+
dnl SSP_BESPOKE_DATA(type, idx, value)
47+
dnl value is optional
48+
define(`SSP_BESPOKE_DATA',
49+
`SectionVendorTuples."$1$2.OUT_tuples_bespoke_w" {'
50+
` tokens "sof_dai_tokens"'
51+
` tuples."word" {'
52+
` SOF_TKN_DAI_BESPOKE_CONFIG' ifelse($3, `', "0", STR($3))
53+
` }'
54+
`}'
55+
`SectionData."$1$2.OUT_data_bespoke_w" {'
56+
` tuples "$1$2.OUT_tuples_bespoke_w"'
57+
`}'
58+
)
59+
4660
divert(0)dnl

topology/sof-apl-nocodec.m4

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,8 @@ PIPELINE_PCM_DAI_ADD(sof/pipe-volume-capture.m4,
116116
DAI_ADD(sof/pipe-dai-playback.m4,
117117
1, SSP, 0, NoCodec-0,
118118
PIPELINE_SOURCE_1, 2, s16le,
119-
48, 1000, 0, 0)
119+
48, 1000, 0, 0,
120+
SSP_BESPOKE_DATA(SSP, 0, 1))
120121

121122
# capture DAI is SSP0 using 2 periods
122123
# Buffers use s16le format, with 48 frame per 1000us on core 0 with priority 0
@@ -130,7 +131,8 @@ DAI_ADD(sof/pipe-dai-capture.m4,
130131
DAI_ADD(sof/pipe-dai-playback.m4,
131132
3, SSP, 1, NoCodec-1,
132133
PIPELINE_SOURCE_3, 2, s16le,
133-
48, 1000, 0, 0)
134+
48, 1000, 0, 0,
135+
SSP_BESPOKE_DATA(SSP, 1, 1))
134136

135137
# capture DAI is SSP1 using 2 periods
136138
# Buffers use s16le format, with 48 frame per 1000us on core 0 with priority 0
@@ -144,7 +146,8 @@ DAI_ADD(sof/pipe-dai-capture.m4,
144146
DAI_ADD(sof/pipe-dai-playback.m4,
145147
5, SSP, 2, NoCodec-2,
146148
PIPELINE_SOURCE_5, 2, s16le,
147-
48, 1000, 0, 0)
149+
48, 1000, 0, 0,
150+
SSP_BESPOKE_DATA(SSP, 2, 1))
148151

149152
# capture DAI is SSP2 using 2 periods
150153
# Buffers use s16le format, with 48 frame per 1000us on core 0 with priority 0
@@ -158,7 +161,8 @@ DAI_ADD(sof/pipe-dai-capture.m4,
158161
DAI_ADD(sof/pipe-dai-playback.m4,
159162
7, SSP, 3, NoCodec-3,
160163
PIPELINE_SOURCE_7, 2, s16le,
161-
48, 1000, 0, 0)
164+
48, 1000, 0, 0,
165+
SSP_BESPOKE_DATA(SSP, 3, 1))
162166

163167
# capture DAI is SSP3 using 2 periods
164168
# Buffers use s16le format, with 48 frame per 1000us on core 0 with priority 0
@@ -172,7 +176,8 @@ DAI_ADD(sof/pipe-dai-capture.m4,
172176
#DAI_ADD(sof/pipe-dai-playback.m4,
173177
# 9, SSP, 4, NoCodec,
174178
# PIPELINE_SOURCE_9, 2, s16le,
175-
# 48, 1000, 0, 0)
179+
# 48, 1000, 0, 0,
180+
# SSP_BESPOKE_DATA(SSP, 4, 1))
176181

177182
# capture DAI is SSP4 using 2 periods
178183
# Buffers use s16le format, with 48 frame per 1000us on core 0 with priority 0
@@ -186,7 +191,8 @@ DAI_ADD(sof/pipe-dai-capture.m4,
186191
#DAI_ADD(sof/pipe-dai-playback.m4,
187192
# 11, SSP, 5, NoCodec,
188193
# PIPELINE_SOURCE_11, 2, s16le,
189-
# 48, 1000, 0, 0)
194+
# 48, 1000, 0, 0,
195+
# SSP_BESPOKE_DATA(SSP, 5, 1))
190196

191197
# capture DAI is SSP5 using 2 periods
192198
# Buffers use s16le format, with 48 frame per 1000us on core 0 with priority 0

topology/sof-apl-pcm512x.m4

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ DAI_ADD(sof/pipe-dai-capture.m4,
6161
DAI_ADD(sof/pipe-dai-playback.m4,
6262
2, SSP, 5, SSP5-Codec,
6363
PIPELINE_SOURCE_2, 2, s16le,
64-
48, 1000, 0, 0)
64+
48, 1000, 0, 0,
65+
SSP_BESPOKE_DATA(SSP, 5, 1))
6566

6667
# capture DAI is SSP5 using 2 periods
6768
# Buffers use s16le format, with 48 frame per 1000us on core 0 with priority 0

topology/sof-apl-tdf8532.m4

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,8 @@ PIPELINE_PCM_DAI_ADD(sof/pipe-volume-capture.m4,
102102
DAI_ADD(sof/pipe-dai-playback.m4,
103103
4, SSP, 0, SSP0-Codec,
104104
PIPELINE_SOURCE_4, 2, s16le,
105-
48, 1000, 0, 0)
105+
48, 1000, 0, 0,
106+
SSP_BESPOKE_DATA(SSP, 0, 1))
106107

107108
# capture DAI is SSP0 using 2 periods
108109
# Buffers use s16le format, with 48 frame per 1000us on core 0 with priority 0
@@ -123,7 +124,8 @@ DAI_ADD(sof/pipe-dai-capture.m4,
123124
DAI_ADD(sof/pipe-dai-playback.m4,
124125
2, SSP, 2, SSP2-Codec,
125126
PIPELINE_SOURCE_2, 2, s32le,
126-
48, 1000, 0, 0)
127+
48, 1000, 0, 0,
128+
SSP_BESPOKE_DATA(SSP, 2, 1))
127129

128130
# capture DAI is SSP2 using 2 periods
129131
# Buffers use s32le format, with 48 frame per 1000us on core 0 with priority 0
@@ -137,7 +139,8 @@ DAI_ADD(sof/pipe-dai-capture.m4,
137139
DAI_ADD(sof/pipe-dai-playback.m4,
138140
7, SSP, 3, SSP3-Codec,
139141
PIPELINE_SOURCE_7, 2, s16le,
140-
48, 1000, 0, 0)
142+
48, 1000, 0, 0,
143+
SSP_BESPOKE_DATA(SSP, 3, 1))
141144

142145
# capture DAI is SSP3 using 2 periods
143146
# Buffers use s16le format, with 48 frame per 1000us on core 0 with priority 0
@@ -151,14 +154,16 @@ DAI_ADD(sof/pipe-dai-capture.m4,
151154
DAI_ADD(sof/pipe-dai-playback.m4,
152155
1, SSP, 4, SSP4-Codec,
153156
PIPELINE_SOURCE_1, 2, s32le,
154-
48, 1000, 0, 0)
157+
48, 1000, 0, 0,
158+
SSP_BESPOKE_DATA(SSP, 4, 1))
155159

156160
# playback DAI is SSP5 using 2 periods
157161
# Buffers use s16le format, with 48 frame per 1000us on core 0 with priority 0
158162
DAI_ADD(sof/pipe-dai-playback.m4,
159163
9, SSP, 5, SSP5-Codec,
160164
PIPELINE_SOURCE_9, 2, s16le,
161-
48, 1000, 0, 0)
165+
48, 1000, 0, 0,
166+
SSP_BESPOKE_DATA(SSP, 5, 1))
162167

163168
# capture DAI is SSP5 using 2 periods
164169
# Buffers use s16le format, with 48 frame per 1000us on core 0 with priority 0

topology/sof-bdw-rt286.m4

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,8 @@ SectionGraph."pipe-bdw-rt286" {
7676
DAI_ADD(sof/pipe-dai-playback.m4,
7777
1, SSP, 0, Codec,
7878
PIPELINE_SOURCE_1, 2, s24le,
79-
48, 1000, 0, 0)
79+
48, 1000, 0, 0,
80+
SSP_BESPOKE_DATA(SSP, 0, 1))
8081

8182
# capture DAI is SSP0 using 2 periods
8283
# Buffers use s24le format, with 48 frame per 1000us on core 0 with priority 0

topology/sof-bdw-rt5640.m4

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,8 @@ SectionGraph."pipe-bdw-rt5640" {
7676
DAI_ADD(sof/pipe-dai-playback.m4,
7777
1, SSP, 0, Codec,
7878
PIPELINE_SOURCE_1, 2, s24le,
79-
48, 1000, 0, 0)
79+
48, 1000, 0, 0,
80+
SSP_BESPOKE_DATA(SSP, 0, 1))
8081

8182
# capture DAI is SSP0 using 2 periods
8283
# Buffers use s24le format, with 48 frame per 1000us on core 0 with priority 0

topology/sof-byt-da7213.m4

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,8 @@ SectionGraph."pipe-byt-da7212" {
7676
DAI_ADD(sof/pipe-dai-playback.m4,
7777
1, SSP, 2, SSP2-Codec,
7878
PIPELINE_SOURCE_1, 2, s24le,
79-
48, 1000, 0, 0)
79+
48, 1000, 0, 0,
80+
SSP_BESPOKE_DATA(SSP, 2, 1))
8081

8182
# capture DAI is SSP2 using 2 periods
8283
# Buffers use s24le format, with 48 frame per 1000us on core 0 with priority 0

topology/sof-byt-nocodec.m4

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,8 @@ SectionGraph."pipe-byt-nocodec" {
7676
DAI_ADD(sof/pipe-dai-playback.m4,
7777
1, SSP, 2, NoCodec-2,
7878
PIPELINE_SOURCE_1, 2, s24le,
79-
48, 1000, 0, 0)
79+
48, 1000, 0, 0,
80+
SSP_BESPOKE_DATA(SSP, 2, 1))
8081

8182
# capture DAI is SSP2 using 2 periods
8283
# Buffers use s24le format, with 48 frame per 1000us on core 0 with priority 0

topology/sof-byt-rt5640.m4

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,8 @@ SectionGraph."pipe-byt-rt5640" {
7676
DAI_ADD(sof/pipe-dai-playback.m4,
7777
1, SSP, 2, SSP2-Codec,
7878
PIPELINE_SOURCE_1, 2, s24le,
79-
48, 1000, 0, 0)
79+
48, 1000, 0, 0,
80+
SSP_BESPOKE_DATA(SSP, 2, 1))
8081

8182
# capture DAI is SSP2 using 2 periods
8283
# Buffers use s24le format, with 48 frame per 1000us on core 0 with priority 0

0 commit comments

Comments
 (0)