]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - processor-sdk/performance-audio-tools.git/blob - alpha/dem_a.h
Pyalpha tools for performance audio demo in PRSDK.
[processor-sdk/performance-audio-tools.git] / alpha / dem_a.h
1 /******************************************************************************
2  * Copyright (c) 2017, Texas Instruments Incorporated - http://www.ti.com
3  *   All rights reserved.
4  *
5  *   Redistribution and use in source and binary forms, with or without
6  *   modification, are permitted provided that the following conditions are met:
7  *       * Redistributions of source code must retain the above copyright
8  *         notice, this list of conditions and the following disclaimer.
9  *       * Redistributions in binary form must reproduce the above copyright
10  *         notice, this list of conditions and the following disclaimer in the
11  *         documentation and/or other materials provided with the distribution.
12  *       * Neither the name of Texas Instruments Incorporated nor the
13  *         names of its contributors may be used to endorse or promote products
14  *         derived from this software without specific prior written permission.
15  *
16  *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
17  *   AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18  *   IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19  *   ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
20  *   LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21  *   CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22  *   SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
23  *   INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
24  *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
25  *   ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
26  *   THE POSSIBILITY OF SUCH DAMAGE.
27  *****************************************************************************/
29 #ifndef _DEM_A
30 #define _DEM_A
32 #include <paftyp_a.h>
33 #include <acpbeta.h>
35 #define  readDEMMode 0xc200+STD_BETA_DEM,0x0400
36 #define writeDEMModeDisable 0xca00+STD_BETA_DEM,0x0400
37 #define writeDEMModeEnable  0xca00+STD_BETA_DEM,0x0401
39 #define  readDEMFilterMode 0xc200+STD_BETA_DEM,0x0500
40 #define writeDEMFilterModeOff   0xca00+STD_BETA_DEM,0x0500
41 #define writeDEMFilterModeAuto  0xca00+STD_BETA_DEM,0x0501
42 #define writeDEMFilterModeOn    0xca00+STD_BETA_DEM,0x0502
44 #define  readDEMFilterActive 0xc200+STD_BETA_DEM,0x0600
45 #define wroteDEMFilterActiveNo  0xca00+STD_BETA_DEM,0x0600
46 #define wroteDEMFilterActiveYes 0xca00+STD_BETA_DEM,0x0601
48 #if PAF_MAXNUMCHAN <= 8     /* PAF_ChannelMask = XDAS_Int8 */
50 #define  readDEMChannelEnable 0xc200+STD_BETA_DEM,0x0800
51 #define  readDEMChannelActive 0xc200+STD_BETA_DEM,0x0900
53 #define writeDEMChannelEnableN(NN) 0xca00+STD_BETA_DEM,0x0800+((NN)&0xff)
55 #elif PAF_MAXNUMCHAN <= 16  /* PAF_ChannelMask = XDAS_Int16 */
57 #define  readDEMChannelEnable 0xc300+STD_BETA_DEM,0x0008
58 #define  readDEMChannelActive 0xc300+STD_BETA_DEM,0x000a
60 #define writeDEMChannelEnableN(NN)    0xcb00+STD_BETA_DEM,0x0008,NN
62 #elif PAF_MAXNUMCHAN <= 32  /* PAF_ChannelMask = XDAS_Int32 */
64 #define  readDEMChannelEnable 0xc400+STD_BETA_DEM,0x0008
65 #define  readDEMChannelActive 0xc400+STD_BETA_DEM,0x000c
67 #define writeDEMChannelEnableN(NN) 0xcc00+STD_BETA_DEM,0x0008,LSW(NN),MSW(NN)
69 #else
70 #error unsupported option: PAF_MAXNUMCHAN > 32
71 #endif
73 #if PAF_MAXNUMCHAN == 2
75 #define writeDEMChannelEnableNone     0xca00+STD_BETA_DEM,0x0800
76 #define writeDEMChannelEnableLeftRght 0xca00+STD_BETA_DEM,0x0803
77 #define writeDEMChannelEnableAll      writeDEMChannelEnableLeftRght
79 #define wroteDEMChannelActiveNone     0xca00+STD_BETA_DEM,0x0900
80 #define wroteDEMChannelActiveLeftRght 0xca00+STD_BETA_DEM,0x0903
82 #elif PAF_MAXNUMCHAN == 4
84 #define writeDEMChannelEnableNone     0xca00+STD_BETA_DEM,0x0800
85 #define writeDEMChannelEnableLeftRght 0xca00+STD_BETA_DEM,0x0803
86 #define writeDEMChannelEnableCntrSurr 0xca00+STD_BETA_DEM,0x080c
87 #define writeDEMChannelEnableAll      0xca00+STD_BETA_DEM,0x080f
89 #define wroteDEMChannelActiveNone     0xca00+STD_BETA_DEM,0x0900
90 #define wroteDEMChannelActiveLeftRght 0xca00+STD_BETA_DEM,0x0903
91 #define wroteDEMChannelActiveCntrSurr 0xca00+STD_BETA_DEM,0x090c
92 #define wroteDEMChannelActiveAll      0xca00+STD_BETA_DEM,0x090f
94 #elif PAF_MAXNUMCHAN == 6
96 #define writeDEMChannelEnableNone     0xca00+STD_BETA_DEM,0x0800
97 #define writeDEMChannelEnableLeftRght 0xca00+STD_BETA_DEM,0x0803
98 #define writeDEMChannelEnableLSurRSur 0xca00+STD_BETA_DEM,0x0818
99 #define writeDEMChannelEnableCntrSubw 0xca00+STD_BETA_DEM,0x0824
100 #define writeDEMChannelEnableAll      0xca00+STD_BETA_DEM,0x083f
102 #define wroteDEMChannelActiveNone     0xca00+STD_BETA_DEM,0x0900
103 #define wroteDEMChannelActiveLeftRght 0xca00+STD_BETA_DEM,0x0903
104 #define wroteDEMChannelActiveLSurRSur 0xca00+STD_BETA_DEM,0x0918
105 #define wroteDEMChannelActiveCntrSubw 0xca00+STD_BETA_DEM,0x0924
106 #define wroteDEMChannelActiveAll      0xca00+STD_BETA_DEM,0x093f
108 #elif PAF_MAXNUMCHAN == 8
110 #define writeDEMChannelEnableNone     0xca00+STD_BETA_DEM,0x0800
111 #define writeDEMChannelEnableLeftRght 0xca00+STD_BETA_DEM,0x0803
112 #define writeDEMChannelEnableLSurRSur 0xca00+STD_BETA_DEM,0x0818
113 #define writeDEMChannelEnableLBakRBak 0xca00+STD_BETA_DEM,0x0860
114 #define writeDEMChannelEnableCntrSubw 0xca00+STD_BETA_DEM,0x0824
115 #define writeDEMChannelEnableAll      0xca00+STD_BETA_DEM,0x08ff
117 #define wroteDEMChannelActiveNone     0xca00+STD_BETA_DEM,0x0900
118 #define wroteDEMChannelActiveLeftRght 0xca00+STD_BETA_DEM,0x0903
119 #define wroteDEMChannelActiveLSurRSur 0xca00+STD_BETA_DEM,0x0918
120 #define wroteDEMChannelActiveLBakRBak 0xca00+STD_BETA_DEM,0x0960
121 #define wroteDEMChannelActiveCntrSubw 0xca00+STD_BETA_DEM,0x0924
122 #define wroteDEMChannelActiveAll      0xca00+STD_BETA_DEM,0x09ff
124 #elif PAF_MAXNUMCHAN == 16
126 #define writeDEMChannelEnableNone     0xcb00+STD_BETA_DEM,0x0008,0x0000
127 #define writeDEMChannelEnableLeftRght 0xcb00+STD_BETA_DEM,0x0008,0x0003
128 #define writeDEMChannelEnableLCtrRCtr 0xcb00+STD_BETA_DEM,0x0008,0x000c
129 #define writeDEMChannelEnableLWidRWid 0xcb00+STD_BETA_DEM,0x0008,0x0030
130 #define writeDEMChannelEnableLOvrROvr 0xcb00+STD_BETA_DEM,0x0008,0x00c0
132 #define writeDEMChannelEnableLTrrRTrr 0xcb00+STD_BETA_DEM,0x0008,0x00c0
133 #define writeDEMChannelEnableLTrhRTrh 0xcb00+STD_BETA_DEM,0x0008,0x00c0
135 #define writeDEMChannelEnableLSurRSur 0xcb00+STD_BETA_DEM,0x0008,0x0300
136 #define writeDEMChannelEnableLBakRBak 0xcb00+STD_BETA_DEM,0x0008,0x0c00
137 #define writeDEMChannelEnableLSubRSub 0xcb00+STD_BETA_DEM,0x0008,0x3000
138 #define writeDEMChannelEnableLHedRHed 0xcb00+STD_BETA_DEM,0x0008,0xc000
140 #define writeDEMChannelEnableLTmdRTmd 0xcb00+STD_BETA_DEM,0x0008,0xc000
141 #define writeDEMChannelEnableLTftRTft 0xcb00+STD_BETA_DEM,0x0008,0xc000
142 #define writeDEMChannelEnableLTfhRTfh 0xcb00+STD_BETA_DEM,0x0008,0xc000
144 #define writeDEMChannelEnableAll      0xcb00+STD_BETA_DEM,0x0008,0xffff
146 #define wroteDEMChannelActiveNone     0xcb00+STD_BETA_DEM,0x000a,0x0000
147 #define wroteDEMChannelActiveLeftRght 0xcb00+STD_BETA_DEM,0x000a,0x0003
148 #define wroteDEMChannelActiveLCtrRCtr 0xcb00+STD_BETA_DEM,0x000a,0x000c
149 #define wroteDEMChannelActiveLWidRWid 0xcb00+STD_BETA_DEM,0x000a,0x0030
150 #define wroteDEMChannelActiveLOvrROvr 0xcb00+STD_BETA_DEM,0x000a,0x00c0
152 #define wroteDEMChannelActiveLTrrRTrr 0xcb00+STD_BETA_DEM,0x000a,0x00c0
153 #define wroteDEMChannelActiveLTrhRTrh 0xcb00+STD_BETA_DEM,0x000a,0x00c0
155 #define wroteDEMChannelActiveLSurRSur 0xcb00+STD_BETA_DEM,0x000a,0x0300
156 #define wroteDEMChannelActiveLBakRBak 0xcb00+STD_BETA_DEM,0x000a,0x0c00
157 #define wroteDEMChannelActiveLSubRSub 0xcb00+STD_BETA_DEM,0x000a,0x3000
158 #define wroteDEMChannelActiveLHedRHed 0xcb00+STD_BETA_DEM,0x000a,0xc000
160 #define wroteDEMChannelActiveLTmdRTmd 0xcb00+STD_BETA_DEM,0x000a,0xc000
161 #define wroteDEMChannelActiveLTftRTft 0xcb00+STD_BETA_DEM,0x000a,0xc000
162 #define wroteDEMChannelActiveLTfhRTfh 0xcb00+STD_BETA_DEM,0x000a,0xc000
164 #define wroteDEMChannelActiveAll      0xcb00+STD_BETA_DEM,0x000a,0xffff
166 #elif PAF_MAXNUMCHAN == 32
168 #define writeDEMChannelEnableAll      0xcc00+STD_BETA_DEM,0x0008,0xffff,0xffff
169 #define wroteDEMChannelActiveAll      0xcc00+STD_BETA_DEM,0x000c,0xffff,0xffff
171 #else /* PAF_MAXNUMCHAN */
172 #error unsupported option: PAF_MAXNUMCHAN > 32
173 #endif /* PAF_MAXNUMCHAN */
175 #define  readDEMStatus 0xc508,STD_BETA_DEM
176 #define  readDEMControl \
177          readDEMMode, \
178          readDEMFilterMode, \
179          readDEMChannelEnable
181 #endif /* _DEM_A */