@@ -205,74 +205,7 @@ static struct dai dmic[2] = {
205205
206206#endif
207207
208- /* TODO: numbers to be defined and shared with HD/A dmas */
209- static struct dai hda [(6 + 7 )] = {
210- {
211- .type = SOF_DAI_INTEL_HDA ,
212- .index = 0 ,
213- .ops = & hda_ops
214- },
215- {
216- .type = SOF_DAI_INTEL_HDA ,
217- .index = 1 ,
218- .ops = & hda_ops
219- },
220- {
221- .type = SOF_DAI_INTEL_HDA ,
222- .index = 2 ,
223- .ops = & hda_ops
224- },
225- {
226- .type = SOF_DAI_INTEL_HDA ,
227- .index = 3 ,
228- .ops = & hda_ops
229- },
230- {
231- .type = SOF_DAI_INTEL_HDA ,
232- .index = 4 ,
233- .ops = & hda_ops
234- },
235- {
236- .type = SOF_DAI_INTEL_HDA ,
237- .index = 5 ,
238- .ops = & hda_ops
239- },
240- {
241- .type = SOF_DAI_INTEL_HDA ,
242- .index = 6 ,
243- .ops = & hda_ops
244- },
245- {
246- .type = SOF_DAI_INTEL_HDA ,
247- .index = 7 ,
248- .ops = & hda_ops
249- },
250- {
251- .type = SOF_DAI_INTEL_HDA ,
252- .index = 8 ,
253- .ops = & hda_ops
254- },
255- {
256- .type = SOF_DAI_INTEL_HDA ,
257- .index = 9 ,
258- .ops = & hda_ops
259- },
260- {
261- .type = SOF_DAI_INTEL_HDA ,
262- .index = 10 ,
263- .ops = & hda_ops
264- },
265- {
266- .type = SOF_DAI_INTEL_HDA ,
267- .index = 11 ,
268- .ops = & hda_ops
269- },
270- {
271- .type = SOF_DAI_INTEL_HDA ,
272- .index = 12 ,
273- .ops = & hda_ops
274- }
275- };
208+ static struct dai hda [(DAI_NUM_HDA_OUT + DAI_NUM_HDA_IN )];
276209
277210static struct dai_type_info dti [] = {
278211 {
@@ -298,6 +231,13 @@ int dai_init(void)
298231{
299232 int i ;
300233
234+ /* init hd/a, note that size depends on the platform caps */
235+ for (i = 0 ; i < ARRAY_SIZE (hda ); i ++ ) {
236+ hda [i ].type = SOF_DAI_INTEL_HDA ;
237+ hda [i ].index = i ;
238+ hda [i ].ops = & hda_ops ;
239+ }
240+
301241 /* init SSP ports */
302242 trace_point (TRACE_BOOT_PLATFORM_SSP );
303243 for (i = 0 ; i < DAI_NUM_SSP_BASE + DAI_NUM_SSP_EXT ; i ++ )
0 commit comments