Pyalpha tools for performance audio demo in PRSDK.
[processor-sdk/performance-audio-tools.git] / alpha / inpbuf_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 // Input Buffer alpha codes
39 //
40 //
41 //
43 #ifndef _INPBUF_A
44 #define _INPBUF_A
46 #include <acpbeta.h>
47 #include <pafmac_a.h>
48 #include <paftyp_a.h>
50 #define  readIBMode                         0xc200+STD_BETA_IB,0x0400
51 #define writeIBModeN(NN)                    0xca00+STD_BETA_IB,(0x0400+(NN))
53 #define  readIBSampleRateOverride           0xc200+STD_BETA_IB,0x0800
54 #define writeIBSampleRateOverrideUnknown    0xca00+STD_BETA_IB,(0x0800+PAF_SAMPLERATE_UNKNOWN)
55 #define writeIBSampleRateOverrideNone       0xca00+STD_BETA_IB,(0x0800+PAF_SAMPLERATE_NONE)
56 #define writeIBSampleRateOverride32000Hz    0xca00+STD_BETA_IB,(0x0800+PAF_SAMPLERATE_32000HZ)
57 #define writeIBSampleRateOverride44100Hz    0xca00+STD_BETA_IB,(0x0800+PAF_SAMPLERATE_44100HZ)
58 #define writeIBSampleRateOverride48000Hz    0xca00+STD_BETA_IB,(0x0800+PAF_SAMPLERATE_48000HZ)
59 #define writeIBSampleRateOverride88200Hz    0xca00+STD_BETA_IB,(0x0800+PAF_SAMPLERATE_88200HZ)
60 #define writeIBSampleRateOverride96000Hz    0xca00+STD_BETA_IB,(0x0800+PAF_SAMPLERATE_96000HZ)
61 #define writeIBSampleRateOverride192000Hz   0xca00+STD_BETA_IB,(0x0800+PAF_SAMPLERATE_192000HZ)
62 #define writeIBSampleRateOverride64000Hz    0xca00+STD_BETA_IB,(0x0800+PAF_SAMPLERATE_64000HZ)
63 #define writeIBSampleRateOverride128000Hz   0xca00+STD_BETA_IB,(0x0800+PAF_SAMPLERATE_128000HZ)
64 #define writeIBSampleRateOverride176400Hz   0xca00+STD_BETA_IB,(0x0800+PAF_SAMPLERATE_176400HZ)
65 #define writeIBSampleRateOverride8000Hz     0xca00+STD_BETA_IB,(0x0800+PAF_SAMPLERATE_8000HZ)
66 #define writeIBSampleRateOverride11025Hz    0xca00+STD_BETA_IB,(0x0800+PAF_SAMPLERATE_11025HZ)
67 #define writeIBSampleRateOverride12000Hz    0xca00+STD_BETA_IB,(0x0800+PAF_SAMPLERATE_12000HZ)
68 #define writeIBSampleRateOverride16000Hz    0xca00+STD_BETA_IB,(0x0800+PAF_SAMPLERATE_16000HZ)
69 #define writeIBSampleRateOverride22050Hz    0xca00+STD_BETA_IB,(0x0800+PAF_SAMPLERATE_22050HZ)
70 #define writeIBSampleRateOverride24000Hz    0xca00+STD_BETA_IB,(0x0800+PAF_SAMPLERATE_24000HZ)
71 #define writeIBSampleRateOverrideStandard   0xca00+STD_BETA_IB,0x0880
72 #define writeIBSampleRateOverrideData       0xca00+STD_BETA_IB,0x0881
73 #define writeIBSampleRateOverrideMeasured   0xca00+STD_BETA_IB,0x0882
74 #define writeIBSampleRateOverrideAuto       0xca00+STD_BETA_IB,0x0883
75 #define writeIBSampleRateOverrideOther      0xca00+STD_BETA_IB,0x0884
77 #define  readIBSampleRateData               0xc200+STD_BETA_IB,0x0900
78 #define wroteIBSampleRateDataUnknown        0xca00+STD_BETA_IB,0x0900+PAF_SAMPLERATE_UNKNOWN
79 #define wroteIBSampleRateDataNone           0xca00+STD_BETA_IB,0x0900+PAF_SAMPLERATE_NONE
80 #define wroteIBSampleRateData32000Hz        0xca00+STD_BETA_IB,0x0900+PAF_SAMPLERATE_32000HZ
81 #define wroteIBSampleRateData44100Hz        0xca00+STD_BETA_IB,0x0900+PAF_SAMPLERATE_44100HZ
82 #define wroteIBSampleRateData48000Hz        0xca00+STD_BETA_IB,0x0900+PAF_SAMPLERATE_48000HZ
83 #define wroteIBSampleRateData88200Hz        0xca00+STD_BETA_IB,0x0900+PAF_SAMPLERATE_88200HZ
84 #define wroteIBSampleRateData96000Hz        0xca00+STD_BETA_IB,0x0900+PAF_SAMPLERATE_96000HZ
85 #define wroteIBSampleRateData192000Hz       0xca00+STD_BETA_IB,0x0900+PAF_SAMPLERATE_192000HZ
86 #define wroteIBSampleRateData64000Hz        0xca00+STD_BETA_IB,0x0900+PAF_SAMPLERATE_64000HZ
87 #define wroteIBSampleRateData128000Hz       0xca00+STD_BETA_IB,0x0900+PAF_SAMPLERATE_128000HZ
88 #define wroteIBSampleRateData176400Hz       0xca00+STD_BETA_IB,0x0900+PAF_SAMPLERATE_176400HZ
89 #define wroteIBSampleRateData8000Hz         0xca00+STD_BETA_IB,0x0900+PAF_SAMPLERATE_8000HZ
90 #define wroteIBSampleRateData11025Hz        0xca00+STD_BETA_IB,0x0900+PAF_SAMPLERATE_11025HZ
91 #define wroteIBSampleRateData12000Hz        0xca00+STD_BETA_IB,0x0900+PAF_SAMPLERATE_12000HZ
92 #define wroteIBSampleRateData16000Hz        0xca00+STD_BETA_IB,0x0900+PAF_SAMPLERATE_16000HZ
93 #define wroteIBSampleRateData22050Hz        0xca00+STD_BETA_IB,0x0900+PAF_SAMPLERATE_22050HZ
94 #define wroteIBSampleRateData24000Hz        0xca00+STD_BETA_IB,0x0900+PAF_SAMPLERATE_24000HZ
96 #define  readIBSampleRateMeasured           0xc200+STD_BETA_IB,0x0a00
97 #define wroteIBSampleRateMeasuredUnknown    0xca00+STD_BETA_IB,0x0a00+PAF_SAMPLERATE_UNKNOWN
98 #define wroteIBSampleRateMeasuredNone       0xca00+STD_BETA_IB,0x0a00+PAF_SAMPLERATE_NONE
99 #define wroteIBSampleRateMeasured32000Hz    0xca00+STD_BETA_IB,0x0a00+PAF_SAMPLERATE_32000HZ
100 #define wroteIBSampleRateMeasured44100Hz    0xca00+STD_BETA_IB,0x0a00+PAF_SAMPLERATE_44100HZ
101 #define wroteIBSampleRateMeasured48000Hz    0xca00+STD_BETA_IB,0x0a00+PAF_SAMPLERATE_48000HZ
102 #define wroteIBSampleRateMeasured88200Hz    0xca00+STD_BETA_IB,0x0a00+PAF_SAMPLERATE_88200HZ
103 #define wroteIBSampleRateMeasured96000Hz    0xca00+STD_BETA_IB,0x0a00+PAF_SAMPLERATE_96000HZ
104 #define wroteIBSampleRateMeasured192000Hz   0xca00+STD_BETA_IB,0x0a00+PAF_SAMPLERATE_192000HZ
105 #define wroteIBSampleRateMeasured64000Hz    0xca00+STD_BETA_IB,0x0a00+PAF_SAMPLERATE_64000HZ
106 #define wroteIBSampleRateMeasured128000Hz   0xca00+STD_BETA_IB,0x0a00+PAF_SAMPLERATE_128000HZ
107 #define wroteIBSampleRateMeasured176400Hz   0xca00+STD_BETA_IB,0x0a00+PAF_SAMPLERATE_176400HZ
108 #define wroteIBSampleRateMeasured8000Hz     0xca00+STD_BETA_IB,0x0a00+PAF_SAMPLERATE_8000HZ
109 #define wroteIBSampleRateMeasured11025Hz    0xca00+STD_BETA_IB,0x0a00+PAF_SAMPLERATE_11025HZ
110 #define wroteIBSampleRateMeasured12000Hz    0xca00+STD_BETA_IB,0x0a00+PAF_SAMPLERATE_12000HZ
111 #define wroteIBSampleRateMeasured16000Hz    0xca00+STD_BETA_IB,0x0a00+PAF_SAMPLERATE_16000HZ
112 #define wroteIBSampleRateMeasured22050Hz    0xca00+STD_BETA_IB,0x0a00+PAF_SAMPLERATE_22050HZ
113 #define wroteIBSampleRateMeasured24000Hz    0xca00+STD_BETA_IB,0x0a00+PAF_SAMPLERATE_24000HZ
115 #define  readIBSampleRateStatus             0xc200+STD_BETA_IB,0x0b00
116 #define wroteIBSampleRateStatusUnknown      0xca00+STD_BETA_IB,0x0b00+PAF_SAMPLERATE_UNKNOWN
117 #define wroteIBSampleRateStatusNone         0xca00+STD_BETA_IB,0x0b00+PAF_SAMPLERATE_NONE
118 #define wroteIBSampleRateStatus32000Hz      0xca00+STD_BETA_IB,0x0b00+PAF_SAMPLERATE_32000HZ
119 #define wroteIBSampleRateStatus44100Hz      0xca00+STD_BETA_IB,0x0b00+PAF_SAMPLERATE_44100HZ
120 #define wroteIBSampleRateStatus48000Hz      0xca00+STD_BETA_IB,0x0b00+PAF_SAMPLERATE_48000HZ
121 #define wroteIBSampleRateStatus88200Hz      0xca00+STD_BETA_IB,0x0b00+PAF_SAMPLERATE_88200HZ
122 #define wroteIBSampleRateStatus96000Hz      0xca00+STD_BETA_IB,0x0b00+PAF_SAMPLERATE_96000HZ
123 #define wroteIBSampleRateStatus192000Hz     0xca00+STD_BETA_IB,0x0b00+PAF_SAMPLERATE_192000HZ
124 #define wroteIBSampleRateStatus64000Hz      0xca00+STD_BETA_IB,0x0b00+PAF_SAMPLERATE_64000HZ
125 #define wroteIBSampleRateStatus128000Hz     0xca00+STD_BETA_IB,0x0b00+PAF_SAMPLERATE_128000HZ
126 #define wroteIBSampleRateStatus176400Hz     0xca00+STD_BETA_IB,0x0b00+PAF_SAMPLERATE_176400HZ
127 #define wroteIBSampleRateStatus8000Hz       0xca00+STD_BETA_IB,0x0b00+PAF_SAMPLERATE_8000HZ
128 #define wroteIBSampleRateStatus11025Hz      0xca00+STD_BETA_IB,0x0b00+PAF_SAMPLERATE_11025HZ
129 #define wroteIBSampleRateStatus12000Hz      0xca00+STD_BETA_IB,0x0b00+PAF_SAMPLERATE_12000HZ
130 #define wroteIBSampleRateStatus16000Hz      0xca00+STD_BETA_IB,0x0b00+PAF_SAMPLERATE_16000HZ
131 #define wroteIBSampleRateStatus22050Hz      0xca00+STD_BETA_IB,0x0b00+PAF_SAMPLERATE_22050HZ
132 #define wroteIBSampleRateStatus24000Hz      0xca00+STD_BETA_IB,0x0b00+PAF_SAMPLERATE_24000HZ
134 #define  readIBNonAudio                     0xc200+STD_BETA_IB,0x0c00
136 #define  readIBEmphasisData                 0xc200+STD_BETA_IB,0x0d00
137 #define  readIBEmphasis                     readIBEmphasisData
138 #define wroteIBEmphasisDataUnknown          0xca00+STD_BETA_IB,0x0d00+PAF_IEC_PREEMPHASIS_UNKNOWN
139 #define wroteIBEmphasisDataNo               0xca00+STD_BETA_IB,0x0d00+PAF_IEC_PREEMPHASIS_NO
140 #define wroteIBEmphasisDataYes              0xca00+STD_BETA_IB,0x0d00+PAF_IEC_PREEMPHASIS_YES
142 #define  readIBEmphasisOverride             0xc200+STD_BETA_IB,0x0e00
143 #define writeIBEmphasisOverrideDisable      0xca00+STD_BETA_IB,0x0e00
144 #define writeIBEmphasisOverrideNo           0xca00+STD_BETA_IB,0x0e80+PAF_IEC_PREEMPHASIS_NO
145 #define writeIBEmphasisOverrideYes          0xca00+STD_BETA_IB,0x0e80+PAF_IEC_PREEMPHASIS_YES
147 #define  readIBEmphasisStatus               0xc200+STD_BETA_IB,0x0f00
148 #define wroteIBEmphasisStatusNo             0xca00+STD_BETA_IB,0x0f00+PAF_IEC_PREEMPHASIS_NO
149 #define wroteIBEmphasisStatusYes            0xca00+STD_BETA_IB,0x0f00+PAF_IEC_PREEMPHASIS_YES
151 #define  readIBLock       0xc200+STD_BETA_IB,0x1000
152 #define wroteIBLockNo     0xca00+STD_BETA_IB,0x1000
153 #define wroteIBLockYes    0xca00+STD_BETA_IB,0x1001
155 #define  readIBLockOverride          0xc200+STD_BETA_IB,0x0600
156 #define writeIBLockOverrideNo        0xca00+STD_BETA_IB,0x0600
157 #define writeIBLockOverrideYes       0xca00+STD_BETA_IB,0x0601
158 #define writeIBLockOverrideNone      0xca00+STD_BETA_IB,0x0680
160 #define  readIBStatus 0xc508,STD_BETA_IB
161 #define  readIBControl \
162          readIBMode, \
163          readIBSampleRateOverride, \
164          readIBEmphasisOverride
166 /* in support of inverse compilation only */
167 #define writeIBModeN__0__ writeIBModeN(0)
168 #define writeIBModeN__1__ writeIBModeN(1)
170 #define  readIBSioSelect 0xc200+STD_BETA_IB, 0x0500
171 #define writeIBSioSelectN(NN) 0xca00+STD_BETA_IB,(0x0500+(NN))
173 #define  readIBPrecisionDefault         0xc200+STD_BETA_IB,0x1400
174 #define writeIBPrecisionDefaultOriginal 0xca00+STD_BETA_IB,0x1410
175 #define writeIBPrecisionDefaultStandard 0xca00+STD_BETA_IB,0x1414
176 #define writeIBPrecisionDefaultFull     0xca00+STD_BETA_IB,0x1418
178 #define  readIBPrecisionDetect          0xc200+STD_BETA_IB,0x1500
179 #define wroteIBPrecisionDetectInvalid   0xca00+STD_BETA_IB,0x15fe /* Treat as None/TBD */
180 #define wroteIBPrecisionDetectTBD       0xca00+STD_BETA_IB,0x15ff /* Not yet implemented */
181 #define wroteIBPrecisionDetectNone      0xca00+STD_BETA_IB,0x1500 /* None or <= 20 */
182 #define wroteIBPrecisionDetect16        0xca00+STD_BETA_IB,0x1510
183 #define wroteIBPrecisionDetect17        0xca00+STD_BETA_IB,0x1511
184 #define wroteIBPrecisionDetect18        0xca00+STD_BETA_IB,0x1512
185 #define wroteIBPrecisionDetect19        0xca00+STD_BETA_IB,0x1513
186 #define wroteIBPrecisionDetect20        0xca00+STD_BETA_IB,0x1514
187 #define wroteIBPrecisionDetect21        0xca00+STD_BETA_IB,0x1515
188 #define wroteIBPrecisionDetect22        0xca00+STD_BETA_IB,0x1516
189 #define wroteIBPrecisionDetect23        0xca00+STD_BETA_IB,0x1517
190 #define wroteIBPrecisionDetect24        0xca00+STD_BETA_IB,0x1518 /* 24 or <= 24 */
192 #define  readIBPrecisionOverride        0xc200+STD_BETA_IB,0x1600
193 #define writeIBPrecisionOverrideDefault 0xca00+STD_BETA_IB,0x16ff
194 #define writeIBPrecisionOverrideDetect  0xca00+STD_BETA_IB,0x1600
195 #define writeIBPrecisionOverride16      0xca00+STD_BETA_IB,0x1610
196 #define writeIBPrecisionOverride17      0xca00+STD_BETA_IB,0x1611
197 #define writeIBPrecisionOverride18      0xca00+STD_BETA_IB,0x1612
198 #define writeIBPrecisionOverride19      0xca00+STD_BETA_IB,0x1613
199 #define writeIBPrecisionOverride20      0xca00+STD_BETA_IB,0x1614
200 #define writeIBPrecisionOverride21      0xca00+STD_BETA_IB,0x1615
201 #define writeIBPrecisionOverride22      0xca00+STD_BETA_IB,0x1616
202 #define writeIBPrecisionOverride23      0xca00+STD_BETA_IB,0x1617
203 #define writeIBPrecisionOverride24      0xca00+STD_BETA_IB,0x1618
204 #define writeIBPrecisionOverrideFloat   0xca00+STD_BETA_IB,0x1621
206 #define  readIBPrecisionInput           0xc200+STD_BETA_IB,0x1700
207 #define wroteIBPrecisionInputBitStream  0xca00+STD_BETA_IB,0x1700
208 #define wroteIBPrecisionInput16         0xca00+STD_BETA_IB,0x1710
209 #define wroteIBPrecisionInput17         0xca00+STD_BETA_IB,0x1711
210 #define wroteIBPrecisionInput18         0xca00+STD_BETA_IB,0x1712
211 #define wroteIBPrecisionInput19         0xca00+STD_BETA_IB,0x1713
212 #define wroteIBPrecisionInput20         0xca00+STD_BETA_IB,0x1714
213 #define wroteIBPrecisionInput21         0xca00+STD_BETA_IB,0x1715
214 #define wroteIBPrecisionInput22         0xca00+STD_BETA_IB,0x1716
215 #define wroteIBPrecisionInput23         0xca00+STD_BETA_IB,0x1717
216 #define wroteIBPrecisionInput24         0xca00+STD_BETA_IB,0x1718
218 #define  readIBZeroRunTrigger           0xc400+STD_BETA_IB,0x0018
219 #define writeIBZeroRunTriggerN(NN)      0xcc00+STD_BETA_IB,0x0018,LSW(NN),MSW(NN)
221 #define  readIBZeroRunRestart           0xc400+STD_BETA_IB,0x001C
222 #define writeIBZeroRunRestartN(NN)      0xcc00+STD_BETA_IB,0x001C,LSW(NN),MSW(NN)
224 #define  readIBUnknownTimeout           0xc400+STD_BETA_IB,0x0020
225 #define writeIBUnknownTimeoutN(NN)      0xcc00+STD_BETA_IB,0x0020,LSW(NN),MSW(NN)
227 #define  readIBScanAtHighSampleRateMode        0xc200+STD_BETA_IB,0x1100
228 #define writeIBScanAtHighSampleRateModeDisable 0xca00+STD_BETA_IB,0x1100
229 #define writeIBScanAtHighSampleRateModeEnable  0xca00+STD_BETA_IB,0x1101
231 #define   readIBZeroRun     0xc200+STD_BETA_IB,0x1200
232 #define  wroteIBZeroRunNo   0xca00+STD_BETA_IB,0x1200
233 #define  wroteIBZeroRunYes  0xca00+STD_BETA_IB,0x1201
235 #define   readIBRateTrackMode          0xc200+STD_BETA_IB,0x1300
236 #define  writeIBRateTrackDisable       0xca00+STD_BETA_IB,0x1300
237 #define  writeIBRateTrackEnable        0xca00+STD_BETA_IB,0x1301
239 #define   readIBreportDTS16AsDTSForLargeSampleRate         0xc200+STD_BETA_IB,0x2900
240 #define  writeIBreportDTS16AsDTSForLargeSampleRateDisable  0xca00+STD_BETA_IB,0x2900
241 #define  writeIBreportDTS16AsDTSForLargeSampleRateEnable   0xca00+STD_BETA_IB,0x2901
243 #define  readIBuseIECSubType           0xc200+STD_BETA_IB,0x2A00
244 #define  writeIBuseIECSubTypeDisable  0xca00+STD_BETA_IB,0x2A00
245 #define  writeIBuseIECSubTypeEnable    0xca00+STD_BETA_IB,0x2A01
248 #ifdef HSE
249 // DFI
250 #define  readDFIFileSelect             0xc300+STD_BETA_IB,0x0024
251 #define  writeDFIFileSelectN(NN)       0xcb00+STD_BETA_IB,0x0024,NN
252 #define  readDFIMediaSelect            0xc300+STD_BETA_IB,0x0026
253 #define  writeDFIMediaSelectN(NN)      0xcb00+STD_BETA_IB,0x0026,NN
254 #define  readDFIFileSize               0xc400+STD_BETA_IB,0x0028
255 #define  readDFIFilePosition           0xc400+STD_BETA_IB,0x002C
256 #define  readDFIPlayRate1              0xc300+STD_BETA_IB,0x0030
257 #define  readDFIPlayRate2              0xc300+STD_BETA_IB,0x0032
259 #endif //HSE
261 #define   readIBLastFrameMask            0xc400+STD_BETA_IB,0x0024
262 #define  writeIBLastFrameMaskN(NN)       0xcc00+STD_BETA_IB,0x0024,LSW(NN),MSW(NN)
264 #endif /* _INPBUF_A */