Some cleanup after addition of TRIM support.
[dragonfly.git] / sys / dev / sound / pci / gnu / csaimg.h
1 /*-
2  ****************************************************************************
3  * "CWCIMAGE.H"-- For CS46XX. Ver 1.04
4  *      Copyright 1998-2001 (c) Cirrus Logic Corp.
5  *      Version 1.04
6  *
7  *     This program is free software; you can redistribute it and/or
8  *     modify it under the terms of the GNU General Public License as
9  *     published by the Free Software Foundation; either version 2 of
10  *     the License, or (at your option) any later version.
11  *
12  *     This program is distributed in the hope that it will be useful,
13  *     but WITHOUT ANY WARRANTY; without even the implied warranty of
14  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  *     GNU General Public License for more details.
16  *
17  *     You should have received a copy of the GNU General Public
18  *     License along with this program; if not, write to the Free
19  *     Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139,
20  *     USA.
21  *
22  * $FreeBSD: src/sys/gnu/dev/sound/pci/csaimg.h,v 1.2 2005/01/06 18:27:30 imp Exp $
23  * $DragonFly: src/sys/dev/sound/pci/gnu/csaimg.h,v 1.3 2007/01/04 21:47:03 corecode Exp $
24  *
25  ***************************************************************************/
26
27 #ifndef __CS_IMAGE_H
28 #define __CS_IMAGE_H
29
30 #define CLEAR__COUNT     3
31 #define FILL__COUNT      4
32 #define BA1__DWORD_SIZE  13*1024+512
33
34 static struct
35 {
36         unsigned BA1__DestByteOffset;
37         unsigned BA1__SourceSize;
38 } ClrStat[CLEAR__COUNT] ={ {0x00000000, 0x00003000 },
39                            {0x00010000, 0x00003800 },
40                            {0x00020000, 0x00007000 } };
41
42 static u_int32_t FillArray1[]={
43 0x00000000,0x00000000,0x00000000,0x00000000,
44 0x00000000,0x00000000,0x00000000,0x00000000,
45 0x00000000,0x00000000,0x00000163,0x00000000,
46 0x00000000,0x00000000,0x00000000,0x00000000,
47 0x00000000,0x00000000,0x00000000,0x00000000,
48 0x00000000,0x00000000,0x00000000,0x00000000,
49 0x00000000,0x00200040,0x00008010,0x00000000,
50 0x00000000,0x80000001,0x00000001,0x00060000,
51 0x00000000,0x00000000,0x00000000,0x00000000,
52 0x00000000,0x00000000,0x00000000,0x00000000,
53 0x00000000,0x00900080,0x00000173,0x00000000,
54 0x00000000,0x00000010,0x00800000,0x00900000,
55 0xf2c0000f,0x00000200,0x00000000,0x00010600,
56 0x00000000,0x00000000,0x00000000,0x00000000,
57 0x00000000,0x00000000,0x00000163,0x330300c2,
58 0x06000000,0x00000000,0x80008000,0x80008000,
59 0x3fc0000f,0x00000301,0x00010400,0x00000000,
60 0x00000000,0x00000000,0x00000000,0x00000000,
61 0x00000000,0x00b00000,0x00d0806d,0x330480c3,
62 0x04800000,0x00000001,0x00800001,0x0000ffff,
63 0x00000000,0x00000000,0x00000000,0x00000000,
64 0x00000000,0x00000000,0x00000000,0x00000000,
65 0x00000000,0x00000000,0x00000000,0x00000000,
66 0x00000000,0x00000000,0x00000000,0x00000000,
67 0x00000000,0x00000000,0x00000000,0x00000000,
68 0x00000000,0x00000000,0x00000000,0x00000000,
69 0x00000000,0x00000000,0x00000000,0x00000000,
70 0x00000000,0x00000000,0x00000000,0x00000000,
71 0x066a0600,0x06350070,0x0000929d,0x929d929d,
72 0x00000000,0x0000735a,0x00000600,0x00000000,
73 0x929d735a,0x00000000,0x00010000,0x735a735a,
74 0xa431ac75,0xa431ac75,0xa431ac75,0xa431ac75,
75 0x00000000,0x00000000,0x00000000,0x00000000,
76 0x00000000,0x00000000,0x00000000,0x00000000,
77 0x00000000,0x00000000,0x0000804f,0x000000c3,
78 0x05000000,0x00a00010,0x00000000,0x80008000,
79 0x00000000,0x00000000,0x00000700,0x00000000,
80 0x00000000,0x00000000,0x00000000,0x00000000,
81 0x00000080,0x00a00000,0x0000809a,0x000000c2,
82 0x07400000,0x00000000,0x80008000,0xffffffff,
83 0x00c80028,0x00005555,0x00000000,0x000107a0,
84 0x00c80028,0x000000c2,0x06800000,0x00000000,
85 0x06e00080,0x00300000,0x000080bb,0x000000c9,
86 0x07a00000,0x04000000,0x80008000,0xffffffff,
87 0x00c80028,0x00005555,0x00000000,0x00000780,
88 0x00c80028,0x000000c5,0xff800000,0x00000000,
89 0x00640080,0x00c00000,0x00008197,0x000000c9,
90 0x07800000,0x04000000,0x80008000,0xffffffff,
91 0x00000000,0x00000000,0x00000000,0x00000000,
92 0x00000000,0x00000000,0x00000000,0x00000000,
93 0x00000000,0x00000000,0x0000805e,0x000000c1,
94 0x00000000,0x00800000,0x80008000,0x80008000,
95 0x00020000,0x0000ffff,0x00000000,0x00000000};
96
97 static u_int32_t FillArray2[]={
98 0x929d0600,0x929d929d,0x929d929d,0x929d0000,
99 0x929d929d,0x929d929d,0x929d929d,0x929d929d,
100 0x929d929d,0x00100635,0x060b013f,0x00000004,
101 0x00000001,0x007a0002,0x00000000,0x066e0610,
102 0x0105929d,0x929d929d,0x929d929d,0x929d929d,
103 0x929d929d,0xa431ac75,0x0001735a,0xa431ac75,
104 0xa431ac75,0xa431ac75,0xa431ac75,0xa431ac75,
105 0xa431ac75,0xa431ac75,0xa431ac75,0xa431ac75,
106 0xa431ac75,0xa431ac75,0xa431ac75,0xa431ac75,
107 0xa431ac75,0xa431ac75,0xa431ac75,0xa431ac75,
108 0xa431ac75,0xa431ac75,0xa431ac75,0xa431ac75,
109 0xa431ac75,0xa431ac75,0xa431ac75,0xa431ac75,
110 0xa431ac75,0xa431ac75,0xa431ac75,0x735a0051,
111 0x00000000,0x929d929d,0x929d929d,0x929d929d,
112 0x929d929d,0x929d929d,0x929d929d,0x929d929d,
113 0x929d929d,0x929d929d,0x00000000,0x06400136,
114 0x0000270f,0x00010000,0x007a0000,0x00000000,
115 0x068e0645,0x0105929d,0x929d929d,0x929d929d,
116 0x929d929d,0x929d929d,0xa431ac75,0x0001735a,
117 0xa431ac75,0xa431ac75,0xa431ac75,0xa431ac75,
118 0xa431ac75,0xa431ac75,0xa431ac75,0xa431ac75,
119 0xa431ac75,0xa431ac75,0xa431ac75,0xa431ac75,
120 0xa431ac75,0xa431ac75,0xa431ac75,0xa431ac75,
121 0xa431ac75,0xa431ac75,0xa431ac75,0xa431ac75,
122 0xa431ac75,0xa431ac75,0xa431ac75,0xa431ac75,
123 0xa431ac75,0xa431ac75,0xa431ac75,0xa431ac75,
124 0x735a0100,0x00000000,0x00000000,0x00000000};
125
126 static u_int32_t FillArray3[]={
127 0x00000000,0x00000000,0x00000000,0x00010004};
128
129 static u_int32_t FillArray4[]={
130 0x00040730,0x00001002,0x000f619e,0x00001003,
131 0x00001705,0x00001400,0x000a411e,0x00001003,
132 0x00040730,0x00001002,0x000f619e,0x00001003,
133 0x00009705,0x00001400,0x000a411e,0x00001003,
134 0x00040730,0x00001002,0x000f619e,0x00001003,
135 0x00011705,0x00001400,0x000a411e,0x00001003,
136 0x00040730,0x00001002,0x000f619e,0x00001003,
137 0x00019705,0x00001400,0x000a411e,0x00001003,
138 0x00040730,0x00001002,0x000f619e,0x00001003,
139 0x00021705,0x00001400,0x000a411e,0x00001003,
140 0x00040730,0x00001002,0x000f619e,0x00001003,
141 0x00029705,0x00001400,0x000a411e,0x00001003,
142 0x00040730,0x00001002,0x000f619e,0x00001003,
143 0x00031705,0x00001400,0x000a411e,0x00001003,
144 0x00040730,0x00001002,0x000f619e,0x00001003,
145 0x00039705,0x00001400,0x000a411e,0x00001003,
146 0x000fe19e,0x00001003,0x0009c730,0x00001003,
147 0x0008e19c,0x00001003,0x000083c1,0x00093040,
148 0x00098730,0x00001002,0x000ee19e,0x00001003,
149 0x00009705,0x00001400,0x000a211e,0x00001003,
150 0x00098730,0x00001002,0x000ee19e,0x00001003,
151 0x00011705,0x00001400,0x000a211e,0x00001003,
152 0x00098730,0x00001002,0x000ee19e,0x00001003,
153 0x00019705,0x00001400,0x000a211e,0x00001003,
154 0x00098730,0x00001002,0x000ee19e,0x00001003,
155 0x00021705,0x00001400,0x000a211e,0x00001003,
156 0x00098730,0x00001002,0x000ee19e,0x00001003,
157 0x00029705,0x00001400,0x000a211e,0x00001003,
158 0x00098730,0x00001002,0x000ee19e,0x00001003,
159 0x00031705,0x00001400,0x000a211e,0x00001003,
160 0x00098730,0x00001002,0x000ee19e,0x00001003,
161 0x00039705,0x00001400,0x000a211e,0x00001003,
162 0x0000a730,0x00001008,0x000e2730,0x00001002,
163 0x0000a731,0x00001002,0x0000a731,0x00001002,
164 0x0000a731,0x00001002,0x0000a731,0x00001002,
165 0x0000a731,0x00001002,0x0000a731,0x00001002,
166 0x00000000,0x00000000,0x000f619c,0x00001003,
167 0x0007f801,0x000c0000,0x00000037,0x00001000,
168 0x00000000,0x00000000,0x00000000,0x00000000,
169 0x00000000,0x00000000,0x00000000,0x00000000,
170 0x00000000,0x000c0000,0x00000000,0x00000000,
171 0x0000373c,0x00001000,0x00000000,0x00000000,
172 0x000ee19c,0x00001003,0x0007f801,0x000c0000,
173 0x00000037,0x00001000,0x00000000,0x00000000,
174 0x00000000,0x00000000,0x00000000,0x00000000,
175 0x00000000,0x00000000,0x0000273c,0x00001000,
176 0x00000033,0x00001000,0x000e679e,0x00001003,
177 0x00007705,0x00001400,0x000ac71e,0x00001003,
178 0x00087fc1,0x000c3be0,0x0007f801,0x000c0000,
179 0x00000037,0x00001000,0x00000000,0x00000000,
180 0x00000000,0x00000000,0x00000000,0x00000000,
181 0x00000000,0x00000000,0x0000a730,0x00001003,
182 0x00000033,0x00001000,0x0007f801,0x000c0000,
183 0x00000037,0x00001000,0x00000000,0x00000000,
184 0x00000000,0x00000000,0x00000000,0x00000000,
185 0x00000000,0x00000000,0x00000000,0x000c0000,
186 0x00000032,0x00001000,0x0000273d,0x00001000,
187 0x0004a730,0x00001003,0x00000f41,0x00097140,
188 0x0000a841,0x0009b240,0x0000a0c1,0x0009f040,
189 0x0001c641,0x00093540,0x0001cec1,0x0009b5c0,
190 0x00000000,0x00000000,0x0001bf05,0x0003fc40,
191 0x00002725,0x000aa400,0x00013705,0x00093a00,
192 0x0000002e,0x0009d6c0,0x00038630,0x00001004,
193 0x0004ef0a,0x000eb785,0x0003fc8a,0x00000000,
194 0x00000000,0x000c70e0,0x0007d182,0x0002c640,
195 0x00000630,0x00001004,0x000799b8,0x0002c6c0,
196 0x00031705,0x00092240,0x00039f05,0x000932c0,
197 0x0003520a,0x00000000,0x00040731,0x0000100b,
198 0x00010705,0x000b20c0,0x00000000,0x000eba44,
199 0x00032108,0x000c60c4,0x00065208,0x000c2917,
200 0x000406b0,0x00001007,0x00012f05,0x00036880,
201 0x0002818e,0x000c0000,0x0004410a,0x00000000,
202 0x00040630,0x00001007,0x00029705,0x000c0000,
203 0x00000000,0x00000000,0x00003fc1,0x0003fc40,
204 0x000037c1,0x00091b40,0x00003fc1,0x000911c0,
205 0x000037c1,0x000957c0,0x00003fc1,0x000951c0,
206 0x000037c1,0x00000000,0x00003fc1,0x000991c0,
207 0x000037c1,0x00000000,0x00003fc1,0x0009d1c0,
208 0x000037c1,0x00000000,0x0001ccc1,0x000915c0,
209 0x0001c441,0x0009d800,0x0009cdc1,0x00091240,
210 0x0001c541,0x00091d00,0x0009cfc1,0x00095240,
211 0x0001c741,0x00095c80,0x000e8ca9,0x00099240,
212 0x000e85ad,0x00095640,0x00069ca9,0x00099d80,
213 0x000e952d,0x00099640,0x000eaca9,0x0009d6c0,
214 0x000ea5ad,0x00091a40,0x0006bca9,0x0009de80,
215 0x000eb52d,0x00095a40,0x000ecca9,0x00099ac0,
216 0x000ec5ad,0x0009da40,0x000edca9,0x0009d300,
217 0x000a6e0a,0x00001000,0x000ed52d,0x00091e40,
218 0x000eeca9,0x00095ec0,0x000ee5ad,0x00099e40,
219 0x0006fca9,0x00002500,0x000fb208,0x000c59a0,
220 0x000ef52d,0x0009de40,0x00068ca9,0x000912c1,
221 0x000683ad,0x00095241,0x00020f05,0x000991c1,
222 0x00000000,0x00000000,0x00086f88,0x00001000,
223 0x0009cf81,0x000b5340,0x0009c701,0x000b92c0,
224 0x0009de81,0x000bd300,0x0009d601,0x000b1700,
225 0x0001fd81,0x000b9d80,0x0009f501,0x000b57c0,
226 0x000a0f81,0x000bd740,0x00020701,0x000b5c80,
227 0x000a1681,0x000b97c0,0x00021601,0x00002500,
228 0x000a0701,0x000b9b40,0x000a0f81,0x000b1bc0,
229 0x00021681,0x00002d00,0x00020f81,0x000bd800,
230 0x000a0701,0x000b5bc0,0x00021601,0x00003500,
231 0x000a0f81,0x000b5f40,0x000a0701,0x000bdbc0,
232 0x00021681,0x00003d00,0x00020f81,0x000b1d00,
233 0x000a0701,0x000b1fc0,0x00021601,0x00020500,
234 0x00020f81,0x000b1341,0x000a0701,0x000b9fc0,
235 0x00021681,0x00020d00,0x00020f81,0x000bde80,
236 0x000a0701,0x000bdfc0,0x00021601,0x00021500,
237 0x00020f81,0x000b9341,0x00020701,0x000b53c1,
238 0x00021681,0x00021d00,0x000a0f81,0x000d0380,
239 0x0000b601,0x000b15c0,0x00007b01,0x00000000,
240 0x00007b81,0x000bd1c0,0x00007b01,0x00000000,
241 0x00007b81,0x000b91c0,0x00007b01,0x000b57c0,
242 0x00007b81,0x000b51c0,0x00007b01,0x000b1b40,
243 0x00007b81,0x000b11c0,0x00087b01,0x000c3dc0,
244 0x0007e488,0x000d7e45,0x00000000,0x000d7a44,
245 0x0007e48a,0x00000000,0x00011f05,0x00084080,
246 0x00000000,0x00000000,0x00001705,0x000b3540,
247 0x00008a01,0x000bf040,0x00007081,0x000bb5c0,
248 0x00055488,0x00000000,0x0000d482,0x0003fc40,
249 0x0003fc88,0x00000000,0x0001e401,0x000b3a00,
250 0x0001ec81,0x000bd6c0,0x0004ef08,0x000eb784,
251 0x000c86b0,0x00001007,0x00008281,0x000bb240,
252 0x0000b801,0x000b7140,0x00007888,0x00000000,
253 0x0000073c,0x00001000,0x0007f188,0x000c0000,
254 0x00000000,0x00000000,0x00055288,0x000c555c,
255 0x0005528a,0x000c0000,0x0009fa88,0x000c5d00,
256 0x0000fa88,0x00000000,0x00000032,0x00001000,
257 0x0000073d,0x00001000,0x0007f188,0x000c0000,
258 0x00000000,0x00000000,0x0008c01c,0x00001003,
259 0x00002705,0x00001008,0x0008b201,0x000c1392,
260 0x0000ba01,0x00000000,0x00008731,0x00001400,
261 0x0004c108,0x000fe0c4,0x00057488,0x00000000,
262 0x000a6388,0x00001001,0x0008b334,0x000bc141,
263 0x0003020e,0x00000000,0x000886b0,0x00001008,
264 0x00003625,0x000c5dfa,0x000a638a,0x00001001,
265 0x0008020e,0x00001002,0x0008a6b0,0x00001008,
266 0x0007f301,0x00000000,0x00000000,0x00000000,
267 0x00002725,0x000a8c40,0x000000ae,0x00000000,
268 0x000d8630,0x00001008,0x00000000,0x000c74e0,
269 0x0007d182,0x0002d640,0x000a8630,0x00001008,
270 0x000799b8,0x0002d6c0,0x0000748a,0x000c3ec5,
271 0x0007420a,0x000c0000,0x00062208,0x000c4117,
272 0x00070630,0x00001009,0x00000000,0x000c0000,
273 0x0001022e,0x00000000,0x0003a630,0x00001009,
274 0x00000000,0x000c0000,0x00000036,0x00001000,
275 0x00000000,0x00000000,0x00000000,0x00000000,
276 0x00000000,0x00000000,0x00000000,0x00000000,
277 0x0002a730,0x00001008,0x0007f801,0x000c0000,
278 0x00000037,0x00001000,0x00000000,0x00000000,
279 0x00000000,0x00000000,0x00000000,0x00000000,
280 0x00000000,0x00000000,0x0002a730,0x00001008,
281 0x00000033,0x00001000,0x0002a705,0x00001008,
282 0x00007a01,0x000c0000,0x000e6288,0x000d550a,
283 0x0006428a,0x00000000,0x00060730,0x0000100a,
284 0x00000000,0x000c0000,0x00000000,0x00000000,
285 0x0007aab0,0x00034880,0x00078fb0,0x0000100b,
286 0x00057488,0x00000000,0x00033b94,0x00081140,
287 0x000183ae,0x00000000,0x000786b0,0x0000100b,
288 0x00022f05,0x000c3545,0x0000eb8a,0x00000000,
289 0x00042731,0x00001003,0x0007aab0,0x00034880,
290 0x00048fb0,0x0000100a,0x00057488,0x00000000,
291 0x00033b94,0x00081140,0x000183ae,0x00000000,
292 0x000806b0,0x0000100b,0x00022f05,0x00000000,
293 0x00007401,0x00091140,0x00048f05,0x000951c0,
294 0x00042731,0x00001003,0x0000473d,0x00001000,
295 0x000f19b0,0x000bbc47,0x00080000,0x000bffc7,
296 0x000fe19e,0x00001003,0x00000000,0x00000000,
297 0x0008e19c,0x00001003,0x000083c1,0x00093040,
298 0x00000f41,0x00097140,0x0000a841,0x0009b240,
299 0x0000a0c1,0x0009f040,0x0001c641,0x00093540,
300 0x0001cec1,0x0009b5c0,0x00000000,0x000fdc44,
301 0x00055208,0x00000000,0x00010705,0x000a2880,
302 0x0000a23a,0x00093a00,0x0003fc8a,0x000df6c5,
303 0x0004ef0a,0x000c0000,0x00012f05,0x00036880,
304 0x00065308,0x000c2997,0x000d86b0,0x0000100a,
305 0x0004410a,0x000d40c7,0x00000000,0x00000000,
306 0x00080730,0x00001004,0x00056f0a,0x000ea105,
307 0x00000000,0x00000000,0x0000473d,0x00001000,
308 0x000f19b0,0x000bbc47,0x00080000,0x000bffc7,
309 0x0000273d,0x00001000,0x00000000,0x000eba44,
310 0x00048f05,0x0000f440,0x00007401,0x0000f7c0,
311 0x00000734,0x00001000,0x00010705,0x000a6880,
312 0x00006a88,0x000c75c4,0x00000000,0x000e5084,
313 0x00000000,0x000eba44,0x00087401,0x000e4782,
314 0x00000734,0x00001000,0x00010705,0x000a6880,
315 0x00006a88,0x000c75c4,0x0007c108,0x000c0000,
316 0x0007e721,0x000bed40,0x00005f25,0x000badc0,
317 0x0003ba97,0x000beb80,0x00065590,0x000b2e00,
318 0x00033217,0x00003ec0,0x00065590,0x000b8e40,
319 0x0003ed80,0x000491c0,0x00073fb0,0x00074c80,
320 0x000283a0,0x0000100c,0x000ee388,0x00042970,
321 0x00008301,0x00021ef2,0x000b8f14,0x0000000f,
322 0x000c4d8d,0x0000001b,0x000d6dc2,0x000e06c6,
323 0x000032ac,0x000c3916,0x0004edc2,0x00074c80,
324 0x00078898,0x00001000,0x00038894,0x00000032,
325 0x000c4d8d,0x00092e1b,0x000d6dc2,0x000e06c6,
326 0x0004edc2,0x000c1956,0x0000722c,0x00034a00,
327 0x00041705,0x0009ed40,0x00058730,0x00001400,
328 0x000d7488,0x000c3a00,0x00048f05,0x00000000};
329
330 static struct
331 {   u_int32_t Offset;
332     u_int32_t Size;
333     u_int32_t *pFill;
334 } FillStat[FILL__COUNT] = {
335                             {0x00000000, sizeof(FillArray1), FillArray1},
336                             {0x00001800, sizeof(FillArray2), FillArray2},
337                             {0x000137f0, sizeof(FillArray3), FillArray3},
338                             {0x00020000, sizeof(FillArray4), FillArray4}
339                           };
340
341
342 #endif