Pyalpha tools for performance audio demo in PRSDK.
[processor-sdk/performance-audio-tools.git] / alpha / outbuf_a.h
2 /*
3 * Copyright (C) 2004-2014 Texas Instruments Incorporated - http://www.ti.com/
4 * All rights reserved.  
5 *
6 *  Redistribution and use in source and binary forms, with or without
7 *  modification, are permitted provided that the following conditions
8 *  are met:
9 *
10 *    Redistributions of source code must retain the above copyright
11 *    notice, this list of conditions and the following disclaimer.
12 *
13 *    Redistributions in binary form must reproduce the above copyright
14 *    notice, this list of conditions and the following disclaimer in the
15 *    documentation and/or other materials provided with the
16 *    distribution.
17 *
18 *    Neither the name of Texas Instruments Incorporated nor the names of
19 *    its contributors may be used to endorse or promote products derived
20 *    from this software without specific prior written permission.
21 *
22 *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
23 *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
24 *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
25 *  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
26 *  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
27 *  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
28 *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
29 *  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
30 *  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31 *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
32 *  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 *
34 */
36 //
37 //
38 // Output Buffer alpha codes
39 //
40 //
41 //
43 #ifndef _OUTBUF_A
44 #define _OUTBUF_A
46 #include <paftyp_a.h>
47 #include <acpbeta.h>
49 #define  readOBMode       0xc200+STD_BETA_OB,0x0400
50 #define writeOBModeEnable 0xca00+STD_BETA_OB,0x0401
51 #define writeOBModeIEC    0xca00+STD_BETA_OB,0x0402
53 #define  readOBSioSelect 0xc200+STD_BETA_OB, 0x0500
54 #define  rb32OBSioSelect 0xc000+STD_BETA_OB, 0x0581
55 #define writeOBSioSelectN(NN) 0xca00+STD_BETA_OB,(0x0500+(NN))
57 #define  readOBSampleRate 0xc200+STD_BETA_OB,0x0600
58 #define wroteOBSampleRateUnknown 0xca00+STD_BETA_OB,0x0600+PAF_SAMPLERATE_UNKNOWN
59 #define wroteOBSampleRateNone 0xca00+STD_BETA_OB,0x0600+PAF_SAMPLERATE_NONE
60 #define wroteOBSampleRate8000Hz 0xca00+STD_BETA_OB,0x0600+PAF_SAMPLERATE_8000HZ
61 #define wroteOBSampleRate11025Hz 0xca00+STD_BETA_OB,0x0600+PAF_SAMPLERATE_11025HZ
62 #define wroteOBSampleRate12000Hz 0xca00+STD_BETA_OB,0x0600+PAF_SAMPLERATE_12000HZ
63 #define wroteOBSampleRate16000Hz 0xca00+STD_BETA_OB,0x0600+PAF_SAMPLERATE_16000HZ
64 #define wroteOBSampleRate22050Hz 0xca00+STD_BETA_OB,0x0600+PAF_SAMPLERATE_22050HZ
65 #define wroteOBSampleRate24000Hz 0xca00+STD_BETA_OB,0x0600+PAF_SAMPLERATE_24000HZ
66 #define wroteOBSampleRate32000Hz 0xca00+STD_BETA_OB,0x0600+PAF_SAMPLERATE_32000HZ
67 #define wroteOBSampleRate44100Hz 0xca00+STD_BETA_OB,0x0600+PAF_SAMPLERATE_44100HZ
68 #define wroteOBSampleRate48000Hz 0xca00+STD_BETA_OB,0x0600+PAF_SAMPLERATE_48000HZ
69 #define wroteOBSampleRate64000Hz 0xca00+STD_BETA_OB,0x0600+PAF_SAMPLERATE_64000HZ
70 #define wroteOBSampleRate88200Hz 0xca00+STD_BETA_OB,0x0600+PAF_SAMPLERATE_88200HZ
71 #define wroteOBSampleRate96000Hz 0xca00+STD_BETA_OB,0x0600+PAF_SAMPLERATE_96000HZ
72 #define wroteOBSampleRate128000Hz 0xca00+STD_BETA_OB,0x0600+PAF_SAMPLERATE_128000HZ
73 #define wroteOBSampleRate176400Hz 0xca00+STD_BETA_OB,0x0600+PAF_SAMPLERATE_176400HZ
74 #define wroteOBSampleRate192000Hz 0xca00+STD_BETA_OB,0x0600+PAF_SAMPLERATE_192000HZ
76 #define  readOBAudio 0xc200+STD_BETA_OB,0x0700
77 #define wroteOBAudioQuiet 0xca00+STD_BETA_OB,0x0700
78 #define wroteOBAudioSound 0xca00+STD_BETA_OB,0x0701
79 #define wroteOBAudioFlush 0xca00+STD_BETA_OB,0x0702
80 #define wroteOBAudioQuietMuted 0xca00+STD_BETA_OB,0x0710
81 #define wroteOBAudioSoundMuted 0xca00+STD_BETA_OB,0x0711
82 #define wroteOBAudioFlushMuted 0xca00+STD_BETA_OB,0x0712
84 #define  readOBClock 0xc200+STD_BETA_OB,0x0800
85 #define writeOBClockExternal 0xca00+STD_BETA_OB,0x0800
86 #define writeOBClockInternal 0xca00+STD_BETA_OB,0x0801
88 #define  readOBFlush 0xc200+STD_BETA_OB,0x0900
89 #define writeOBFlushDisable 0xca00+STD_BETA_OB,0x0900
90 #define writeOBFlushEnable 0xca00+STD_BETA_OB,0x0901
92 #define   readOBRateTrackMode          0xc200+STD_BETA_OB,0x0A00
93 #define  writeOBRateTrackDisable       0xca00+STD_BETA_OB,0x0A00
94 #define  writeOBRateTrackEnable        0xca00+STD_BETA_OB,0x0A01
96 #define   readOBMarkerInsertionMode        0xc200+STD_BETA_OB,0x0B00
97 #define  writeOBMarkerInsertionModeDisable 0xca00+STD_BETA_OB,0x0B00
98 #define  writeOBMarkerInsertionModeEnable  0xca00+STD_BETA_OB,0x0B01
100 #define   readOBMaxNumBufOverride         0xc200+STD_BETA_OB,0x0C00
101 #define writeOBMaxNumBufOverrideN(NN)     0xca00+STD_BETA_OB,(0x0C00 + (NN))
102 #define writeOBMaxNumBufOverrideNone      0xca00+STD_BETA_OB,0x0C00
104 #define  readOBUnknownNumBufOverride       0xc200+STD_BETA_OB,0x0D00
105 #define writeOBUnknownNumBufOverrideN(NN)  0xca00+STD_BETA_OB,(0x0D00 + (NN))
106 #define writeOBUnknownNumBufOverrideNone   0xca00+STD_BETA_OB,0x0D00
108 #define  readOBNoneNumBufOverride       0xc200+STD_BETA_OB,0x0E00
109 #define writeOBNoneNumBufOverrideN(NN)  0xca00+STD_BETA_OB,(0x0E00 + (NN))
110 #define writeOBNoneNumBufOverrideNone   0xca00+STD_BETA_OB,0x0E00
112 #define  readOBPassNumBufOverride       0xc200+STD_BETA_OB,0x0F00
113 #define writeOBPassNumBufOverrideN(NN)  0xca00+STD_BETA_OB,(0x0F00 + (NN))
114 #define writeOBPassNumBufOverrideNone   0xca00+STD_BETA_OB,0x0F00
116 #define  readOBSngNumBufOverride       0xc200+STD_BETA_OB,0x1000
117 #define writeOBSngNumBufOverrideN(NN)  0xca00+STD_BETA_OB,(0x1000 + (NN))
118 #define writeOBSngNumBufOverrideNone   0xca00+STD_BETA_OB,0x1000
120 #define  readOBAutoNumBufOverride       0xc200+STD_BETA_OB,0x1100
121 #define writeOBAutoNumBufOverrideN(NN)  0xca00+STD_BETA_OB,(0x1100 + (NN))
122 #define writeOBAutoNumBufOverrideNone   0xca00+STD_BETA_OB,0x1100
124 #define  readOBBitstreamNumBufOverride       0xc200+STD_BETA_OB,0x1200
125 #define writeOBBitstreamNumBufOverrideN(NN)  0xca00+STD_BETA_OB,(0x1200 + (NN))
126 #define writeOBBitstreamNumBufOverrideNone   0xca00+STD_BETA_OB,0x1200
128 #define  readOBDtsallNumBufOverride       0xc200+STD_BETA_OB,0x1300
129 #define writeOBDtsallNumBufOverrideN(NN)  0xca00+STD_BETA_OB,(0x1300 + (NN))
130 #define writeOBDtsallNumBufOverrideNone   0xca00+STD_BETA_OB,0x1300
132 #define  readOBPcmautoNumBufOverride       0xc200+STD_BETA_OB,0x1400
133 #define writeOBPcmautoNumBufOverrideN(NN)  0xca00+STD_BETA_OB,(0x1400 + (NN))
134 #define writeOBPcmautoNumBufOverrideNone   0xca00+STD_BETA_OB,0x1400
136 #define  readOBPcmNumBufOverride       0xc200+STD_BETA_OB,0x1500
137 #define writeOBPcmNumBufOverrideN(NN)  0xca00+STD_BETA_OB,(0x1500 + (NN))
138 #define writeOBPcmNumBufOverrideNone   0xca00+STD_BETA_OB,0x1500
140 #define  readOBPc8NumBufOverride       0xc200+STD_BETA_OB,0x1600
141 #define writeOBPc8NumBufOverrideN(NN)  0xca00+STD_BETA_OB,(0x1600 + (NN))
142 #define writeOBPc8NumBufOverrideNone   0xca00+STD_BETA_OB,0x1600
144 #define  readOBAc3NumBufOverride       0xc200+STD_BETA_OB,0x1700
145 #define writeOBAc3NumBufOverrideN(NN)  0xca00+STD_BETA_OB,(0x1700 + (NN))
146 #define writeOBAc3NumBufOverrideNone   0xca00+STD_BETA_OB,0x1700
148 #define  readOBDtsNumBufOverride       0xc200+STD_BETA_OB,0x1800
149 #define writeOBDtsNumBufOverrideN(NN)  0xca00+STD_BETA_OB,(0x1800 + (NN))
150 #define writeOBDtsNumBufOverrideNone   0xca00+STD_BETA_OB,0x1800
152 #define  readOBAacNumBufOverride       0xc200+STD_BETA_OB,0x1900
153 #define writeOBAacNumBufOverrideN(NN)  0xca00+STD_BETA_OB,(0x1900 + (NN))
154 #define writeOBAacNumBufOverrideNone   0xca00+STD_BETA_OB,0x1900
156 #define  readOBMpegNumBufOverride       0xc200+STD_BETA_OB,0x1A00
157 #define writeOBMpegNumBufOverrideN(NN)  0xca00+STD_BETA_OB,(0x1A00 + (NN))
158 #define writeOBMpegNumBufOverrideNone   0xca00+STD_BETA_OB,0x1A00
160 #define  readOBDts12NumBufOverride       0xc200+STD_BETA_OB,0x1B00
161 #define writeOBDts12NumBufOverrideN(NN)  0xca00+STD_BETA_OB,(0x1B00 + (NN))
162 #define writeOBDts12NumBufOverrideNone   0xca00+STD_BETA_OB,0x1B00
164 #define  readOBDts13NumBufOverride       0xc200+STD_BETA_OB,0x1C00
165 #define writeOBDts13NumBufOverrideN(NN)  0xca00+STD_BETA_OB,(0x1C00 + (NN))
166 #define writeOBDts13NumBufOverrideNone   0xca00+STD_BETA_OB,0x1C00
168 #define  readOBDts14NumBufOverride       0xc200+STD_BETA_OB,0x1D00
169 #define writeOBDts14NumBufOverrideN(NN)  0xca00+STD_BETA_OB,(0x1D00 + (NN))
170 #define writeOBDts14NumBufOverrideNone   0xca00+STD_BETA_OB,0x1D00
172 #define  readOBDts16NumBufOverride       0xc200+STD_BETA_OB,0x1E00
173 #define writeOBDts16NumBufOverrideN(NN)  0xca00+STD_BETA_OB,(0x1E00 + (NN))
174 #define writeOBDts16NumBufOverrideNone   0xca00+STD_BETA_OB,0x1E00
176 #define  readOBWma9proNumBufOverride       0xc200+STD_BETA_OB,0x1F00
177 #define writeOBWma9proNumBufOverrideN(NN)  0xca00+STD_BETA_OB,(0x1F00 + (NN))
178 #define writeOBWma9proNumBufOverrideNone   0xca00+STD_BETA_OB,0x1F00
180 #define  readOBMp3NumBufOverride       0xc200+STD_BETA_OB,0x2000
181 #define writeOBMp3NumBufOverrideN(NN)  0xca00+STD_BETA_OB,(0x2000 + (NN))
182 #define writeOBMp3NumBufOverrideNone   0xca00+STD_BETA_OB,0x2000
184 #define  readOBDsd1NumBufOverride       0xc200+STD_BETA_OB,0x2100
185 #define writeOBDsd1NumBufOverrideN(NN)  0xca00+STD_BETA_OB,(0x2100 + (NN))
186 #define writeOBDsd1NumBufOverrideNone   0xca00+STD_BETA_OB,0x2100
188 #define  readOBDsd2NumBufOverride       0xc200+STD_BETA_OB,0x2200
189 #define writeOBDsd2NumBufOverrideN(NN)  0xca00+STD_BETA_OB,(0x2200 + (NN))
190 #define writeOBDsd2NumBufOverrideNone   0xca00+STD_BETA_OB,0x2200
192 #define  readOBDsd3NumBufOverride       0xc200+STD_BETA_OB,0x2300
193 #define writeOBDsd3NumBufOverrideN(NN)  0xca00+STD_BETA_OB,(0x2300 + (NN))
194 #define writeOBDsd3NumBufOverrideNone   0xca00+STD_BETA_OB,0x2300
196 #define  readOBDdpNumBufOverride       0xc200+STD_BETA_OB,0x2400
197 #define writeOBDdpNumBufOverrideN(NN)  0xca00+STD_BETA_OB,(0x2400 + (NN))
198 #define writeOBDdpNumBufOverrideNone   0xca00+STD_BETA_OB,0x2400
200 #define  readOBDtshdNumBufOverride       0xc200+STD_BETA_OB,0x2500
201 #define writeOBDtshdNumBufOverrideN(NN)  0xca00+STD_BETA_OB,(0x2500 + (NN))
202 #define writeOBDtshdNumBufOverrideNone   0xca00+STD_BETA_OB,0x2500
204 #define  readOBThdNumBufOverride       0xc200+STD_BETA_OB,0x2600
205 #define writeOBThdNumBufOverrideN(NN)  0xca00+STD_BETA_OB,(0x2600 + (NN))
206 #define writeOBThdNumBufOverrideNone   0xca00+STD_BETA_OB,0x2600
208 #define  readOBDxpNumBufOverride       0xc200+STD_BETA_OB,0x2700
209 #define writeOBDxpNumBufOverrideN(NN)  0xca00+STD_BETA_OB,(0x2700 + (NN))
210 #define writeOBDxpNumBufOverrideNone   0xca00+STD_BETA_OB,0x2700
212 #define  readOBStatus 0xc508,STD_BETA_OB
213 #define  readOBControl \
214          readOBMode, \
215          readOBSioSelect, \
216          readOBClock, \
217          readOBFlush
219 #ifdef HSE
220 // DFI
221 #define  readDFOFileSelect             0xc300+STD_BETA_OB,0x000C
222 #define  writeDFOFileSelectN(NN)       0xcb00+STD_BETA_OB,0x000C,NN
223 #define  readDFOMediaSelect            0xc300+STD_BETA_OB,0x000E
224 #define  writeDFOMediaSelectN(NN)      0xcb00+STD_BETA_OB,0x000E,NN
225 #endif //HSE
227 /***********************************************************************
228  * The following addresses will be directly referred in the alpha codes below.
229  *
230  * #define DITCSRA0     0x46000100
231  * #define DITCSRA1     0x46000104
232  * #define DITCSRA2     0x46000108
233  * #define DITCSRA3     0x4600010c
234  * #define DITCSRA4     0x46000110
235  * #define DITCSRA5     0x46000114
236  *
237  * #define DITCSRB0     0x46000118
238  * #define DITCSRB1     0x4600011c
239  * #define DITCSRB2     0x46000120
240  * #define DITCSRB3     0x46000124
241  * #define DITCSRB4     0x46000128
242  * #define DITCSRB5     0x4600012c
243 */
245 #define readOBDitCsrA0          0xf704,0x0004,0x0100,0x4600
246 #define writeOBDitCsrA0(N)      0xff04,0x0004,0x0100,0x4600,((N)&0xFFFF),(((N)>>16)&0xFFFF)
247 #define readOBDitCsrA1          0xf704,0x0004,0x0104,0x4600
248 #define writeOBDitCsrA1(N)      0xff04,0x0004,0x0104,0x4600,((N)&0xFFFF),(((N)>>16)&0xFFFF)
249 #define readOBDitCsrA2          0xf704,0x0004,0x0108,0x4600
250 #define writeOBDitCsrA2(N)      0xff04,0x0004,0x0108,0x4600,((N)&0xFFFF),(((N)>>16)&0xFFFF)
251 #define readOBDitCsrA3          0xf704,0x0004,0x010c,0x4600
252 #define writeOBDitCsrA3(N)      0xff04,0x0004,0x010c,0x4600,((N)&0xFFFF),(((N)>>16)&0xFFFF)
253 #define readOBDitCsrA4          0xf704,0x0004,0x0110,0x4600
254 #define writeOBDitCsrA4(N)      0xff04,0x0004,0x0110,0x4600,((N)&0xFFFF),(((N)>>16)&0xFFFF)
255 #define readOBDitCsrA5          0xf704,0x0004,0x0114,0x4600
256 #define writeOBDitCsrA5(N)      0xff04,0x0004,0x0114,0x4600,((N)&0xFFFF),(((N)>>16)&0xFFFF)
257 #define readOBDitCsrB0          0xf704,0x0004,0x0118,0x4600
258 #define writeOBDitCsrB0(N)      0xff04,0x0004,0x0118,0x4600,((N)&0xFFFF),(((N)>>16)&0xFFFF)
259 #define readOBDitCsrB1          0xf704,0x0004,0x011c,0x4600
260 #define writeOBDitCsrB1(N)      0xff04,0x0004,0x011c,0x4600,((N)&0xFFFF),(((N)>>16)&0xFFFF)
261 #define readOBDitCsrB2          0xf704,0x0004,0x0120,0x4600
262 #define writeOBDitCsrB2(N)      0xff04,0x0004,0x0120,0x4600,((N)&0xFFFF),(((N)>>16)&0xFFFF)
263 #define readOBDitCsrB3          0xf704,0x0004,0x0124,0x4600
264 #define writeOBDitCsrB3(N)      0xff04,0x0004,0x0124,0x4600,((N)&0xFFFF),(((N)>>16)&0xFFFF)
265 #define readOBDitCsrB4          0xf704,0x0004,0x0128,0x4600
266 #define writeOBDitCsrB4(N)      0xff04,0x0004,0x0128,0x4600,((N)&0xFFFF),(((N)>>16)&0xFFFF)
267 #define readOBDitCsrB5          0xf704,0x0004,0x012c,0x4600
268 #define writeOBDitCsrB5(N)      0xff04,0x0004,0x012c,0x4600,((N)&0xFFFF),(((N)>>16)&0xFFFF)
270 #endif /* _OUTBUF_A */