1 //
2 // Copyright (C) 2016 Texas Instruments Incorporated - http://www.ti.com/
3 // ALL RIGHTS RESERVED
4 //
6 //
7 // THD PCM Decoder alpha codes
8 // Revision: 1.1
9 //
11 #ifndef _THD_A
12 #define _THD_A
14 #include <acpbeta.h>
16 // THD interface
17 #define readTHDDecodeMode 0xc200+STD_BETA_THD,0x0400
18 #define writeTHDDecode2Channel 0xca00+STD_BETA_THD,0x0401
19 #define writeTHDDecode6Channel 0xca00+STD_BETA_THD,0x0402
20 #define writeTHDDecode8Channel 0xca00+STD_BETA_THD,0x0404
21 #define writeTHDDecode16Channel 0xca00+STD_BETA_THD,0x0408
22 #define writeTHDDecodeAuto 0xca00+STD_BETA_THD,0x04ff
23 #define writeTHDDecodeAuto162Channel 0xca00+STD_BETA_THD,0x0417
24 #define writeTHDDecodeAuto166Channel 0xca00+STD_BETA_THD,0x0418
26 #define readTHDDecodeChannelSet 0xc200+STD_BETA_THD,0x0A00
27 #define wroteTHDDecodeNoChannelSet 0xca00+STD_BETA_THD,0x0A00
28 #define wroteTHDDecode2ChannelSet 0xca00+STD_BETA_THD,0x0A01
29 #define wroteTHDDecode6ChannelSet 0xca00+STD_BETA_THD,0x0A02
30 #define wroteTHDDecode8ChannelSet 0xca00+STD_BETA_THD,0x0A06
31 #define wroteTHDDecode16ChannelSet 0xca00+STD_BETA_THD,0x0A08
33 #define readTHDDRCMode 0xc200+STD_BETA_THD,0x0500
34 #define writeTHDDRCDisable 0xca00+STD_BETA_THD,0x0500
35 #define writeTHDDRCFollow 0xca00+STD_BETA_THD,0x0501
36 #define writeTHDDRCNormal 0xca00+STD_BETA_THD,0x0502
37 #define writeTHDDRCHeavy 0xca00+STD_BETA_THD,0x0503
39 #define readTHDDRCBoost 0xc200+STD_BETA_THD,0x0600
40 #define writeTHDDRCBoostN(N) 0xca00+STD_BETA_THD,0x0600+((N)&0xff)
41 /* in support of inverse compilation only */
42 #define writeTHDDRCBoostN__100__ writeTHDDRCBoostN(100)
44 #define readTHDDRCCut 0xc200+STD_BETA_THD,0x0700
45 #define writeTHDDRCCutN(N) 0xca00+STD_BETA_THD,0x0700+((N)&0xff)
46 /* in support of inverse compilation only */
47 #define writeTHDDRCCutN__100__ writeTHDDRCCutN(100)
49 #define readTHDPCMWordSize 0xc200+STD_BETA_THD,0x0800
50 #define writeTHDPCMWordSize24bitInt 0xca00+STD_BETA_THD,0x0800
51 #define writeTHDPCMWordSize32bitFloat 0xca00+STD_BETA_THD,0x0801
53 #define readTHDLosslessMode 0xc200+STD_BETA_THD,0x0900
54 #define writeTHDPostProcessingEnable 0xca00+STD_BETA_THD,0x0900
55 #define writeTHDPostProcessingDisable 0xca00+STD_BETA_THD,0x0910
56 #define writeTHDLosslessEnable writeTHDPostProcessingDisable
57 #define writeTHDLosslessDisable writeTHDPostProcessingEnable
59 #define readTHDCenterMixLevel 0xc300+STD_BETA_THD,0x000C
60 #define writeTHDCenterMixLevelN(NN) 0xcb00+STD_BETA_THD,0x000C,(0xFFFF&(NN))
61 #define wroteTHDCenterMixLevel 0xcb00+STD_BETA_THD,0x000C
63 #define readTHDSurroundMixLevel 0xc300+STD_BETA_THD,0x000E
64 #define writeTHDSurroundMixLevelN(NN) 0xcb00+STD_BETA_THD,0x000E,(0xFFFF&(NN))
65 #define wroteTHDSurroundMixLevel 0xcb00+STD_BETA_THD,0x000E
67 #define readTHDLFEDownmixInclude 0xc200+STD_BETA_THD,0x1000
68 #define writeTHDLFEDownmixIncludeNo 0xca00+STD_BETA_THD,0x1000
69 #define writeTHDLFEDownmixIncludeYes 0xca00+STD_BETA_THD,0x1001
71 #define readTHDLfe readTHDLFEDownmixInclude
72 #define writeTHDLfeDwnmixInclude writeTHDLFEDownmixIncludeYes
73 #define writeTHDLfeOnDefault writeTHDLFEDownmixIncludeNo
74 #define writeTHDLfe2 0xca00+STD_BETA_THD,0x1002
76 #define readTHDLFEDownmixVolume 0xc200+STD_BETA_THD,0x1100
77 #define writeTHDLFEDownmixVolumeN(N) 0xca00+STD_BETA_THD,0x1100+(0xff&(N))
78 /* in support of inverse compilation only */
79 #define writeTHDLFEDownmixVolumeN__20__ writeTHDLFEDownmixVolumeN(20)
81 #define readTHDMinorErrorMute 0xc200+STD_BETA_THD,0x1400
82 #define writeTHDMinorErrorMuteEnable 0xca00+STD_BETA_THD,0x1401
83 #define writeTHDMinorErrorMuteDisable 0xca00+STD_BETA_THD,0x1400
84 #define writeTHDMinorErrorNoMute writeTHDMinorErrorMuteDisable
86 #define readTHDGainRequired 0xc200+STD_BETA_THD,0x1500
88 #define readTHDSpeakerRemap 0xc200+STD_BETA_THD,0x1600
89 #define writeTHDSpeakerRemapEnable 0xca00+STD_BETA_THD,0x1601
90 #define writeTHDSpeakerRemapDisable 0xca00+STD_BETA_THD,0x1600
92 #define readTHD192kHzDecode 0xc200+STD_BETA_THD,0x1f00
93 #define writeTHD192kHzDecodeEnable 0xca00+STD_BETA_THD,0x1f01
94 #define writeTHD192kHzDecodeDisable 0xca00+STD_BETA_THD,0x1f00
96 #define readTHDSelectMinorError 0xc200+STD_BETA_THD,0x2000
97 #define writeTHDSelectMinorErrorN(N) 0xca00+STD_BETA_THD,0x2000+((N)&0xff)
98 #define readTHDOutputMode 0xc200+STD_BETA_THD,0x2200
99 #define writeTHDOutputModeRaw 0xca00+STD_BETA_THD,0x22ff // raw
100 #define writeTHDOutputMode2 0xca00+STD_BETA_THD,0x2202 // L, R
101 #define writeTHDOutputMode3 0xca00+STD_BETA_THD,0x2203 // L, R, C, LFE
102 #define writeTHDOutputMode6 0xca00+STD_BETA_THD,0x2206 // L, R, LFE, Ls, Rs
103 #define writeTHDOutputMode7 0xca00+STD_BETA_THD,0x2207 // L, R, C, LFE, Ls, Rs
104 #define writeTHDOutputMode17 0xca00+STD_BETA_THD,0x2211 // L, R, C, LFE, Ls, Rs, Lc, Rc
105 #define writeTHDOutputMode18 0xca00+STD_BETA_THD,0x2212 // L, R, C, LFE, Ls, Rs, Lw, Rw
106 #define writeTHDOutputMode19 0xca00+STD_BETA_THD,0x2213 // L, R, C, LFE, Ls, Rs, Lfh, Rfh
107 #define writeTHDOutputMode21 0xca00+STD_BETA_THD,0x2215 // L, R, C, LFE, Ls, Rs, Lrs, Rrs
108 #define writeTHDOutputMode28 0xca00+STD_BETA_THD,0x221c // L, R, C, LFE, Ls, Rs, Ltm, Rtm
110 #define readTHDEvolutionMetadataMode 0xc200+STD_BETA_THD,0x2400
111 #define writeTHDEvolutionMetadataModeDisable 0xca00+STD_BETA_THD,0x2400
112 #define writeTHDEvolutionMetadataModeEnable 0xca00+STD_BETA_THD,0x2401
114 #define readTHDDisable96EvolutionMode 0xc200+STD_BETA_THD,0x2500
115 #define writeTHDDisable96EvolutionModeOff 0xca00+STD_BETA_THD,0x2500
116 #define writeTHDDisable96EvolutionModeOn 0xca00+STD_BETA_THD,0x2501
118 #define readTHDBitStreamInformation 0xc600+STD_BETA_THD2,0x0470
120 #define readTHDBitStreamInformation0 0xc300+STD_BETA_THD2,0x0004
122 #define readTHDBSIFBBChannelAssignment 0xc300+STD_BETA_THD2,0x0006
123 #define readTHDBitStreamInformation1 readTHDBSIFBBChannelAssignment
125 #define readTHDBSIFBBSampleRate 0xc300+STD_BETA_THD2,0x0008
126 #define readTHDBitStreamInformation2 readTHDBSIFBBSampleRate
128 #define readTHDBSIFBBMultiChannelType 0xc300+STD_BETA_THD2,0x000a
129 #define readTHDBitStreamInformation3 readTHDBSIFBBMultiChannelType
131 #define readTHDBSIFBBQuantWordLength1 0xc300+STD_BETA_THD2,0x000c
132 #define readTHDBitStreamInformation4 readTHDBSIFBBQuantWordLength1
134 #define readTHDBSIFBBSummaryInfo 0xc300+STD_BETA_THD2,0x000e
135 #define readTHDBitStreamInformation5 readTHDBSIFBBSummaryInfo
137 #define readTHDBSIFBBSourceFormat 0xc300+STD_BETA_THD2,0x0010
138 #define readTHDBitStreamInformation6 readTHDBSIFBBSourceFormat
140 #define readTHDBSIFBBVariableRate 0xc300+STD_BETA_THD2,0x0012
141 #define readTHDBitStreamInformation7 readTHDBSIFBBVariableRate
143 #define readTHDBSIFBBPeakDataRate 0xc300+STD_BETA_THD2,0x0014
144 #define readTHDBitStreamInformation8 readTHDBSIFBBPeakDataRate
146 #define readTHDBSIFBBSubstreams 0xc300+STD_BETA_THD2,0x0016
147 #define readTHDBitStreamInformation9 readTHDBSIFBBSubstreams
149 #define readTHDBSIFBBSubstreamInfo 0xc300+STD_BETA_THD2,0x0018
150 #define readTHDBitStreamInformation10 readTHDBSIFBBSubstreamInfo
152 #define readTHDBSIFBBLevelControl 0xc300+STD_BETA_THD2,0x001a
153 #define readTHDBitStreamInformation11 readTHDBSIFBBLevelControl
155 #define readTHDBSIFBBCopyRightProtection 0xc300+STD_BETA_THD2,0x001c
156 #define readTHDBitStreamInformation12 readTHDBSIFBBCopyRightProtection
158 #define readTHDBSIFBBSpeakerLayout 0xc300+STD_BETA_THD2,0x01e
159 #define readTHDBitStreamInformation13 readTHDBSIFBBSpeakerLayout
161 #define readTHDBSIFBBMultiChannelOccupancy 0xc300+STD_BETA_THD2,0x0020
162 #define readTHDBitStreamInformation14 readTHDBSIFBBMultiChannelOccupancy
164 #define readTHDBSIFBBMultiChannelType2 0xc300+STD_BETA_THD2,0x0022
165 #define readTHDBitStreamInformation15 readTHDBSIFBBMultiChannelType2
167 #define readTHDBSIFBBWordWidth 0xc300+STD_BETA_THD2,0x0024
168 #define readTHDBitStreamInformation16 readTHDBSIFBBWordWidth
170 #define readTHDBSIFBBFlags 0xc300+STD_BETA_THD2,0x0026
171 #define readTHDBitStreamInformation17 readTHDBSIFBBFlags
173 #define readTHDBSIFBBQuantWordLength2 0xc300+STD_BETA_THD2,0x0028
174 #define readTHDBitStreamInformation18 readTHDBSIFBBQuantWordLength2
176 #define readTHDBSIFBBSampleRate2 0xc300+STD_BETA_THD2,0x002a
177 #define readTHDBitStreamInformation19 readTHDBSIFBBSampleRate2
179 #define readTHDBSIFBBfs 0xc300+STD_BETA_THD2,0x002c
180 #define readTHDBitStreamInformation20 readTHDBSIFBBfs
183 #define readTHDBSIFBAChannelAssignment8Ch 0xc300+STD_BETA_THD2,0x0034
184 #define readTHDBitStreamInformation21 readTHDBSIFBAChannelAssignment8Ch
186 #define readTHDBSIFBAChannelModifier8Ch 0xc300+STD_BETA_THD2,0x0036
187 #define readTHDBitStreamInformation22 readTHDBSIFBAChannelModifier8Ch
189 #define readTHDBSIFBAChannelAssignment6Ch 0xc300+STD_BETA_THD2,0x0038
190 #define readTHDBitStreamInformation23 readTHDBSIFBAChannelAssignment6Ch
192 #define readTHDBSIFBAChannelModifier6Ch 0xc300+STD_BETA_THD2,0x003a
193 #define readTHDBitStreamInformation24 readTHDBSIFBAChannelModifier6Ch
195 #define readTHDBSIFBAChannelModifier2Ch 0xc300+STD_BETA_THD2,0x003c
196 #define readTHDBitStreamInformation25 readTHDBSIFBAChannelModifier2Ch
198 #define readTHDBSIFBAMultiChannelType8Ch 0xc300+STD_BETA_THD2,0x003e
199 #define readTHDBitStreamInformation26 readTHDBSIFBAMultiChannelType8Ch
201 #define readTHDBSIFBAMultiChannelType6Ch 0xc300+STD_BETA_THD2,0x0040
202 #define readTHDBitStreamInformation27 readTHDBSIFBAMultiChannelType6Ch
204 #define readTHDBSIFBASampleRate 0xc300+STD_BETA_THD2,0x0042
205 #define readTHDBitStreamInformation28 readTHDBSIFBASampleRate
207 #define readTHDBSIFBAVariableRate 0xc300+STD_BETA_THD2,0x0044
208 #define readTHDBitStreamInformation29 readTHDBSIFBAVariableRate
210 #define readTHDBSIFBAPeakDataRate 0xc300+STD_BETA_THD2,0x0046
211 #define readTHDBitStreamInformation30 readTHDBSIFBAPeakDataRate
213 #define readTHDBSIFBASubstreams 0xc300+STD_BETA_THD2,0x0048
214 #define readTHDBitStreamInformation31 readTHDBSIFBASubstreams
216 #define readTHDBSIFBASubstreamInfo 0xc300+STD_BETA_THD2,0x004a
217 #define readTHDBitStreamInformation32 readTHDBSIFBASubstreamInfo
219 #define readTHDBSIFBAControlEnabled2Ch 0xc300+STD_BETA_THD2,0x004c
220 #define readTHDBitStreamInformation33 readTHDBSIFBAControlEnabled2Ch
222 #define readTHDBSIFBAControlEnabled6Ch 0xc300+STD_BETA_THD2,0x004e
223 #define readTHDBitStreamInformation34 readTHDBSIFBAControlEnabled6Ch
225 #define readTHDBSIFBAControlEnabled8Ch 0xc300+STD_BETA_THD2,0x0050
226 #define readTHDBitStreamInformation35 readTHDBSIFBAControlEnabled8Ch
228 #define readTHDBSIFBAStartUpGain 0xc300+STD_BETA_THD2,0x0052
229 #define readTHDBitStreamInformation36 readTHDBSIFBAStartUpGain
231 #define readTHDBSIFBADialNorm2Ch 0xc300+STD_BETA_THD2,0x0054
232 #define readTHDBitStreamInformation37 readTHDBSIFBADialNorm2Ch
234 #define readTHDBSIFBAMixLevel2Ch 0xc300+STD_BETA_THD2,0x0056
235 #define readTHDBitStreamInformation38 readTHDBSIFBAMixLevel2Ch
237 #define readTHDBSIFBADialNorm6Ch 0xc300+STD_BETA_THD2,0x0058
238 #define readTHDBitStreamInformation39 readTHDBSIFBADialNorm6Ch
240 #define readTHDBSIFBAMixLevel6Ch 0xc300+STD_BETA_THD2,0x005a
241 #define readTHDBitStreamInformation40 readTHDBSIFBAMixLevel6Ch
243 #define readTHDBSIFBASourceFormat6Ch 0xc300+STD_BETA_THD2,0x005c
244 #define readTHDBitStreamInformation41 readTHDBSIFBASourceFormat6Ch
246 #define readTHDBSIFBADialNorm8Ch 0xc300+STD_BETA_THD2,0x005e
247 #define readTHDBitStreamInformation42 readTHDBSIFBADialNorm8Ch
249 #define readTHDBSIFBAMixLevel8Ch 0xc300+STD_BETA_THD2,0x0060
250 #define readTHDBitStreamInformation43 readTHDBSIFBAMixLevel8Ch
252 #define readTHDBSIFBASourceFormat8Ch 0xc300+STD_BETA_THD2,0x0062
253 #define readTHDBitStreamInformation44 readTHDBSIFBASourceFormat8Ch
255 #define readTHDBSIFBAExtraChMeaningPresent 0xc300+STD_BETA_THD2,0x0064
256 #define readTHDBitStreamInformation45 readTHDBSIFBAExtraChMeaningPresent
258 #define readTHDBSIFBAFlags 0xc300+STD_BETA_THD2,0x0066
259 #define readTHDBitStreamInformation46 readTHDBSIFBAFlags
261 #define readTHDBSIFBADialNorm16Ch 0xc300+STD_BETA_THD2,0x0068
262 #define readTHDBitStreamInformation47 readTHDBSIFBADialNorm16Ch
264 #define readTHDBSIFBAMixLevel16Ch 0xc300+STD_BETA_THD2,0x006a
265 #define readTHDBitStreamInformation48 readTHDBSIFBAMixLevel16Ch
267 #define readTHDBSIFBASourceFormat16Ch 0xc300+STD_BETA_THD2,0x006c
268 #define readTHDBitStreamInformation49 readTHDBSIFBASourceFormat16Ch
270 /* Returns the THD sync Word; This shows whether the stream format is FBA or FBB.
271 Accordingly corresponding alpha codes for the returned format ca be used */
273 #define readTHDBSISyncWord 0xc400+STD_BETA_THD2,0x0070
276 #define readTHDStatus 0xc508,STD_BETA_THD
277 #define readTHDCommon 0xc508,STD_BETA_THD2
278 #define readTHDControl \
279 readTHDDecodeMode, \
280 readTHDDRCMode, \
281 readTHDDRCBoost, \
282 readTHDDRCCut, \
283 readTHDLosslessMode, \
284 readTHDCenterMixLevel, \
285 readTHDSurroundMixLevel, \
286 readTHDLFEDownmixInclude, \
287 readTHDLFEDownmixVolume, \
288 /* readTHDCRCCheckMode, */ \
289 readTHDMinorErrorMute, \
290 readTHDSpeakerRemap, \
291 /* readTHDSamSizIgnore, */ \
292 /* readTHDDialNormMode, */ \
293 readTHD192kHzDecode, \
294 readTHDSelectMinorError, \
295 /* readTHDStandaloneMode */
297 // MAT interface
298 #define readMATDRCMode 0xc200+STD_BETA_THD,0x2800
299 #define writeMATDRCModeDisable 0xca00+STD_BETA_THD,0x2800
300 #define writeMATDRCModeNormal 0xca00+STD_BETA_THD,0x2801
301 #define writeMATDRCModeHeavy 0xca00+STD_BETA_THD,0x2802
303 #define readMATDRCBoost 0xc200+STD_BETA_THD,0x2900
304 #define writeMATDRCBoostN(N) 0xca00+STD_BETA_THD,0x2900+((N)&0xff)
306 #define readMATDRCCut 0xc200+STD_BETA_THD,0x2a00
307 #define writeMATDRCCutN(N) 0xca00+STD_BETA_THD,0x2a00+((N)&0xff)
309 #define readMATLoudnessMode 0xc200+STD_BETA_THD,0x2c00
310 #define writeMATLoudnessModeDisable 0xca00+STD_BETA_THD,0x2c00
311 #define writeMATLoudnessModeEnable 0xca00+STD_BETA_THD,0x2c01
313 #define readMATBitStreamInformation 0xc600+STD_BETA_THD2,0x7404
314 #define readMATBitStreamInformationProfileChannels 0xc300+STD_BETA_THD2,0x0074
315 #define readMATBitStreamInformation0 readMATBitStreamInformationProfileChannels
316 #define readMATBitStreamInformationBitDepthSampleRate 0xc300+STD_BETA_THD2,0x0076
317 #define readMATBitStreamInformation1 readMATBitStreamInformationBitDepthSampleRate
319 #define readMATStatus 0xc508,STD_BETA_THD
320 #define readMATControl \
321 /* readMATDRCCtrlMode, */ \
322 readMATDRCBoost, \
323 readMATDRCCut, \
324 /* readMATLfe, */ \
325 readMATLoudnessMode
327 #endif /* _THD_A */