aboutsummaryrefslogtreecommitdiffstats
path: root/sound/oss/dmasound/tas3004_tables.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/oss/dmasound/tas3004_tables.c')
-rw-r--r--sound/oss/dmasound/tas3004_tables.c301
1 files changed, 301 insertions, 0 deletions
diff --git a/sound/oss/dmasound/tas3004_tables.c b/sound/oss/dmasound/tas3004_tables.c
new file mode 100644
index 000000000000..b910e0a66775
--- /dev/null
+++ b/sound/oss/dmasound/tas3004_tables.c
@@ -0,0 +1,301 @@
1#include "tas3004.h"
2#include "tas_eq_prefs.h"
3
4static struct tas_drce_t eqp_17_1_0_drce={
5 .enable = 1,
6 .above = { .val = 3.0 * (1<<8), .expand = 0 },
7 .below = { .val = 1.0 * (1<<8), .expand = 0 },
8 .threshold = -19.12 * (1<<8),
9 .energy = 2.4 * (1<<12),
10 .attack = 0.013 * (1<<12),
11 .decay = 0.212 * (1<<12),
12};
13
14static struct tas_biquad_ctrl_t eqp_17_1_0_biquads[]={
15 { .channel = 0, .filter = 0, .data = { .coeff = { 0x0fd0d4, 0xe05e56, 0x0fd0d4, 0xe05ee1, 0x0fa234 } } },
16 { .channel = 0, .filter = 1, .data = { .coeff = { 0x0910d7, 0x088e1a, 0x030651, 0x01dcb1, 0x02c892 } } },
17 { .channel = 0, .filter = 2, .data = { .coeff = { 0x0ff895, 0xe0970b, 0x0f7f00, 0xe0970b, 0x0f7795 } } },
18 { .channel = 0, .filter = 3, .data = { .coeff = { 0x0fd1c4, 0xe1ac22, 0x0ec8cf, 0xe1ac22, 0x0e9a94 } } },
19 { .channel = 0, .filter = 4, .data = { .coeff = { 0x0f7c1c, 0xe3cc03, 0x0df786, 0xe3cc03, 0x0d73a2 } } },
20 { .channel = 0, .filter = 5, .data = { .coeff = { 0x11fb92, 0xf5a1a0, 0x073cd2, 0xf5a1a0, 0x093865 } } },
21 { .channel = 0, .filter = 6, .data = { .coeff = { 0x0e17a9, 0x068b6c, 0x08a0e5, 0x068b6c, 0x06b88e } } },
22
23 { .channel = 1, .filter = 0, .data = { .coeff = { 0x0fd0d4, 0xe05e56, 0x0fd0d4, 0xe05ee1, 0x0fa234 } } },
24 { .channel = 1, .filter = 1, .data = { .coeff = { 0x0910d7, 0x088e1a, 0x030651, 0x01dcb1, 0x02c892 } } },
25 { .channel = 1, .filter = 2, .data = { .coeff = { 0x0ff895, 0xe0970b, 0x0f7f00, 0xe0970b, 0x0f7795 } } },
26 { .channel = 1, .filter = 3, .data = { .coeff = { 0x0fd1c4, 0xe1ac22, 0x0ec8cf, 0xe1ac22, 0x0e9a94 } } },
27 { .channel = 1, .filter = 4, .data = { .coeff = { 0x0f7c1c, 0xe3cc03, 0x0df786, 0xe3cc03, 0x0d73a2 } } },
28 { .channel = 1, .filter = 5, .data = { .coeff = { 0x11fb92, 0xf5a1a0, 0x073cd2, 0xf5a1a0, 0x093865 } } },
29 { .channel = 1, .filter = 6, .data = { .coeff = { 0x0e17a9, 0x068b6c, 0x08a0e5, 0x068b6c, 0x06b88e } } }
30};
31
32static struct tas_eq_pref_t eqp_17_1_0 = {
33 .sample_rate = 44100,
34 .device_id = 0x17,
35 .output_id = TAS_OUTPUT_INTERNAL_SPKR,
36 .speaker_id = 0x00,
37
38 .drce = &eqp_17_1_0_drce,
39
40 .filter_count = 14,
41 .biquads = eqp_17_1_0_biquads
42};
43
44/* ======================================================================== */
45
46static struct tas_drce_t eqp_18_1_0_drce={
47 .enable = 1,
48 .above = { .val = 3.0 * (1<<8), .expand = 0 },
49 .below = { .val = 1.0 * (1<<8), .expand = 0 },
50 .threshold = -13.14 * (1<<8),
51 .energy = 2.4 * (1<<12),
52 .attack = 0.013 * (1<<12),
53 .decay = 0.212 * (1<<12),
54};
55
56static struct tas_biquad_ctrl_t eqp_18_1_0_biquads[]={
57 { .channel = 0, .filter = 0, .data = { .coeff = { 0x0f5514, 0xe155d7, 0x0f5514, 0xe15cfa, 0x0eb14b } } },
58 { .channel = 0, .filter = 1, .data = { .coeff = { 0x06ec33, 0x02abe3, 0x015eef, 0xf764d9, 0x03922d } } },
59 { .channel = 0, .filter = 2, .data = { .coeff = { 0x0ef5f2, 0xe67d1f, 0x0bcf37, 0xe67d1f, 0x0ac529 } } },
60 { .channel = 0, .filter = 3, .data = { .coeff = { 0x0db050, 0xe5be4d, 0x0d0c78, 0xe5be4d, 0x0abcc8 } } },
61 { .channel = 0, .filter = 4, .data = { .coeff = { 0x0f1298, 0xe64ec6, 0x0cc03e, 0xe64ec6, 0x0bd2d7 } } },
62 { .channel = 0, .filter = 5, .data = { .coeff = { 0x0c641a, 0x06537a, 0x08d155, 0x06537a, 0x053570 } } },
63 { .channel = 0, .filter = 6, .data = { .coeff = { 0x100000, 0x000000, 0x000000, 0x000000, 0x000000 } } },
64
65 { .channel = 1, .filter = 0, .data = { .coeff = { 0x0f5514, 0xe155d7, 0x0f5514, 0xe15cfa, 0x0eb14b } } },
66 { .channel = 1, .filter = 1, .data = { .coeff = { 0x06ec33, 0x02abe3, 0x015eef, 0xf764d9, 0x03922d } } },
67 { .channel = 1, .filter = 2, .data = { .coeff = { 0x0ef5f2, 0xe67d1f, 0x0bcf37, 0xe67d1f, 0x0ac529 } } },
68 { .channel = 1, .filter = 3, .data = { .coeff = { 0x0db050, 0xe5be4d, 0x0d0c78, 0xe5be4d, 0x0abcc8 } } },
69 { .channel = 1, .filter = 4, .data = { .coeff = { 0x0f1298, 0xe64ec6, 0x0cc03e, 0xe64ec6, 0x0bd2d7 } } },
70 { .channel = 1, .filter = 5, .data = { .coeff = { 0x0c641a, 0x06537a, 0x08d155, 0x06537a, 0x053570 } } },
71 { .channel = 1, .filter = 6, .data = { .coeff = { 0x100000, 0x000000, 0x000000, 0x000000, 0x000000 } } }
72};
73
74static struct tas_eq_pref_t eqp_18_1_0 = {
75 .sample_rate = 44100,
76 .device_id = 0x18,
77 .output_id = TAS_OUTPUT_INTERNAL_SPKR,
78 .speaker_id = 0x00,
79
80 .drce = &eqp_18_1_0_drce,
81
82 .filter_count = 14,
83 .biquads = eqp_18_1_0_biquads
84};
85
86/* ======================================================================== */
87
88static struct tas_drce_t eqp_1a_1_0_drce={
89 .enable = 1,
90 .above = { .val = 3.0 * (1<<8), .expand = 0 },
91 .below = { .val = 1.0 * (1<<8), .expand = 0 },
92 .threshold = -10.75 * (1<<8),
93 .energy = 2.4 * (1<<12),
94 .attack = 0.013 * (1<<12),
95 .decay = 0.212 * (1<<12),
96};
97
98static struct tas_biquad_ctrl_t eqp_1a_1_0_biquads[]={
99 { .channel = 0, .filter = 0, .data = { .coeff = { 0x0fb8fd, 0xe08e04, 0x0fb8fd, 0xe08f40, 0x0f7336 } } },
100 { .channel = 0, .filter = 1, .data = { .coeff = { 0x06371d, 0x0c6e3a, 0x06371d, 0x05bfd3, 0x031ca2 } } },
101 { .channel = 0, .filter = 2, .data = { .coeff = { 0x0fa1c0, 0xe18692, 0x0f030e, 0xe18692, 0x0ea4ce } } },
102 { .channel = 0, .filter = 3, .data = { .coeff = { 0x0fe495, 0xe17eff, 0x0f0452, 0xe17eff, 0x0ee8e7 } } },
103 { .channel = 0, .filter = 4, .data = { .coeff = { 0x100857, 0xe7e71c, 0x0e9599, 0xe7e71c, 0x0e9df1 } } },
104 { .channel = 0, .filter = 5, .data = { .coeff = { 0x0fb26e, 0x06a82c, 0x0db2b4, 0x06a82c, 0x0d6522 } } },
105 { .channel = 0, .filter = 6, .data = { .coeff = { 0x11419d, 0xf06cbf, 0x0a4f6e, 0xf06cbf, 0x0b910c } } },
106
107 { .channel = 1, .filter = 0, .data = { .coeff = { 0x0fb8fd, 0xe08e04, 0x0fb8fd, 0xe08f40, 0x0f7336 } } },
108 { .channel = 1, .filter = 1, .data = { .coeff = { 0x06371d, 0x0c6e3a, 0x06371d, 0x05bfd3, 0x031ca2 } } },
109 { .channel = 1, .filter = 2, .data = { .coeff = { 0x0fa1c0, 0xe18692, 0x0f030e, 0xe18692, 0x0ea4ce } } },
110 { .channel = 1, .filter = 3, .data = { .coeff = { 0x0fe495, 0xe17eff, 0x0f0452, 0xe17eff, 0x0ee8e7 } } },
111 { .channel = 1, .filter = 4, .data = { .coeff = { 0x100857, 0xe7e71c, 0x0e9599, 0xe7e71c, 0x0e9df1 } } },
112 { .channel = 1, .filter = 5, .data = { .coeff = { 0x0fb26e, 0x06a82c, 0x0db2b4, 0x06a82c, 0x0d6522 } } },
113 { .channel = 1, .filter = 6, .data = { .coeff = { 0x11419d, 0xf06cbf, 0x0a4f6e, 0xf06cbf, 0x0b910c } } }
114};
115
116static struct tas_eq_pref_t eqp_1a_1_0 = {
117 .sample_rate = 44100,
118 .device_id = 0x1a,
119 .output_id = TAS_OUTPUT_INTERNAL_SPKR,
120 .speaker_id = 0x00,
121
122 .drce = &eqp_1a_1_0_drce,
123
124 .filter_count = 14,
125 .biquads = eqp_1a_1_0_biquads
126};
127
128/* ======================================================================== */
129
130static struct tas_drce_t eqp_1c_1_0_drce={
131 .enable = 1,
132 .above = { .val = 3.0 * (1<<8), .expand = 0 },
133 .below = { .val = 1.0 * (1<<8), .expand = 0 },
134 .threshold = -14.34 * (1<<8),
135 .energy = 2.4 * (1<<12),
136 .attack = 0.013 * (1<<12),
137 .decay = 0.212 * (1<<12),
138};
139
140static struct tas_biquad_ctrl_t eqp_1c_1_0_biquads[]={
141 { .channel = 0, .filter = 0, .data = { .coeff = { 0x0f4f95, 0xe160d4, 0x0f4f95, 0xe1686e, 0x0ea6c5 } } },
142 { .channel = 0, .filter = 1, .data = { .coeff = { 0x066b92, 0x0290d4, 0x0148a0, 0xf6853f, 0x03bfc7 } } },
143 { .channel = 0, .filter = 2, .data = { .coeff = { 0x0f57dc, 0xe51c91, 0x0dd1cb, 0xe51c91, 0x0d29a8 } } },
144 { .channel = 0, .filter = 3, .data = { .coeff = { 0x0df1cb, 0xe4fa84, 0x0d7cdc, 0xe4fa84, 0x0b6ea7 } } },
145 { .channel = 0, .filter = 4, .data = { .coeff = { 0x0eba36, 0xe6aa48, 0x0b9f52, 0xe6aa48, 0x0a5989 } } },
146 { .channel = 0, .filter = 5, .data = { .coeff = { 0x0caf02, 0x05ef9d, 0x084beb, 0x05ef9d, 0x04faee } } },
147 { .channel = 0, .filter = 6, .data = { .coeff = { 0x0fc686, 0xe22947, 0x0e4b5d, 0xe22947, 0x0e11e4 } } },
148
149 { .channel = 1, .filter = 0, .data = { .coeff = { 0x0f4f95, 0xe160d4, 0x0f4f95, 0xe1686e, 0x0ea6c5 } } },
150 { .channel = 1, .filter = 1, .data = { .coeff = { 0x066b92, 0x0290d4, 0x0148a0, 0xf6853f, 0x03bfc7 } } },
151 { .channel = 1, .filter = 2, .data = { .coeff = { 0x0f57dc, 0xe51c91, 0x0dd1cb, 0xe51c91, 0x0d29a8 } } },
152 { .channel = 1, .filter = 3, .data = { .coeff = { 0x0df1cb, 0xe4fa84, 0x0d7cdc, 0xe4fa84, 0x0b6ea7 } } },
153 { .channel = 1, .filter = 4, .data = { .coeff = { 0x0eba36, 0xe6aa48, 0x0b9f52, 0xe6aa48, 0x0a5989 } } },
154 { .channel = 1, .filter = 5, .data = { .coeff = { 0x0caf02, 0x05ef9d, 0x084beb, 0x05ef9d, 0x04faee } } },
155 { .channel = 1, .filter = 6, .data = { .coeff = { 0x0fc686, 0xe22947, 0x0e4b5d, 0xe22947, 0x0e11e4 } } }
156};
157
158static struct tas_eq_pref_t eqp_1c_1_0 = {
159 .sample_rate = 44100,
160 .device_id = 0x1c,
161 .output_id = TAS_OUTPUT_INTERNAL_SPKR,
162 .speaker_id = 0x00,
163
164 .drce = &eqp_1c_1_0_drce,
165
166 .filter_count = 14,
167 .biquads = eqp_1c_1_0_biquads
168};
169
170/* ======================================================================== */
171
172static uint tas3004_master_tab[]={
173 0x0, 0x75, 0x9c, 0xbb,
174 0xdb, 0xfb, 0x11e, 0x143,
175 0x16b, 0x196, 0x1c3, 0x1f5,
176 0x229, 0x263, 0x29f, 0x2e1,
177 0x328, 0x373, 0x3c5, 0x41b,
178 0x478, 0x4dc, 0x547, 0x5b8,
179 0x633, 0x6b5, 0x740, 0x7d5,
180 0x873, 0x91c, 0x9d2, 0xa92,
181 0xb5e, 0xc39, 0xd22, 0xe19,
182 0xf20, 0x1037, 0x1161, 0x129e,
183 0x13ed, 0x1551, 0x16ca, 0x185d,
184 0x1a08, 0x1bcc, 0x1dac, 0x1fa7,
185 0x21c1, 0x23fa, 0x2655, 0x28d6,
186 0x2b7c, 0x2e4a, 0x3141, 0x3464,
187 0x37b4, 0x3b35, 0x3ee9, 0x42d3,
188 0x46f6, 0x4b53, 0x4ff0, 0x54ce,
189 0x59f2, 0x5f5f, 0x6519, 0x6b24,
190 0x7183, 0x783c, 0x7f53, 0x86cc,
191 0x8ead, 0x96fa, 0x9fba, 0xa8f2,
192 0xb2a7, 0xbce1, 0xc7a5, 0xd2fa,
193 0xdee8, 0xeb75, 0xf8aa, 0x1068e,
194 0x1152a, 0x12487, 0x134ad, 0x145a5,
195 0x1577b, 0x16a37, 0x17df5, 0x192bd,
196 0x1a890, 0x1bf7b, 0x1d78d, 0x1f0d1,
197 0x20b55, 0x22727, 0x24456, 0x262f2,
198 0x2830b
199};
200
201static uint tas3004_mixer_tab[]={
202 0x0, 0x748, 0x9be, 0xbaf,
203 0xda4, 0xfb1, 0x11de, 0x1431,
204 0x16ad, 0x1959, 0x1c37, 0x1f4b,
205 0x2298, 0x2628, 0x29fb, 0x2e12,
206 0x327d, 0x3734, 0x3c47, 0x41b4,
207 0x4787, 0x4dbe, 0x546d, 0x5b86,
208 0x632e, 0x6b52, 0x7400, 0x7d54,
209 0x873b, 0x91c6, 0x9d1a, 0xa920,
210 0xb5e5, 0xc38c, 0xd21b, 0xe18f,
211 0xf1f5, 0x1036a, 0x1160f, 0x129d6,
212 0x13ed0, 0x1550c, 0x16ca0, 0x185c9,
213 0x1a07b, 0x1bcc3, 0x1dab9, 0x1fa75,
214 0x21c0f, 0x23fa3, 0x26552, 0x28d64,
215 0x2b7c9, 0x2e4a2, 0x31411, 0x3463b,
216 0x37b44, 0x3b353, 0x3ee94, 0x42d30,
217 0x46f55, 0x4b533, 0x4fefc, 0x54ce5,
218 0x59f25, 0x5f5f6, 0x65193, 0x6b23c,
219 0x71835, 0x783c3, 0x7f52c, 0x86cc0,
220 0x8eacc, 0x96fa5, 0x9fba0, 0xa8f1a,
221 0xb2a71, 0xbce0a, 0xc7a4a, 0xd2fa0,
222 0xdee7b, 0xeb752, 0xf8a9f, 0x1068e4,
223 0x1152a3, 0x12486a, 0x134ac8, 0x145a55,
224 0x1577ac, 0x16a370, 0x17df51, 0x192bc2,
225 0x1a88f8, 0x1bf7b7, 0x1d78c9, 0x1f0d04,
226 0x20b542, 0x227268, 0x244564, 0x262f26,
227 0x2830af
228};
229
230static uint tas3004_treble_tab[]={
231 0x96, 0x95, 0x95, 0x94,
232 0x93, 0x92, 0x92, 0x91,
233 0x90, 0x90, 0x8f, 0x8e,
234 0x8d, 0x8d, 0x8c, 0x8b,
235 0x8a, 0x8a, 0x89, 0x88,
236 0x88, 0x87, 0x86, 0x85,
237 0x85, 0x84, 0x83, 0x83,
238 0x82, 0x81, 0x80, 0x80,
239 0x7f, 0x7e, 0x7e, 0x7d,
240 0x7c, 0x7b, 0x7b, 0x7a,
241 0x79, 0x78, 0x78, 0x77,
242 0x76, 0x76, 0x75, 0x74,
243 0x73, 0x73, 0x72, 0x71,
244 0x71, 0x68, 0x45, 0x5b,
245 0x6d, 0x6c, 0x6b, 0x6a,
246 0x69, 0x68, 0x67, 0x66,
247 0x65, 0x63, 0x62, 0x62,
248 0x60, 0x5e, 0x5c, 0x5b,
249 0x59, 0x57, 0x55, 0x53,
250 0x52, 0x4f, 0x4d, 0x4a,
251 0x48, 0x46, 0x43, 0x40,
252 0x3d, 0x3a, 0x36, 0x33,
253 0x2f, 0x2c, 0x27, 0x23,
254 0x1f, 0x1a, 0x15, 0xf,
255 0x8, 0x5, 0x2, 0x1,
256 0x1
257};
258
259static uint tas3004_bass_tab[]={
260 0x96, 0x95, 0x95, 0x94,
261 0x93, 0x92, 0x92, 0x91,
262 0x90, 0x90, 0x8f, 0x8e,
263 0x8d, 0x8d, 0x8c, 0x8b,
264 0x8a, 0x8a, 0x89, 0x88,
265 0x88, 0x87, 0x86, 0x85,
266 0x85, 0x84, 0x83, 0x83,
267 0x82, 0x81, 0x80, 0x80,
268 0x7f, 0x7e, 0x7e, 0x7d,
269 0x7c, 0x7b, 0x7b, 0x7a,
270 0x79, 0x78, 0x78, 0x77,
271 0x76, 0x76, 0x75, 0x74,
272 0x73, 0x73, 0x72, 0x71,
273 0x70, 0x6f, 0x6e, 0x6d,
274 0x6c, 0x6b, 0x6a, 0x6a,
275 0x69, 0x67, 0x66, 0x66,
276 0x65, 0x63, 0x62, 0x62,
277 0x61, 0x60, 0x5e, 0x5d,
278 0x5b, 0x59, 0x57, 0x55,
279 0x53, 0x51, 0x4f, 0x4c,
280 0x4a, 0x48, 0x46, 0x44,
281 0x41, 0x3e, 0x3b, 0x38,
282 0x36, 0x33, 0x2f, 0x2b,
283 0x28, 0x24, 0x20, 0x1c,
284 0x17, 0x12, 0xd, 0x7,
285 0x1
286};
287
288struct tas_gain_t tas3004_gain={
289 .master = tas3004_master_tab,
290 .treble = tas3004_treble_tab,
291 .bass = tas3004_bass_tab,
292 .mixer = tas3004_mixer_tab
293};
294
295struct tas_eq_pref_t *tas3004_eq_prefs[]={
296 &eqp_17_1_0,
297 &eqp_18_1_0,
298 &eqp_1a_1_0,
299 &eqp_1c_1_0,
300 NULL
301};