[processor-sdk/performance-audio-sr.git] / procsdk_audio_x_xx_xx_xx / test_dsp / application / itopo / evmk2g / io.c
2 /*
3 * Copyright (c) 2004 2014 Texas Instruments Incorporated
4 * All rights reserved not granted herein.
5 *
6 * Limited License.
7 *
8 * Texas Instruments Incorporated grants a world-wide, royalty-free,
9 * non-exclusive license under copyrights and patents it now or hereafter
10 * owns or controls to make, have made, use, import, offer to sell and
11 * sell ("Utilize") this software subject to the terms herein. With respect
12 * to the foregoing patent license, such license is granted solely to the
13 * extent that any such patent is necessary to Utilize the software alone.
14 * The patent license shall not apply to any combinations which include
15 * this software, other than combinations with devices manufactured
16 * by or for TI (窶弋I Devices窶�. No hardware patent is licensed hereunder.
17 *
18 * Redistributions must preserve existing copyright notices and reproduce
19 * this license (including the above copyright notice and the disclaimer
20 * and (if applicable) source code license limitations below) in the
21 * documentation and/or other materials provided with the distribution
22 *
23 * Redistribution and use in binary form, without modification, are permitted
24 * provided that the following conditions are met:
25 *
26 * No reverse engineering, decompilation, or disassembly of this software
27 * is permitted with respect to any software provided in binary form.
28 *
29 * any redistribution and use are licensed by TI for use only with TI Devices.
30 *
31 * Nothing shall obligate TI to provide you with source code for the software
32 * licensed and provided to you in object code.
33 *
34 * If software source code is provided to you, modification and redistribution
35 * of the source code are permitted provided that the following conditions are met:
36 *
37 * any redistribution and use of the source code, including any resulting
38 * derivative works, are licensed by TI for use only with TI Devices.
39 *
40 * any redistribution and use of any object code compiled from the source code
41 * and any resulting derivative works, are licensed by TI for use only
42 * with TI Devices.
43 *
44 * Neither the name of Texas Instruments Incorporated nor the names of its
45 * suppliers may be used to endorse or promote products derived from
46 * this software without specific prior written permission.
47 *
48 * DISCLAIMER.
49 *
50 * THIS SOFTWARE IS PROVIDED BY TI AND TI窶儡 LICENSORS "AS IS"
51 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
52 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
53 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL TI AND TI窶儡 LICENSORS
54 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
55 * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
56 * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
57 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
58 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
59 * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
60 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
61 */
63 //
64 // Input / output device configuration definitions
65 //
67 //#include <ti/procsdk_audio/procsdk_audio_typ.h>
68 #include <procsdk_audio_typ.h>
70 #include <acptype.h>
71 #include <acpbeta.h>
72 #include <pafstd_a.h>
73 #include <pafdec_a.h>
74 #include <pafenc_a.h>
75 #include <pafsio.h>
77 #include <alpha/pcm_a.h>
79 #include <inpbuf_a.h>
80 #include <outbuf_a.h>
82 #include <pa_i13_evmk2g_io_a.h> //<pa_i13_evmda830_io_a.h>
84 #ifndef SIMULATE_SIO
85 #include <sap_d10.h>
86 #else // SIMULATE_SIO
87 #include <dap_e17.h>
88 #endif // SIMULATE_SIO
90 #define rb32DECSourceDecode 0xc024,0x0b81
91 #define ob32DECSourceDecodeNone 0x0001,0x0000
93 #define rb32IBSioSelect 0xc022,0x0581
94 #define ob32IBSioSelect(X) (X)|0x0080,0x0000
96 #define ob32OBSioSelect(X) (X)|0x0080,0x0000
97 #define rb32DECSourceSelect_3 0xc024,0x09b1
98 #define wb32DECSourceSelect_3 0xc024,0x09f1
100 #define writePA3Await(RB32,WB32) 0xcd0b,5+2,0x0204,200,10,WB32,RB32
102 // -----------------------------------------------------------------------------
103 //
104 // Input device configurations & shortcut definitions
105 //
107 #ifndef SIMULATE_SIO
108 const struct
109 {
110 Int n;
111 const PAF_SIO_Params *x[DEVINP_N];
112 } patchs_devinp[1] =
113 {
114 DEVINP_N,
115 // These values reflect the definitions DEVINP_* in pa*io_a.h:
116 NULL, // InNone
117 (const PAF_SIO_Params *) &SAP_D10_RX_HDMI_STEREO // InHDMIStereo
118 /*NULL, //(const PAF_SIO_Params *) &DAP_E17_RX_DIR, // InDigital
119 NULL, //(const PAF_SIO_Params *) &DAP_E17_RX_ADC_48000HZ, // InAnalog
120 NULL, //(const PAF_SIO_Params *) &DAP_E17_RX_ADC_STEREO_48000HZ, // InAnalogStereo
121 NULL, //(const PAF_SIO_Params *) &DAP_E17_RX_1394_STEREO, // In1394Stereo
122 NULL, //(const PAF_SIO_Params *) &DAP_E17_RX_1394, // In1394
123 NULL, // InRingIO
124 NULL, //(const PAF_SIO_Params *) &DAP_E17_RX_HDMI, // InHDMI*/
126 };
128 #else // SIMULATE_SIO
129 const struct
130 {
131 Int n;
132 const PAF_SIO_Params *x[DEVINP_N];
133 } patchs_devinp[1] =
134 {
135 DEVINP_N,
136 // These values reflect the definitions DEVINP_* in pa*io_a.h:
137 NULL, // InNone
138 NULL, //(const PAF_SIO_Params *) &DAP_E17_RX_DIR, // InDigital
139 (const PAF_SIO_Params *) &DAP_E17_RX_ADC_48000HZ, // InAnalog
140 NULL, //(const PAF_SIO_Params *) &DAP_E17_RX_ADC_STEREO_48000HZ, // InAnalogStereo
141 NULL, //(const PAF_SIO_Params *) &DAP_E17_RX_1394_STEREO, // In1394Stereo
142 NULL, //(const PAF_SIO_Params *) &DAP_E17_RX_1394, // In1394
143 NULL, // InRingIO
144 NULL, //(const PAF_SIO_Params *) &DAP_E17_RX_HDMI, // InHDMI
145 NULL, //(const PAF_SIO_Params *) &DAP_E17_RX_HDMI_STEREO // InHDMIStereo
146 };
148 #endif // SIMULATE_SIO
150 // .............................................................................
151 // execPAIInNone
152 #define CUS_SIGMA32_S \
153 writeDECSourceSelectNone, \
154 writeIBSioSelectN(DEVINP_NULL), \
155 0xcdf0,execPAIInNone
157 #pragma DATA_SECTION(cus_sigma32_s0, ".none")
158 const ACP_Unit cus_sigma32_s0[] = {
159 0xc900 + 0 - 1,
160 CUS_SIGMA32_S,
161 };
163 const ACP_Unit cus_sigma32_s[] = {
164 0xc900 + sizeof (cus_sigma32_s0) / 2 - 1,
165 CUS_SIGMA32_S,
166 };
168 #ifndef SIMULATE_SIO
169 // execPAIInHDMIStereo
170 #define CUS_SIGMA33_S \
171 writeDECSourceSelectNone, \
172 writePA3Await(rb32DECSourceDecode,ob32DECSourceDecodeNone), \
173 writePCMChannelConfigurationProgramStereo, \
174 writePCMScaleVolumeN(0), \
175 writeDECASPGearControlNil, \
176 writeDECChannelMapFrom2(0,1), \
177 writeIBUnknownTimeoutN(8*1024), \
178 writeIBScanAtHighSampleRateModeEnable, \
179 writeIBEmphasisOverrideNo, \
180 writeIBPrecisionOverride24, \
181 writeIBSampleRateOverrideStandard, \
182 writeIBSioSelectN(DEVINP_HDMI_STEREO), \
183 wroteDECSourceProgramUnknown, \
184 writeDECSourceSelectAuto, \
185 0xcdf0,execPAIInHDMIStereo
186 //writeDECSourceSelectPCM
188 #pragma DATA_SECTION(cus_sigma33_s0, ".none")
189 const ACP_Unit cus_sigma33_s0[] = {
190 0xc900 + 0 - 1,
191 CUS_SIGMA33_S,
192 };
194 const ACP_Unit cus_sigma33_s[] = {
195 0xc900 + sizeof (cus_sigma33_s0) / 2 - 1,
196 CUS_SIGMA33_S,
197 };
199 #if 0
200 // execPAIInHDMIStereo
201 #define CUS_SIGMA33_S \
202 writeDECSourceSelectNone, \
203 writePA3Await(rb32DECSourceDecode,ob32DECSourceDecodeNone), \
204 writePCMChannelConfigurationProgramStereoUnknown, \
205 writePCMScaleVolumeN(0), \
206 writeDECASPGearControlNil, \
207 writeDECChannelMapFrom2(0,1), \
208 writeIBUnknownTimeoutN(8*1024), \
209 writeIBScanAtHighSampleRateModeEnable, \
210 writeIBEmphasisOverrideNo, \
211 writeIBPrecisionOverride24, \
212 writeIBSampleRateOverrideStandard, \
213 writeIBSioSelectN(DEVINP_HDMI_STEREO), \
214 wroteDECSourceProgramUnknown, \
215 writeDECSourceSelectAuto, \
216 0xcdf0,execPAIInHDMIStereo
218 #pragma DATA_SECTION(cus_sigma33_s0, ".none")
219 const ACP_Unit cus_sigma33_s0[] = {
220 0xc900 + 0 - 1,
221 CUS_SIGMA33_S,
222 };
224 const ACP_Unit cus_sigma33_s[] = {
225 0xc900 + sizeof (cus_sigma33_s0) / 2 - 1,
226 CUS_SIGMA33_S,
227 };
228 #endif
230 #else // SIMULATE_SIO
231 // execPAIInDigital
232 #define CUS_SIGMA33_S \
233 writeDECSourceSelectNone, \
234 writePA3Await(rb32DECSourceDecode,ob32DECSourceDecodeNone), \
235 writeIBUnknownTimeoutN(2*2048), \
236 writeIBScanAtHighSampleRateModeDisable, \
237 writePCMChannelConfigurationProgramStereoUnknown, \
238 writePCMScaleVolumeN(0), \
239 writeDECChannelMapFrom16(0,1,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3), \
240 writeIBEmphasisOverrideDisable, \
241 writeIBPrecisionDefaultOriginal, \
242 writeIBPrecisionOverrideDetect, \
243 writeIBSampleRateOverrideStandard, \
244 writeIBSioSelectN(DEVINP_DIR), \
245 wroteDECSourceProgramUnknown, \
246 writeDECSourceSelectAuto, \
247 0xcdf0,execPAIInDigital
249 #pragma DATA_SECTION(cus_sigma33_s0, ".none")
250 const ACP_Unit cus_sigma33_s0[] = {
251 0xc900 + 0 - 1,
252 CUS_SIGMA33_S,
253 };
255 const ACP_Unit cus_sigma33_s[] = {
256 0xc900 + sizeof (cus_sigma33_s0) / 2 - 1,
257 CUS_SIGMA33_S,
258 };
260 // execPAIInAnalog
261 #define CUS_SIGMA34_S \
262 writeDECSourceSelectNone, \
263 writePA3Await(rb32DECSourceDecode,ob32DECSourceDecodeNone), \
264 writePCMChannelConfigurationProgramSurround4_1, \
265 writePCMScaleVolumeN(2*6), \
266 writeDECChannelMapFrom16(0,4,1,5,2,6,3,7,-3,-3,-3,-3,-3,-3,-3,-3), \
267 writeIBEmphasisOverrideNo, \
268 writeIBPrecisionOverride24, \
269 writeIBSampleRateOverride48000Hz, \
270 writeIBSioSelectN(DEVINP_ADC1), \
271 writeDECSourceSelectPCM, \
272 0xcdf0,execPAIInAnalog
274 #pragma DATA_SECTION(cus_sigma34_s0, ".none")
275 const ACP_Unit cus_sigma34_s0[] = {
276 0xc900 + 0 - 1,
277 CUS_SIGMA34_S,
278 };
280 const ACP_Unit cus_sigma34_s[] = {
281 0xc900 + sizeof (cus_sigma34_s0) / 2 - 1,
282 CUS_SIGMA34_S,
283 };
285 // execPAIInAnalogStereo
286 #define CUS_SIGMA35_S \
287 writeDECSourceSelectNone, \
288 writePA3Await(rb32DECSourceDecode,ob32DECSourceDecodeNone), \
289 writePCMChannelConfigurationProgramStereoUnknown, \
290 writePCMScaleVolumeN(2*6), \
291 writeDECChannelMapFrom16(0,1,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3), \
292 writeIBEmphasisOverrideNo, \
293 writeIBPrecisionOverride24, \
294 writeIBSampleRateOverride48000Hz, \
295 writeIBSioSelectN(DEVINP_ADC_STEREO), \
296 writeDECSourceSelectPCM, \
297 0xcdf0,execPAIInAnalogStereo
299 #pragma DATA_SECTION(cus_sigma35_s0, ".none")
300 const ACP_Unit cus_sigma35_s0[] = {
301 0xc900 + 0 - 1,
302 CUS_SIGMA35_S,
303 };
305 const ACP_Unit cus_sigma35_s[] = {
306 0xc900 + sizeof (cus_sigma35_s0) / 2 - 1,
307 CUS_SIGMA35_S,
308 };
310 // execPAIInSing
311 #define CUS_SIGMA38_S \
312 writeDECSourceSelectNone, \
313 writePA3Await(rb32DECSourceDecode,ob32DECSourceDecodeNone), \
314 writeIBEmphasisOverrideNo, \
315 writeIBPrecisionOverride24, \
316 writeIBSampleRateOverride48000Hz, \
317 writeIBSioSelectN(DEVINP_ADC1), \
318 writeDECSourceSelectSing, \
319 0xcdf0,execPAIInSing
321 #pragma DATA_SECTION(cus_sigma38_s0, ".none")
322 const ACP_Unit cus_sigma38_s0[] = {
323 0xc900 + 0 - 1,
324 CUS_SIGMA38_S,
325 };
327 const ACP_Unit cus_sigma38_s[] = {
328 0xc900 + sizeof (cus_sigma38_s0) / 2 - 1,
329 CUS_SIGMA38_S,
330 };
332 // execPAIInHDMI
333 #define CUS_SIGMA40_S \
334 writeDECSourceSelectNone, \
335 writePA3Await(rb32DECSourceDecode,ob32DECSourceDecodeNone), \
336 writePCMChannelConfigurationProgramSurround4_1, \
337 writePCMScaleVolumeN(0), \
338 writeDECChannelMapFrom16(0,4,1,5,2,6,3,7,-3,-3,-3,-3,-3,-3,-3,-3), \
339 writeIBUnknownTimeoutN(15*1024), \
340 writeIBScanAtHighSampleRateModeEnable, \
341 writeIBEmphasisOverrideNo, \
342 writeIBPrecisionOverride24, \
343 writeIBSampleRateOverrideStandard, \
344 writeIBSioSelectN(DEVINP_HDMI), \
345 wroteDECSourceProgramUnknown, \
346 writeDECSourceSelectAuto, \
347 0xcdf0,execPAIInHDMI
349 #pragma DATA_SECTION(cus_sigma40_s0, ".none")
350 const ACP_Unit cus_sigma40_s0[] = {
351 0xc900 + 0 - 1,
352 CUS_SIGMA40_S,
353 };
355 const ACP_Unit cus_sigma40_s[] = {
356 0xc900 + sizeof (cus_sigma40_s0) / 2 - 1,
357 CUS_SIGMA40_S,
358 };
360 // .............................................................................
361 // execPAIIn1394Stereo
362 #define CUS_SIGMA45_S \
363 writeDECSourceSelectNone, \
364 writePA3Await(rb32DECSourceDecode,ob32DECSourceDecodeNone), \
365 writePCMChannelConfigurationProgramStereoUnknown, \
366 writePCMScaleVolumeN(0), \
367 writeDECChannelMapFrom2(0,1), \
368 writeIBUnknownTimeoutN(8*1024), \
369 writeIBScanAtHighSampleRateModeEnable, \
370 writeIBEmphasisOverrideNo, \
371 writeIBPrecisionOverride24, \
372 writeIBSampleRateOverrideStandard, \
373 writeIBSioSelectN(DEVINP_1394_STEREO), \
374 wroteDECSourceProgramUnknown, \
375 writeDECSourceSelectAuto, \
376 0xcdf0,execPAIIn1394Stereo
378 #pragma DATA_SECTION(cus_sigma45_s0, ".none")
379 const ACP_Unit cus_sigma45_s0[] = {
380 0xc900 + 0 - 1,
381 CUS_SIGMA45_S,
382 };
384 const ACP_Unit cus_sigma45_s[] = {
385 0xc900 + sizeof (cus_sigma45_s0) / 2 - 1,
386 CUS_SIGMA45_S,
387 };
390 // execPAIIn1394
391 #define CUS_SIGMA46_S \
392 writeDECSourceSelectNone, \
393 writePA3Await(rb32DECSourceDecode,ob32DECSourceDecodeNone), \
394 writePCMChannelConfigurationProgramSurround4_1, \
395 writePCMScaleVolumeN(0), \
396 writeDECChannelMapFrom16(0,4,1,5,2,6,3,7,-3,-3,-3,-3,-3,-3,-3,-3), \
397 writeIBUnknownTimeoutN(15*1024), \
398 writeIBScanAtHighSampleRateModeEnable, \
399 writeIBEmphasisOverrideNo, \
400 writeIBPrecisionOverride24, \
401 writeIBSampleRateOverrideStandard, \
402 writeIBSioSelectN(DEVINP_1394), \
403 wroteDECSourceProgramUnknown, \
404 writeDECSourceSelectAuto, \
405 0xcdf0,execPAIIn1394
407 #pragma DATA_SECTION(cus_sigma46_s0, ".none")
408 const ACP_Unit cus_sigma46_s0[] = {
409 0xc900 + 0 - 1,
410 CUS_SIGMA46_S,
411 };
413 const ACP_Unit cus_sigma46_s[] = {
414 0xc900 + sizeof (cus_sigma46_s0) / 2 - 1,
415 CUS_SIGMA46_S,
416 };
418 #endif // SIMULATE_SIO
421 // -----------------------------------------------------------------------------
422 //
423 // Output device configurations & shortcut definitions
424 //
426 #ifndef SIMULATE_SIO
427 const struct
428 {
429 Int n;
430 const PAF_SIO_Params *x[DEVOUT_N];
431 } patchs_devout[1] =
432 {
433 DEVOUT_N,
434 // These values reflect the definitions DEVOUT_* in pa*io_a.h:
435 NULL, // OutNone
436 (const PAF_SIO_Params *) &SAP_D10_TX_DAC, // OutAnalog
437 #ifdef TEST_MULTICHANNEL
438 NULL, //(const PAF_SIO_Params *) &DAP_E17_TX_DIT, // OutDigital
439 #else
440 (const PAF_SIO_Params *) &SAP_D10_TX_STEREO_DAC, // OutAnalog
441 #endif
442 NULL, //(const PAF_SIO_Params *) &DAP_E17_TX_DAC_SLAVE, // OutAnalogSlave
443 NULL, //(const PAF_SIO_Params *) &DAP_E17_TX_STEREO_DAC_SLAVE, // OutAnalogSlaveStereo
444 NULL, //(const PAF_SIO_Params *) &DAP_E17_TX_2STEREO_DAC_SLAVE, // OutAnalogSlave2Stereo
445 NULL, // OutRingIO
446 NULL, // OutRingIO
447 NULL, // OutRingIO
448 NULL, //(const PAF_SIO_Params *) &DAP_E17_TX_4TDM, // OutTdm4
449 NULL, //(const PAF_SIO_Params *) &DAP_E17_TX_8TDM, // OutTdm8
450 };
452 #else // SIMULATE_SIO
454 const struct
455 {
456 Int n;
457 const PAF_SIO_Params *x[DEVOUT_N];
458 } patchs_devout[1] =
459 {
460 DEVOUT_N,
461 // These values reflect the definitions DEVOUT_* in pa*io_a.h:
462 NULL, // OutNone
463 (const PAF_SIO_Params *) &DAP_E17_TX_DAC, // OutAnalog
464 NULL, //(const PAF_SIO_Params *) &DAP_E17_TX_DIT, // OutDigital
465 NULL, //(const PAF_SIO_Params *) &DAP_E17_TX_DAC_SLAVE, // OutAnalogSlave
466 NULL, //(const PAF_SIO_Params *) &DAP_E17_TX_STEREO_DAC_SLAVE, // OutAnalogSlaveStereo
467 NULL, //(const PAF_SIO_Params *) &DAP_E17_TX_2STEREO_DAC_SLAVE, // OutAnalogSlave2Stereo
468 NULL, // OutRingIO
469 NULL, // OutRingIO
470 NULL, // OutRingIO
471 NULL, //(const PAF_SIO_Params *) &DAP_E17_TX_4TDM, // OutTdm4
472 NULL, //(const PAF_SIO_Params *) &DAP_E17_TX_8TDM, // OutTdm8
473 };
475 #endif // SIMULATE_SIO
477 // .............................................................................
478 #if 0 // (***) FL: remove change in Dec sourceSelect since this will cause break in TaskAsip
479 // execPAIOutNone
480 #define CUS_SIGMA48_S \
481 rb32DECSourceSelect_3, \
482 writeDECSourceSelectNone, \
483 writePA3Await(rb32DECSourceDecode,ob32DECSourceDecodeNone), \
484 writeOBSioSelectN(DEVOUT_NULL), \
485 wb32DECSourceSelect_3, \
486 0xcdf0,execPAIOutNone
487 #endif
488 // execPAIOutNone
489 #define CUS_SIGMA48_S \
490 writeOBSioSelectN(DEVOUT_NULL), \
491 writePA3Await(rb32OBSioSelect,ob32OBSioSelect(DEVOUT_NULL)), \
492 0xcdf0,execPAIOutNone
494 #pragma DATA_SECTION(cus_sigma48_s0, ".none")
495 const ACP_Unit cus_sigma48_s0[] = {
496 0xc900 + 0 - 1,
497 CUS_SIGMA48_S,
498 };
500 const ACP_Unit cus_sigma48_s[] = {
501 0xc900 + sizeof (cus_sigma48_s0) / 2 - 1,
502 CUS_SIGMA48_S,
503 };
505 #ifndef SIMULATE_SIO
506 // .............................................................................
507 // execPAIOutAnalog
508 #ifdef TEST_MULTICHANNEL
509 #define CUS_SIGMA49_S \
510 rb32DECSourceSelect_3, \
511 writeDECSourceSelectNone, \
512 writePA3Await(rb32DECSourceDecode,ob32DECSourceDecodeNone), \
513 writeOBSioSelectN(1), \
514 writeENCChannelMapTo16(0,4,1,5,2,6,3,7,-3,-3,-3,-3,-3,-3,-3,-3), \
515 wb32DECSourceSelect_3, \
516 0xcdf0,execPAIOutAnalog
517 #else
518 #define CUS_SIGMA49_S \
519 rb32DECSourceSelect_3, \
520 writeDECSourceSelectNone, \
521 writePA3Await(rb32DECSourceDecode,ob32DECSourceDecodeNone), \
522 writeOBSioSelectN(2), \
523 writeENCChannelMapTo16(0,1,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3), \
524 wb32DECSourceSelect_3, \
525 0xcdf0,execPAIOutAnalog
526 #endif
528 #else // SIMULATE_SIO
529 #if 0 // (***) FL: remove change in Dec sourceSelect since this will cause break in TaskAsip
530 #define CUS_SIGMA49_S \
531 rb32DECSourceSelect_3, \
532 writeDECSourceSelectNone, \
533 writePA3Await(rb32DECSourceDecode,ob32DECSourceDecodeNone), \
534 writeOBSioSelectN(1), \
535 writeENCChannelMapTo16(3,7,2,6,1,5,0,4,-3,-3,-3,-3,-3,-3,-3,-3), \
536 wb32DECSourceSelect_3, \
537 0xcdf0,execPAIOutAnalog
538 #endif
539 #define CUS_SIGMA49_S \
540 writeOBSioSelectN(1), \
541 writePA3Await(rb32OBSioSelect,ob32OBSioSelect(1)), \
542 writeENCChannelMapTo16(3,7,2,6,1,5,0,4,-3,-3,-3,-3,-3,-3,-3,-3), \
543 0xcdf0,execPAIOutAnalog
545 #endif // SIMULATE_SIO
547 #pragma DATA_SECTION(cus_sigma49_s0, ".none")
548 const ACP_Unit cus_sigma49_s0[] = {
549 0xc900 + 0 - 1,
550 CUS_SIGMA49_S,
551 };
553 const ACP_Unit cus_sigma49_s[] = {
554 0xc900 + sizeof (cus_sigma49_s0) / 2 - 1,
555 CUS_SIGMA49_S,
556 };
558 // -----------------------------------------------------------------------------
559 //execPAIOutRingIO16bit
561 #define CUS_SIGMA57_S \
562 rb32DECSourceSelect_3, \
563 writeDECSourceSelectNone, \
564 writePA3Await(rb32DECSourceDecode,ob32DECSourceDecodeNone), \
565 writeOBSioSelectN(DEVOUT_RRIO_16bit), \
566 writeENCChannelMapTo16(0,1,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3), \
567 wb32DECSourceSelect_3, \
568 0xcdf0,execPAIOutRingIO16bit
570 #pragma DATA_SECTION(cus_sigma57_s0, ".none")
571 const ACP_Unit cus_sigma57_s0[] = {
572 0xc900 + 0 - 1,
573 CUS_SIGMA57_S,
574 };
576 const ACP_Unit cus_sigma57_s[] = {
577 0xc900 + sizeof (cus_sigma57_s0) / 2 - 1,
578 CUS_SIGMA57_S,
579 };
580 // execPAIOutDigital
581 #define CUS_SIGMA50_S \
582 rb32DECSourceSelect_3, \
583 writeDECSourceSelectNone, \
584 writePA3Await(rb32DECSourceDecode,ob32DECSourceDecodeNone), \
585 writeOBSioSelectN(DEVOUT_DIT), \
586 writeENCChannelMapTo16(0,1,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3), \
587 wb32DECSourceSelect_3, \
588 0xcdf0,execPAIOutDigital
590 #pragma DATA_SECTION(cus_sigma50_s0, ".none")
591 const ACP_Unit cus_sigma50_s0[] = {
592 0xc900 + 0 - 1,
593 CUS_SIGMA50_S,
594 };
596 const ACP_Unit cus_sigma50_s[] = {
597 0xc900 + sizeof (cus_sigma50_s0) / 2 - 1,
598 CUS_SIGMA50_S,
599 };
601 // .............................................................................
602 // execPAIOutAnalogSlave
603 #define CUS_SIGMA56_S \
604 rb32DECSourceSelect_3, \
605 writeDECSourceSelectNone, \
606 writePA3Await(rb32DECSourceDecode,ob32DECSourceDecodeNone), \
607 writeOBSioSelectN(DEVOUT_DAC_SLAVE), \
608 writeENCChannelMapTo16(3,7,2,6,1,5,0,4,-3,-3,-3,-3,-3,-3,-3,-3), \
609 wb32DECSourceSelect_3, \
610 0xcdf0,execPAIOutAnalogSlave
612 #pragma DATA_SECTION(cus_sigma56_s0, ".none")
613 const ACP_Unit cus_sigma56_s0[] = {
614 0xc900 + 0 - 1,
615 CUS_SIGMA56_S,
616 };
618 const ACP_Unit cus_sigma56_s[] = {
619 0xc900 + sizeof (cus_sigma56_s0) / 2 - 1,
620 CUS_SIGMA56_S,
621 };
623 // execPAIOutAnalogSlaveStereo
624 #define CUS_SIGMA58_S \
625 rb32DECSourceSelect_3, \
626 writeDECSourceSelectNone, \
627 writePA3Await(rb32DECSourceDecode,ob32DECSourceDecodeNone), \
628 writeOBSioSelectN(DEVOUT_DAC_STEREO), \
629 writeENCChannelMapTo16(0,1,2,3,4,5,6,7,-3,-3,-3,-3,-3,-3,-3,-3), \
630 wb32DECSourceSelect_3, \
631 0xcdf0,execPAIOutAnalogSlaveStereo
633 #pragma DATA_SECTION(cus_sigma58_s0, ".none")
634 const ACP_Unit cus_sigma58_s0[] = {
635 0xc900 + 0 - 1,
636 CUS_SIGMA58_S,
637 };
639 const ACP_Unit cus_sigma58_s[] = {
640 0xc900 + sizeof (cus_sigma58_s0) / 2 - 1,
641 CUS_SIGMA58_S,
642 };
644 // execPAIOutAnalogSlave2Stereo
645 #define CUS_SIGMA59_S \
646 rb32DECSourceSelect_3, \
647 writeDECSourceSelectNone, \
648 writePA3Await(rb32DECSourceDecode,ob32DECSourceDecodeNone), \
649 writeOBSioSelectN(DEVOUT_DAC_2STEREO), \
650 writeENCChannelMapTo16(1,3,0,2,5,7,4,6,-3,-3,-3,-3,-3,-3,-3,-3), \
651 wb32DECSourceSelect_3, \
652 0xcdf0,execPAIOutAnalogSlave2Stereo
654 #pragma DATA_SECTION(cus_sigma59_s0, ".none")
655 const ACP_Unit cus_sigma59_s0[] = {
656 0xc900 + 0 - 1,
657 CUS_SIGMA59_S,
658 };
660 const ACP_Unit cus_sigma59_s[] = {
661 0xc900 + sizeof (cus_sigma59_s0) / 2 - 1,
662 CUS_SIGMA59_S,
663 };
665 // .............................................................................
666 // execPAIOutTdm4
667 #define CUS_SIGMA60_S \
668 rb32DECSourceSelect_3, \
669 writeDECSourceSelectNone, \
670 writePA3Await(rb32DECSourceDecode,ob32DECSourceDecodeNone), \
671 writeOBSioSelectN(DEVOUT_4TDM), \
672 writeENCChannelMapTo16(0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15), \
673 wb32DECSourceSelect_3, \
674 0xcdf0,execPAIOutTdm4
676 #pragma DATA_SECTION(cus_sigma60_s0, ".none")
677 const ACP_Unit cus_sigma60_s0[] = {
678 0xc900 + 0 - 1,
679 CUS_SIGMA60_S,
680 };
682 const ACP_Unit cus_sigma60_s[] = {
683 0xc900 + sizeof(cus_sigma60_s0)/2 - 1,
684 CUS_SIGMA60_S,
685 };
686 // -----------------------------------------------------------------------------
687 // .............................................................................
688 // execPAIOutTdm8
689 #define CUS_SIGMA61_S \
690 rb32DECSourceSelect_3, \
691 writeDECSourceSelectNone, \
692 writePA3Await(rb32DECSourceDecode,ob32DECSourceDecodeNone), \
693 writeOBSioSelectN(DEVOUT_8TDM), \
694 writeENCChannelMapTo32(0,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), \
695 wb32DECSourceSelect_3, \
696 0xcdf0,execPAIOutTdm8
698 #pragma DATA_SECTION(cus_sigma61_s0, ".none")
699 const ACP_Unit cus_sigma61_s0[] = {
700 0xc900 + 0 - 1,
701 CUS_SIGMA61_S,
702 };
704 const ACP_Unit cus_sigma61_s[] = {
705 0xc900 + sizeof(cus_sigma61_s0)/2 - 1,
706 CUS_SIGMA61_S,
707 };
708 // -----------------------------------------------------------------------------
712 // -----------------------------------------------------------------------------
713 //execPAIOutRingIO24bit
715 #define CUS_SIGMA63_S \
716 rb32DECSourceSelect_3, \
717 writeDECSourceSelectNone, \
718 writePA3Await(rb32DECSourceDecode,ob32DECSourceDecodeNone), \
719 writeOBSioSelectN(DEVOUT_RRIO_24bit), \
720 writeENCChannelMapTo16(0,1,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3), \
721 wb32DECSourceSelect_3, \
722 0xcdf0,execPAIOutRingIO24bit
724 #pragma DATA_SECTION(cus_sigma63_s0, ".none")
725 const ACP_Unit cus_sigma63_s0[] = {
726 0xc900 + 0 - 1,
727 CUS_SIGMA63_S,
728 };
730 const ACP_Unit cus_sigma63_s[] = {
731 0xc900 + sizeof (cus_sigma63_s0) / 2 - 1,
732 CUS_SIGMA63_S,
733 };
734 // EOF