aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/omap/abe/abe_dat.c
blob: 4d6157cd671b86b3163277e0975407c4e019e65e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
/*

  This file is provided under a dual BSD/GPLv2 license.  When using or
  redistributing this file, you may do so under either license.

  GPL LICENSE SUMMARY

  Copyright(c) 2010-2011 Texas Instruments Incorporated,
  All rights reserved.

  This program is free software; you can redistribute it and/or modify
  it under the terms of version 2 of the GNU General Public License as
  published by the Free Software Foundation.

  This program is distributed in the hope that it will be useful, but
  WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with this program; if not, write to the Free Software
  Foundation, Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
  The full GNU General Public License is included in this distribution
  in the file called LICENSE.GPL.

  BSD LICENSE

  Copyright(c) 2010-2011 Texas Instruments Incorporated,
  All rights reserved.

  Redistribution and use in source and binary forms, with or without
  modification, are permitted provided that the following conditions
  are met:

    * Redistributions of source code must retain the above copyright
      notice, this list of conditions and the following disclaimer.
    * Redistributions in binary form must reproduce the above copyright
      notice, this list of conditions and the following disclaimer in
      the documentation and/or other materials provided with the
      distribution.
    * Neither the name of Texas Instruments Incorporated nor the names of
      its contributors may be used to endorse or promote products derived
      from this software without specific prior written permission.

  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

*/

#include "abe_legacy.h"

struct omap_abe *abe;

/*
 * HAL/FW ports status / format / sampling / protocol(call_back) / features
 *	/ gain / name
 */
abe_port_t abe_port[LAST_PORT_ID];	/* list of ABE ports */
const abe_port_t abe_port_init[LAST_PORT_ID] = {
	/* Status Data Format Drift Call-Back Protocol+selector desc_addr;
	   buf_addr; buf_size; iter; irq_addr irq_data DMA_T $Features
	   reseted at start Port Name for the debug trace */
	/* DMIC */ {
		    OMAP_ABE_PORT_ACTIVITY_IDLE, {96000, SIX_MSB},
		    NODRIFT, NOCALLBACK, 1, (DMIC_ITER/6),
		    {
		     SNK_P, DMIC_PORT_PROT,
		     {{dmem_dmic, dmem_dmic_size, DMIC_ITER} }
		     },
		    {0, 0},
		    {EQDMIC, 0}, "DMIC"},
	/* PDM_UL */ {
		      OMAP_ABE_PORT_ACTIVITY_IDLE, {96000, STEREO_MSB},
		      NODRIFT, NOCALLBACK, smem_amic, (MCPDM_UL_ITER/2),
		      {
		       SNK_P, MCPDMUL_PORT_PROT,
		       {{dmem_amic, dmem_amic_size, MCPDM_UL_ITER} }
		       },
		      {0, 0},
		      {EQAMIC, 0}, "PDM_UL"},
	/* BT_VX_UL */ {
			OMAP_ABE_PORT_ACTIVITY_IDLE, {8000, STEREO_MSB},
			NODRIFT, NOCALLBACK, smem_bt_vx_ul_opp50, 1,
			{
			 SNK_P, SERIAL_PORT_PROT, {{
						   (MCBSP1_DMA_TX*ATC_SIZE),
						   dmem_bt_vx_ul,
						   dmem_bt_vx_ul_size,
						   (1*SCHED_LOOP_8kHz)
						   } }
			 },
			{0, 0}, {0}, "BT_VX_UL"},
	/* MM_UL */ {
		     OMAP_ABE_PORT_ACTIVITY_IDLE, {48000, STEREO_MSB},
		     NODRIFT, NOCALLBACK, smem_mm_ul, 1,
		     {
		      SRC_P, DMAREQ_PORT_PROT, {{
						(CBPr_DMA_RTX3*ATC_SIZE),
						dmem_mm_ul, dmem_mm_ul_size,
						(10*SCHED_LOOP_48kHz),
						ABE_DMASTATUS_RAW, (1 << 3)
						} }
		      },
		     {CIRCULAR_BUFFER_PERIPHERAL_R__3, 120},
		     {UPROUTE, 0}, "MM_UL"},
	/* MM_UL2 */ {
		      OMAP_ABE_PORT_ACTIVITY_IDLE, {48000, STEREO_MSB},
		      NODRIFT, NOCALLBACK, smem_mm_ul2, 1,
		      {
		       SRC_P, DMAREQ_PORT_PROT, {{
						 (CBPr_DMA_RTX4*ATC_SIZE),
						 dmem_mm_ul2, dmem_mm_ul2_size,
						 (2*SCHED_LOOP_48kHz),
						 ABE_DMASTATUS_RAW, (1 << 4)
						 } }
		       },
		      {CIRCULAR_BUFFER_PERIPHERAL_R__4, 24},
		      {UPROUTE, 0}, "MM_UL2"},
	/* VX_UL */ {
		     OMAP_ABE_PORT_ACTIVITY_IDLE, {8000, MONO_MSB},
		     NODRIFT, NOCALLBACK, smem_vx_ul, 1,
		     {
		      SRC_P, DMAREQ_PORT_PROT, {{
						(CBPr_DMA_RTX2*ATC_SIZE),
						dmem_vx_ul, dmem_vx_ul_size,
						(1*SCHED_LOOP_8kHz),
						ABE_DMASTATUS_RAW, (1 << 2)
						} }
		      }, {
			  CIRCULAR_BUFFER_PERIPHERAL_R__2, 2},
		     {ASRC2, 0}, "VX_UL"},
	/* MM_DL */ {
		     OMAP_ABE_PORT_ACTIVITY_IDLE, {48000, STEREO_MSB},
		     NODRIFT, NOCALLBACK, smem_mm_dl, 1,
		     {
		      SNK_P, PINGPONG_PORT_PROT, {{
						  (CBPr_DMA_RTX0*ATC_SIZE),
						  dmem_mm_dl, dmem_mm_dl_size,
						  (2*SCHED_LOOP_48kHz),
						  ABE_DMASTATUS_RAW, (1 << 0)
						  } }
		      },
		     {CIRCULAR_BUFFER_PERIPHERAL_R__0, 24},
		     {ASRC3, 0}, "MM_DL"},
	/* VX_DL */ {
		     OMAP_ABE_PORT_ACTIVITY_IDLE, {8000, MONO_MSB},
		     NODRIFT, NOCALLBACK, smem_vx_dl, 1,
		     {
		      SNK_P, DMAREQ_PORT_PROT, {{
						(CBPr_DMA_RTX1*ATC_SIZE),
						dmem_vx_dl, dmem_vx_dl_size,
						(1*SCHED_LOOP_8kHz),
						ABE_DMASTATUS_RAW, (1 << 1)
						} }
		      },
		     {CIRCULAR_BUFFER_PERIPHERAL_R__1, 2},
		     {ASRC1, 0}, "VX_DL"},
	/* TONES_DL */ {
			OMAP_ABE_PORT_ACTIVITY_IDLE, {48000, STEREO_MSB},
			NODRIFT, NOCALLBACK, smem_tones_dl, 1,
			{
			 SNK_P, DMAREQ_PORT_PROT, {{
						   (CBPr_DMA_RTX5*ATC_SIZE),
						   dmem_tones_dl,
						   dmem_tones_dl_size,
						   (2*SCHED_LOOP_48kHz),
						   ABE_DMASTATUS_RAW, (1 << 5)
						   } }
			 },
			{CIRCULAR_BUFFER_PERIPHERAL_R__5, 24},
			{0}, "TONES_DL"},
	/* VIB_DL */ {
		      OMAP_ABE_PORT_ACTIVITY_IDLE, {24000, STEREO_MSB},
		      NODRIFT, NOCALLBACK, smem_vib, 1,
		      {
		       SNK_P, DMAREQ_PORT_PROT, {{
						 (CBPr_DMA_RTX6*ATC_SIZE),
						 dmem_vib_dl, dmem_vib_dl_size,
						 (2*SCHED_LOOP_24kHz),
						 ABE_DMASTATUS_RAW, (1 << 6)
						 } }
		       },
		      {CIRCULAR_BUFFER_PERIPHERAL_R__6, 12},
		      {0}, "VIB_DL"},
	/* BT_VX_DL */ {
			OMAP_ABE_PORT_ACTIVITY_IDLE, {8000, MONO_MSB},
			NODRIFT, NOCALLBACK, smem_bt_vx_dl_opp50, 1,
			{
			 SRC_P, SERIAL_PORT_PROT, {{
						   (MCBSP1_DMA_RX*ATC_SIZE),
						   dmem_bt_vx_dl,
						   dmem_bt_vx_dl_size,
						   (1*SCHED_LOOP_8kHz),
						   } }
			 },
			{0, 0}, {0}, "BT_VX_DL"},
	/* PDM_DL */ {
		      OMAP_ABE_PORT_ACTIVITY_IDLE, {96000, SIX_MSB},
		      NODRIFT, NOCALLBACK, 1, (MCPDM_DL_ITER/6),
		      {SRC_P, MCPDMDL_PORT_PROT, {{dmem_mcpdm,
						dmem_mcpdm_size} } },
		      {0, 0},
		      {MIXDL1, EQ1, APS1, MIXDL2, EQ2L, EQ2R, APS2L, APS2R, 0},
		      "PDM_DL"},
	/* MM_EXT_OUT */
	{
	 OMAP_ABE_PORT_ACTIVITY_IDLE, {48000, STEREO_MSB},
	 NODRIFT, NOCALLBACK, smem_mm_ext_out, 1,
	 {
	  SRC_P, SERIAL_PORT_PROT, {{
				    (MCBSP1_DMA_TX*ATC_SIZE),
				    dmem_mm_ext_out, dmem_mm_ext_out_size,
				    (2*SCHED_LOOP_48kHz)
				    } }
	  }, {0, 0}, {0}, "MM_EXT_OUT"},
	/* MM_EXT_IN */
	{
	 OMAP_ABE_PORT_ACTIVITY_IDLE, {48000, STEREO_MSB},
	 NODRIFT, NOCALLBACK, smem_mm_ext_in_opp100, 1,
	 {
	  SNK_P, SERIAL_PORT_PROT, {{
				    (MCBSP1_DMA_RX*ATC_SIZE),
				    dmem_mm_ext_in, dmem_mm_ext_in_size,
				    (2*SCHED_LOOP_48kHz)
				    } }
	  },
	 {0, 0}, {0}, "MM_EXT_IN"},
	/* PCM3_TX */ {
		       OMAP_ABE_PORT_ACTIVITY_IDLE, {48000, STEREO_MSB},
		       NODRIFT, NOCALLBACK, 1, 1,
		       {
			SRC_P, TDM_SERIAL_PORT_PROT, {{
						      (MCBSP3_DMA_TX *
						       ATC_SIZE),
						      dmem_mm_ext_out,
						      dmem_mm_ext_out_size,
						      (2*SCHED_LOOP_48kHz)
						      } }
			},
		       {0, 0}, {0}, "TDM_OUT"},
	/* PCM3_RX */ {
		       OMAP_ABE_PORT_ACTIVITY_IDLE, {48000, STEREO_MSB},
		       NODRIFT, NOCALLBACK, 1, 1,
		       {
			SRC_P, TDM_SERIAL_PORT_PROT, {{
						      (MCBSP3_DMA_RX *
						       ATC_SIZE),
						      dmem_mm_ext_in,
						      dmem_mm_ext_in_size,
						      (2*SCHED_LOOP_48kHz)
						      } }
			},
		       {0, 0}, {0}, "TDM_IN"},
	/* SCHD_DBG_PORT */ {
			     OMAP_ABE_PORT_ACTIVITY_IDLE, {48000, MONO_MSB},
			     NODRIFT, NOCALLBACK, 1, 1,
			     {
			      SRC_P, DMAREQ_PORT_PROT, {{
							(CBPr_DMA_RTX7 *
							 ATC_SIZE),
							dmem_mm_trace,
							dmem_mm_trace_size,
							(2*SCHED_LOOP_48kHz),
							ABE_DMASTATUS_RAW,
							(1 << 4)
							} }
			      }, {CIRCULAR_BUFFER_PERIPHERAL_R__7, 24},
			     {FEAT_SEQ, FEAT_CTL, FEAT_GAINS, 0}, "SCHD_DBG"},
};
/*
 * AESS/ATC destination and source address translation (except McASPs)
 * from the original 64bits words address
 */
const u32 abe_atc_dstid[ABE_ATC_DESC_SIZE >> 3] = {
	/* DMA_0 DMIC PDM_DL PDM_UL McB1TX McB1RX McB2TX McB2RX 0 .. 7 */
	0, 0, 12, 0, 1, 0, 2, 0,
	/* McB3TX McB3RX SLIMT0 SLIMT1 SLIMT2 SLIMT3 SLIMT4 SLIMT5 8 .. 15 */
	3, 0, 4, 5, 6, 7, 8, 9,
	/* SLIMT6 SLIMT7 SLIMR0 SLIMR1 SLIMR2 SLIMR3 SLIMR4 SLIMR5 16 .. 23 */
	10, 11, 0, 0, 0, 0, 0, 0,
	/* SLIMR6 SLIMR7 McASP1X ----- ----- McASP1R ----- ----- 24 .. 31 */
	0, 0, 14, 0, 0, 0, 0, 0,
	/* CBPrT0 CBPrT1 CBPrT2 CBPrT3 CBPrT4 CBPrT5 CBPrT6 CBPrT7 32 .. 39 */
	63, 63, 63, 63, 63, 63, 63, 63,
	/* CBP_T0 CBP_T1 CBP_T2 CBP_T3 CBP_T4 CBP_T5 CBP_T6 CBP_T7 40 .. 47 */
	0, 0, 0, 0, 0, 0, 0, 0,
	/* CBP_T8 CBP_T9 CBP_T10 CBP_T11 CBP_T12 CBP_T13 CBP_T14
	   CBP_T15 48 .. 63 */
	0, 0, 0, 0, 0, 0, 0, 0,
};
const u32 abe_atc_srcid[ABE_ATC_DESC_SIZE >> 3] = {
	/* DMA_0 DMIC PDM_DL PDM_UL McB1TX McB1RX McB2TX McB2RX 0 .. 7 */
	0, 12, 0, 13, 0, 1, 0, 2,
	/* McB3TX McB3RX SLIMT0 SLIMT1 SLIMT2 SLIMT3 SLIMT4 SLIMT5 8 .. 15 */
	0, 3, 0, 0, 0, 0, 0, 0,
	/* SLIMT6 SLIMT7 SLIMR0 SLIMR1 SLIMR2 SLIMR3 SLIMR4 SLIMR5 16 .. 23 */
	0, 0, 4, 5, 6, 7, 8, 9,
	/* SLIMR6 SLIMR7 McASP1X ----- ----- McASP1R ----- ----- 24 .. 31 */
	10, 11, 0, 0, 0, 14, 0, 0,
	/* CBPrT0 CBPrT1 CBPrT2 CBPrT3 CBPrT4 CBPrT5 CBPrT6 CBPrT7 32 .. 39 */
	63, 63, 63, 63, 63, 63, 63, 63,
	/* CBP_T0 CBP_T1 CBP_T2 CBP_T3 CBP_T4 CBP_T5 CBP_T6 CBP_T7 40 .. 47 */
	0, 0, 0, 0, 0, 0, 0, 0,
	/* CBP_T8 CBP_T9 CBP_T10 CBP_T11 CBP_T12 CBP_T13 CBP_T14
	   CBP_T15 48 .. 63 */
	0, 0, 0, 0, 0, 0, 0, 0,
};
/*
 * preset default routing configurations
 * This is given as implementation EXAMPLES
 * the programmer uses "abe_set_router_configuration" with its own tables
	*/
const abe_router_t abe_router_ul_table_preset[NBROUTE_CONFIG][NBROUTE_UL] = {
	/* VOICE UPLINK WITH PHOENIX MICROPHONES - UPROUTE_CONFIG_AMIC */
	{
	/* 0 .. 9 = MM_UL */
	 DMIC1_L_labelID, DMIC1_R_labelID, DMIC2_L_labelID, DMIC2_R_labelID,
	 MM_EXT_IN_L_labelID, MM_EXT_IN_R_labelID, AMIC_L_labelID,
	 AMIC_L_labelID,
	 ZERO_labelID, ZERO_labelID,
	/* 10 .. 11 = MM_UL2 */
	 AMIC_L_labelID, AMIC_L_labelID,
	/* 12 .. 13 = VX_UL */
	 AMIC_L_labelID, AMIC_R_labelID,
	/* 14 .. 15 = RESERVED */
	 ZERO_labelID, ZERO_labelID,
	 },
	/* VOICE UPLINK WITH THE FIRST DMIC PAIR - UPROUTE_CONFIG_DMIC1 */
	{
	/* 0 .. 9 = MM_UL */
	 DMIC2_L_labelID, DMIC2_R_labelID, DMIC3_L_labelID, DMIC3_R_labelID,
	 DMIC1_L_labelID, DMIC1_R_labelID, ZERO_labelID, ZERO_labelID,
	 ZERO_labelID, ZERO_labelID,
	/* 10 .. 11 = MM_UL2 */
	 DMIC1_L_labelID, DMIC1_R_labelID,
	/* 12 .. 13 = VX_UL */
	 DMIC1_L_labelID, DMIC1_R_labelID,
	/* 14 .. 15 = RESERVED */
	 ZERO_labelID, ZERO_labelID,
	 },
	/* VOICE UPLINK WITH THE SECOND DMIC PAIR - UPROUTE_CONFIG_DMIC2 */
	{
	/* 0 .. 9 = MM_UL */
	 DMIC3_L_labelID, DMIC3_R_labelID, DMIC1_L_labelID, DMIC1_R_labelID,
	 DMIC2_L_labelID, DMIC2_R_labelID, ZERO_labelID, ZERO_labelID,
	 ZERO_labelID, ZERO_labelID,
	/* 10 .. 11 = MM_UL2 */
	 DMIC2_L_labelID, DMIC2_R_labelID,
	/* 12 .. 13 = VX_UL */
	 DMIC2_L_labelID, DMIC2_R_labelID,
	/* 14 .. 15 = RESERVED */
	 ZERO_labelID, ZERO_labelID,
	 },
	/* VOICE UPLINK WITH THE LAST DMIC PAIR - UPROUTE_CONFIG_DMIC3 */
	{
	/* 0 .. 9 = MM_UL */
	 AMIC_L_labelID, AMIC_R_labelID, DMIC2_L_labelID, DMIC2_R_labelID,
	 DMIC3_L_labelID, DMIC3_R_labelID, ZERO_labelID, ZERO_labelID,
	 ZERO_labelID, ZERO_labelID,
	/* 10 .. 11 = MM_UL2 */
	 DMIC3_L_labelID, DMIC3_R_labelID,
	/* 12 .. 13 = VX_UL */
	 DMIC3_L_labelID, DMIC3_R_labelID,
	/* 14 .. 15 = RESERVED */
	 ZERO_labelID, ZERO_labelID,
	 },
	/* VOICE UPLINK WITH THE BT - UPROUTE_CONFIG_BT */
	{
	/* 0 .. 9 = MM_UL */
	 BT_UL_L_labelID, BT_UL_R_labelID, DMIC2_L_labelID, DMIC2_R_labelID,
	 DMIC3_L_labelID, DMIC3_R_labelID, DMIC1_L_labelID, DMIC1_R_labelID,
	 ZERO_labelID, ZERO_labelID,
	/* 10 .. 11 = MM_UL2 */
	 AMIC_L_labelID, AMIC_R_labelID,
	/* 12 .. 13 = VX_UL */
	 BT_UL_L_labelID, BT_UL_R_labelID,
	/* 14 .. 15 = RESERVED */
	 ZERO_labelID, ZERO_labelID,
	 },
	/* VOICE UPLINK WITH THE BT - UPROUTE_ECHO_MMUL2 */
	{
	/* 0 .. 9 = MM_UL */
	 MM_EXT_IN_L_labelID, MM_EXT_IN_R_labelID, BT_UL_L_labelID,
	 BT_UL_R_labelID, AMIC_L_labelID, AMIC_R_labelID,
	 ZERO_labelID, ZERO_labelID, ZERO_labelID, ZERO_labelID,
	/* 10 .. 11 = MM_UL2 */
	 EchoRef_L_labelID, EchoRef_R_labelID,
	/* 12 .. 13 = VX_UL */
	 AMIC_L_labelID, AMIC_L_labelID,
	/* 14 .. 15 = RESERVED */
	 ZERO_labelID, ZERO_labelID,
	 },
};
/* all default routing configurations */
abe_router_t abe_router_ul_table[NBROUTE_CONFIG_MAX][NBROUTE_UL];

const abe_sequence_t seq_null = {
	NOMASK, {CL_M1, 0, {0, 0, 0, 0}, 0}, {CL_M1, 0, {0, 0, 0, 0}, 0}
};
/* table of new subroutines called in the sequence */
abe_subroutine2 abe_all_subsubroutine[MAXNBSUBROUTINE];
/* number of parameters per calls */
u32 abe_all_subsubroutine_nparam[MAXNBSUBROUTINE];
/* index of the subroutine */
u32 abe_subroutine_id[MAXNBSUBROUTINE];
/* paramters of the subroutine (if any) */
u32 *abe_all_subroutine_params[MAXNBSUBROUTINE];
u32 abe_subroutine_write_pointer;
/* table of all sequences */
abe_sequence_t abe_all_sequence[MAXNBSEQUENCE];
u32 abe_sequence_write_pointer;
/* current number of pending sequences (avoids to look in the table) */
u32 abe_nb_pending_sequences;
/* pending sequences due to ressource collision */
u32 abe_pending_sequences[MAXNBSEQUENCE];
/* mask of unsharable ressources among other sequences */
u32 abe_global_sequence_mask;
/* table of active sequences */
abe_seq_t abe_active_sequence[MAXACTIVESEQUENCE][MAXSEQUENCESTEPS];
/* index of the plugged subroutine doing ping-pong cache-flush DMEM accesses */
u32 abe_irq_pingpong_player_id;
EXPORT_SYMBOL(abe_irq_pingpong_player_id);
/* index of the plugged subroutine doing acoustics protection adaptation */
u32 abe_irq_aps_adaptation_id;
/* base addresses of the ping pong buffers in bytes addresses */
u32 abe_base_address_pingpong[MAX_PINGPONG_BUFFERS];
/* size of each ping/pong buffers */
u32 abe_size_pingpong;
/* number of ping/pong buffer being used */
u32 abe_nb_pingpong;
/*
 * MAIN PORT SELECTION
 */
const u32 abe_port_priority[LAST_PORT_ID - 1] = {
	OMAP_ABE_PDM_DL_PORT,
	OMAP_ABE_PDM_UL_PORT,
	OMAP_ABE_MM_EXT_OUT_PORT,
	OMAP_ABE_MM_EXT_IN_PORT,
	OMAP_ABE_DMIC_PORT,
	OMAP_ABE_MM_UL_PORT,
	OMAP_ABE_MM_UL2_PORT,
	OMAP_ABE_MM_DL_PORT,
	OMAP_ABE_TONES_DL_PORT,
	OMAP_ABE_BT_VX_DL_PORT,
	OMAP_ABE_BT_VX_UL_PORT,
	OMAP_ABE_VX_UL_PORT,
	OMAP_ABE_VX_DL_PORT,
	OMAP_ABE_VIB_DL_PORT,
};