1 /*
2  * Copyright (C) 2004-2010 NXP Software
3  * Copyright (C) 2010 The Android Open Source Project
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  *      http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17 
18 #ifndef __LVDBE_COEFFS_H__
19 #define __LVDBE_COEFFS_H__
20 
21 /************************************************************************************/
22 /*                                                                                  */
23 /* General                                                                          */
24 /*                                                                                  */
25 /************************************************************************************/
26 
27 #define LVDBE_SCALESHIFT                                    10         /* As a power of 2 */
28 
29 /************************************************************************************/
30 /*                                                                                  */
31 /* High Pass Filter coefficients                                                    */
32 /*                                                                                  */
33 /************************************************************************************/
34 
35  /* Coefficients for centre frequency 55Hz */
36 #define HPF_Fs8000_Fc55_A0                        0.958849f
37 #define HPF_Fs8000_Fc55_A1                        (-1.917698f)
38 #define HPF_Fs8000_Fc55_A2                        0.958849f
39 #define HPF_Fs8000_Fc55_B1                        (-1.939001f)
40 #define HPF_Fs8000_Fc55_B2                        0.940807f
41 #define HPF_Fs11025_Fc55_A0                       0.966909f
42 #define HPF_Fs11025_Fc55_A1                       (-1.933818f)
43 #define HPF_Fs11025_Fc55_A2                       0.966909f
44 #define HPF_Fs11025_Fc55_B1                       (-1.955732f)
45 #define HPF_Fs11025_Fc55_B2                       0.956690f
46 #define HPF_Fs12000_Fc55_A0                       0.968650f
47 #define HPF_Fs12000_Fc55_A1                       (-1.937300f)
48 #define HPF_Fs12000_Fc55_A2                       0.968650f
49 #define HPF_Fs12000_Fc55_B1                       (-1.959327f)
50 #define HPF_Fs12000_Fc55_B2                       0.960138f
51 #define HPF_Fs16000_Fc55_A0                       0.973588f
52 #define HPF_Fs16000_Fc55_A1                       (-1.947176f)
53 #define HPF_Fs16000_Fc55_A2                       0.973588f
54 #define HPF_Fs16000_Fc55_B1                       (-1.969494f)
55 #define HPF_Fs16000_Fc55_B2                       0.969952f
56 #define HPF_Fs22050_Fc55_A0                       0.977671f
57 #define HPF_Fs22050_Fc55_A1                       (-1.955343f)
58 #define HPF_Fs22050_Fc55_A2                       0.977671f
59 #define HPF_Fs22050_Fc55_B1                       (-1.977863f)
60 #define HPF_Fs22050_Fc55_B2                       0.978105f
61 #define HPF_Fs24000_Fc55_A0                       0.978551f
62 #define HPF_Fs24000_Fc55_A1                       (-1.957102f)
63 #define HPF_Fs24000_Fc55_A2                       0.978551f
64 #define HPF_Fs24000_Fc55_B1                       (-1.979662f)
65 #define HPF_Fs24000_Fc55_B2                       0.979866f
66 #define HPF_Fs32000_Fc55_A0                       0.981042f
67 #define HPF_Fs32000_Fc55_A1                       (-1.962084f)
68 #define HPF_Fs32000_Fc55_A2                       0.981042f
69 #define HPF_Fs32000_Fc55_B1                       (-1.984746f)
70 #define HPF_Fs32000_Fc55_B2                       0.984861f
71 #define HPF_Fs44100_Fc55_A0                       0.983097f
72 #define HPF_Fs44100_Fc55_A1                       (-1.966194f)
73 #define HPF_Fs44100_Fc55_A2                       0.983097f
74 #define HPF_Fs44100_Fc55_B1                       (-1.988931f)
75 #define HPF_Fs44100_Fc55_B2                       0.988992f
76 #define HPF_Fs48000_Fc55_A0                       0.983539f
77 #define HPF_Fs48000_Fc55_A1                       (-1.967079f)
78 #define HPF_Fs48000_Fc55_A2                       0.983539f
79 #define HPF_Fs48000_Fc55_B1                       (-1.989831f)
80 #define HPF_Fs48000_Fc55_B2                       0.989882f
81 
82 #define HPF_Fs88200_Fc55_A0                       0.985818f
83 #define HPF_Fs88200_Fc55_A1                       (-1.971636f)
84 #define HPF_Fs88200_Fc55_A2                       0.985818f
85 #define HPF_Fs88200_Fc55_B1                       (-1.994466f)
86 #define HPF_Fs88200_Fc55_B2                       0.994481f
87 
88 #define HPF_Fs96000_Fc55_A0                       0.986040f
89 #define HPF_Fs96000_Fc55_A1                       (-1.972080f)
90 #define HPF_Fs96000_Fc55_A2                       0.986040f
91 #define HPF_Fs96000_Fc55_B1                       (-1.994915f)
92 #define HPF_Fs96000_Fc55_B2                       0.994928f
93 
94 #define HPF_Fs176400_Fc55_A0                      0.987183f
95 #define HPF_Fs176400_Fc55_A1                      (-1.974366f)
96 #define HPF_Fs176400_Fc55_A2                      0.987183f
97 #define HPF_Fs176400_Fc55_B1                      (-1.997233f)
98 #define HPF_Fs176400_Fc55_B2                      0.997237f
99 
100 #define HPF_Fs192000_Fc55_A0                      0.987294f
101 #define HPF_Fs192000_Fc55_A1                      (-1.974588f)
102 #define HPF_Fs192000_Fc55_A2                      0.987294f
103 #define HPF_Fs192000_Fc55_B1                      (-1.997458f)
104 #define HPF_Fs192000_Fc55_B2                      0.997461f
105 
106  /* Coefficients for centre frequency 66Hz */
107 #define HPF_Fs8000_Fc66_A0                        0.953016f
108 #define HPF_Fs8000_Fc66_A1                        (-1.906032f)
109 #define HPF_Fs8000_Fc66_A2                        0.953016f
110 #define HPF_Fs8000_Fc66_B1                        (-1.926810f)
111 #define HPF_Fs8000_Fc66_B2                        0.929396f
112 #define HPF_Fs11025_Fc66_A0                       0.962638f
113 #define HPF_Fs11025_Fc66_A1                       (-1.925275f)
114 #define HPF_Fs11025_Fc66_A2                       0.962638f
115 #define HPF_Fs11025_Fc66_B1                       (-1.946881f)
116 #define HPF_Fs11025_Fc66_B2                       0.948256f
117 #define HPF_Fs12000_Fc66_A0                       0.964718f
118 #define HPF_Fs12000_Fc66_A1                       (-1.929435f)
119 #define HPF_Fs12000_Fc66_A2                       0.964718f
120 #define HPF_Fs12000_Fc66_B1                       (-1.951196f)
121 #define HPF_Fs12000_Fc66_B2                       0.952359f
122 #define HPF_Fs16000_Fc66_A0                       0.970622f
123 #define HPF_Fs16000_Fc66_A1                       (-1.941244f)
124 #define HPF_Fs16000_Fc66_A2                       0.970622f
125 #define HPF_Fs16000_Fc66_B1                       (-1.963394f)
126 #define HPF_Fs16000_Fc66_B2                       0.964052f
127 #define HPF_Fs22050_Fc66_A0                       0.975509f
128 #define HPF_Fs22050_Fc66_A1                       (-1.951019f)
129 #define HPF_Fs22050_Fc66_A2                       0.975509f
130 #define HPF_Fs22050_Fc66_B1                       (-1.973436f)
131 #define HPF_Fs22050_Fc66_B2                       0.973784f
132 #define HPF_Fs24000_Fc66_A0                       0.976563f
133 #define HPF_Fs24000_Fc66_A1                       (-1.953125f)
134 #define HPF_Fs24000_Fc66_A2                       0.976563f
135 #define HPF_Fs24000_Fc66_B1                       (-1.975594f)
136 #define HPF_Fs24000_Fc66_B2                       0.975889f
137 #define HPF_Fs32000_Fc66_A0                       0.979547f
138 #define HPF_Fs32000_Fc66_A1                       (-1.959093f)
139 #define HPF_Fs32000_Fc66_A2                       0.979547f
140 #define HPF_Fs32000_Fc66_B1                       (-1.981695f)
141 #define HPF_Fs32000_Fc66_B2                       0.981861f
142 #define HPF_Fs44100_Fc66_A0                       0.982010f
143 #define HPF_Fs44100_Fc66_A1                       (-1.964019f)
144 #define HPF_Fs44100_Fc66_A2                       0.982010f
145 #define HPF_Fs44100_Fc66_B1                       (-1.986718f)
146 #define HPF_Fs44100_Fc66_B2                       0.986805f
147 #define HPF_Fs48000_Fc66_A0                       0.982540f
148 #define HPF_Fs48000_Fc66_A1                       (-1.965079f)
149 #define HPF_Fs48000_Fc66_A2                       0.982540f
150 #define HPF_Fs48000_Fc66_B1                       (-1.987797f)
151 #define HPF_Fs48000_Fc66_B2                       0.987871f
152 
153 #define HPF_Fs88200_Fc66_A0                       0.985273f
154 #define HPF_Fs88200_Fc66_A1                       (-1.970546f)
155 #define HPF_Fs88200_Fc66_A2                       0.985273f
156 #define HPF_Fs88200_Fc66_B1                       (-1.993359f)
157 #define HPF_Fs88200_Fc66_B2                       0.993381f
158 
159 #define HPF_Fs96000_Fc66_A0                       0.985539f
160 #define HPF_Fs96000_Fc66_A1                       (-1.971077f)
161 #define HPF_Fs96000_Fc66_A2                       0.985539f
162 #define HPF_Fs96000_Fc66_B1                       (-1.993898f)
163 #define HPF_Fs96000_Fc66_B2                       0.993917f
164 
165 #define HPF_Fs176400_Fc66_A0                      0.986910f
166 #define HPF_Fs176400_Fc66_A1                      (-1.973820f)
167 #define HPF_Fs176400_Fc66_A2                      0.986910f
168 #define HPF_Fs176400_Fc66_B1                      (-1.996679f)
169 #define HPF_Fs176400_Fc66_B2                      0.996685f
170 
171 #define HPF_Fs192000_Fc66_A0                      0.987043f
172 #define HPF_Fs192000_Fc66_A1                      (-1.974086f)
173 #define HPF_Fs192000_Fc66_A2                      0.987043f
174 #define HPF_Fs192000_Fc66_B1                      (-1.996949f)
175 #define HPF_Fs192000_Fc66_B2                      0.996954f
176 
177 /* Coefficients for centre frequency 78Hz */
178 #define HPF_Fs8000_Fc78_A0                        0.946693f
179 #define HPF_Fs8000_Fc78_A1                        (-1.893387f)
180 #define HPF_Fs8000_Fc78_A2                        0.946693f
181 #define HPF_Fs8000_Fc78_B1                        (-1.913517f)
182 #define HPF_Fs8000_Fc78_B2                        0.917105f
183 #define HPF_Fs11025_Fc78_A0                       0.957999f
184 #define HPF_Fs11025_Fc78_A1                       (-1.915998f)
185 #define HPF_Fs11025_Fc78_A2                       0.957999f
186 #define HPF_Fs11025_Fc78_B1                       (-1.937229f)
187 #define HPF_Fs11025_Fc78_B2                       0.939140f
188 #define HPF_Fs12000_Fc78_A0                       0.960446f
189 #define HPF_Fs12000_Fc78_A1                       (-1.920892f)
190 #define HPF_Fs12000_Fc78_A2                       0.960446f
191 #define HPF_Fs12000_Fc78_B1                       (-1.942326f)
192 #define HPF_Fs12000_Fc78_B2                       0.943944f
193 #define HPF_Fs16000_Fc78_A0                       0.967397f
194 #define HPF_Fs16000_Fc78_A1                       (-1.934794f)
195 #define HPF_Fs16000_Fc78_A2                       0.967397f
196 #define HPF_Fs16000_Fc78_B1                       (-1.956740f)
197 #define HPF_Fs16000_Fc78_B2                       0.957656f
198 #define HPF_Fs22050_Fc78_A0                       0.973156f
199 #define HPF_Fs22050_Fc78_A1                       (-1.946313f)
200 #define HPF_Fs22050_Fc78_A2                       0.973156f
201 #define HPF_Fs22050_Fc78_B1                       (-1.968607f)
202 #define HPF_Fs22050_Fc78_B2                       0.969092f
203 #define HPF_Fs24000_Fc78_A0                       0.974398f
204 #define HPF_Fs24000_Fc78_A1                       (-1.948797f)
205 #define HPF_Fs24000_Fc78_A2                       0.974398f
206 #define HPF_Fs24000_Fc78_B1                       (-1.971157f)
207 #define HPF_Fs24000_Fc78_B2                       0.971568f
208 #define HPF_Fs32000_Fc78_A0                       0.977918f
209 #define HPF_Fs32000_Fc78_A1                       (-1.955836f)
210 #define HPF_Fs32000_Fc78_A2                       0.977918f
211 #define HPF_Fs32000_Fc78_B1                       (-1.978367f)
212 #define HPF_Fs32000_Fc78_B2                       0.978599f
213 #define HPF_Fs44100_Fc78_A0                       0.980824f
214 #define HPF_Fs44100_Fc78_A1                       (-1.961649f)
215 #define HPF_Fs44100_Fc78_A2                       0.980824f
216 #define HPF_Fs44100_Fc78_B1                       (-1.984303f)
217 #define HPF_Fs44100_Fc78_B2                       0.984425f
218 #define HPF_Fs48000_Fc78_A0                       0.981450f
219 #define HPF_Fs48000_Fc78_A1                       (-1.962900f)
220 #define HPF_Fs48000_Fc78_A2                       0.981450f
221 #define HPF_Fs48000_Fc78_B1                       (-1.985578f)
222 #define HPF_Fs48000_Fc78_B2                       0.985681f
223 
224 #define HPF_Fs88200_Fc78_A0                       0.984678f
225 #define HPF_Fs88200_Fc78_A1                       (-1.969356f)
226 #define HPF_Fs88200_Fc78_A2                       0.984678f
227 #define HPF_Fs88200_Fc78_B1                       (-1.992151f)
228 #define HPF_Fs88200_Fc78_B2                       0.992182f
229 
230 #define HPF_Fs96000_Fc78_A0                       0.984992f
231 #define HPF_Fs96000_Fc78_A1                       (-1.969984f)
232 #define HPF_Fs96000_Fc78_A2                       0.984992f
233 #define HPF_Fs96000_Fc78_B1                       (-1.992789f)
234 #define HPF_Fs96000_Fc78_B2                       0.992815f
235 
236 #define HPF_Fs176400_Fc78_A0                      0.986612f
237 #define HPF_Fs176400_Fc78_A1                      (-1.973224f)
238 #define HPF_Fs176400_Fc78_A2                      0.986612f
239 #define HPF_Fs176400_Fc78_B1                      (-1.996076f)
240 #define HPF_Fs176400_Fc78_B2                      0.996083f
241 
242 #define HPF_Fs192000_Fc78_A0                      0.986769f
243 #define HPF_Fs192000_Fc78_A1                      (-1.973539f)
244 #define HPF_Fs192000_Fc78_A2                      0.986769f
245 #define HPF_Fs192000_Fc78_B1                      (-1.996394f)
246 #define HPF_Fs192000_Fc78_B2                      0.996401f
247 
248 /* Coefficients for centre frequency 90Hz */
249 #define HPF_Fs8000_Fc90_A0                       0.940412f
250 #define HPF_Fs8000_Fc90_A1                       (-1.880825f)
251 #define HPF_Fs8000_Fc90_A2                       0.940412f
252 #define HPF_Fs8000_Fc90_B1                       (-1.900231f)
253 #define HPF_Fs8000_Fc90_B2                       0.904977f
254 #define HPF_Fs11025_Fc90_A0                      0.953383f
255 #define HPF_Fs11025_Fc90_A1                      (-1.906766f)
256 #define HPF_Fs11025_Fc90_A2                      0.953383f
257 #define HPF_Fs11025_Fc90_B1                      (-1.927579f)
258 #define HPF_Fs11025_Fc90_B2                      0.930111f
259 #define HPF_Fs12000_Fc90_A0                      0.956193f
260 #define HPF_Fs12000_Fc90_A1                      (-1.912387f)
261 #define HPF_Fs12000_Fc90_A2                      0.956193f
262 #define HPF_Fs12000_Fc90_B1                      (-1.933459f)
263 #define HPF_Fs12000_Fc90_B2                      0.935603f
264 #define HPF_Fs16000_Fc90_A0                      0.964183f
265 #define HPF_Fs16000_Fc90_A1                      (-1.928365f)
266 #define HPF_Fs16000_Fc90_A2                      0.964183f
267 #define HPF_Fs16000_Fc90_B1                      (-1.950087f)
268 #define HPF_Fs16000_Fc90_B2                      0.951303f
269 #define HPF_Fs22050_Fc90_A0                      0.970809f
270 #define HPF_Fs22050_Fc90_A1                      (-1.941618f)
271 #define HPF_Fs22050_Fc90_A2                      0.970809f
272 #define HPF_Fs22050_Fc90_B1                      (-1.963778f)
273 #define HPF_Fs22050_Fc90_B2                      0.964423f
274 #define HPF_Fs24000_Fc90_A0                      0.972239f
275 #define HPF_Fs24000_Fc90_A1                      (-1.944477f)
276 #define HPF_Fs24000_Fc90_A2                      0.972239f
277 #define HPF_Fs24000_Fc90_B1                      (-1.966721f)
278 #define HPF_Fs24000_Fc90_B2                      0.967266f
279 #define HPF_Fs32000_Fc90_A0                      0.976292f
280 #define HPF_Fs32000_Fc90_A1                      (-1.952584f)
281 #define HPF_Fs32000_Fc90_A2                      0.976292f
282 #define HPF_Fs32000_Fc90_B1                      (-1.975040f)
283 #define HPF_Fs32000_Fc90_B2                      0.975347f
284 #define HPF_Fs44100_Fc90_A0                      0.979641f
285 #define HPF_Fs44100_Fc90_A1                      (-1.959282f)
286 #define HPF_Fs44100_Fc90_A2                      0.979641f
287 #define HPF_Fs44100_Fc90_B1                      (-1.981888f)
288 #define HPF_Fs44100_Fc90_B2                      0.982050f
289 #define HPF_Fs48000_Fc90_A0                      0.980362f
290 #define HPF_Fs48000_Fc90_A1                      (-1.960724f)
291 #define HPF_Fs48000_Fc90_A2                      0.980362f
292 #define HPF_Fs48000_Fc90_B1                      (-1.983359f)
293 #define HPF_Fs48000_Fc90_B2                      0.983497f
294 
295 #define HPF_Fs88200_Fc90_A0                       0.984084f
296 #define HPF_Fs88200_Fc90_A1                       (-1.968168f)
297 #define HPF_Fs88200_Fc90_A2                       0.984084f
298 #define HPF_Fs88200_Fc90_B1                       (-1.990944f)
299 #define HPF_Fs88200_Fc90_B2                       0.990985f
300 
301 #define HPF_Fs96000_Fc90_A0                       0.984446f
302 #define HPF_Fs96000_Fc90_A1                       (-1.968892f)
303 #define HPF_Fs96000_Fc90_A2                       0.984446f
304 #define HPF_Fs96000_Fc90_B1                       (-1.991680f)
305 #define HPF_Fs96000_Fc90_B2                       0.991714f
306 
307 #define HPF_Fs176400_Fc90_A0                      0.986314f
308 #define HPF_Fs176400_Fc90_A1                      (-1.972629f)
309 #define HPF_Fs176400_Fc90_A2                      0.986314f
310 #define HPF_Fs176400_Fc90_B1                      (-1.995472f)
311 #define HPF_Fs176400_Fc90_B2                      0.995482f
312 
313 #define HPF_Fs192000_Fc90_A0                      0.986496f
314 #define HPF_Fs192000_Fc90_A1                      (-1.972992f)
315 #define HPF_Fs192000_Fc90_A2                      0.986496f
316 #define HPF_Fs192000_Fc90_B1                      (-1.995840f)
317 #define HPF_Fs192000_Fc90_B2                      0.995848f
318 
319 /************************************************************************************/
320 /*                                                                                  */
321 /* Band Pass Filter coefficients                                                    */
322 /*                                                                                  */
323 /************************************************************************************/
324 
325 /* Coefficients for centre frequency 55Hz */
326 #define BPF_Fs8000_Fc55_A0                       0.009197f
327 #define BPF_Fs8000_Fc55_A1                       0.000000f
328 #define BPF_Fs8000_Fc55_A2                       (-0.009197f)
329 #define BPF_Fs8000_Fc55_B1                       (-1.979545f)
330 #define BPF_Fs8000_Fc55_B2                       0.981393f
331 #define BPF_Fs11025_Fc55_A0                      0.006691f
332 #define BPF_Fs11025_Fc55_A1                      0.000000f
333 #define BPF_Fs11025_Fc55_A2                      (-0.006691f)
334 #define BPF_Fs11025_Fc55_B1                      (-1.985488f)
335 #define BPF_Fs11025_Fc55_B2                      0.986464f
336 #define BPF_Fs12000_Fc55_A0                      0.006150f
337 #define BPF_Fs12000_Fc55_A1                      0.000000f
338 #define BPF_Fs12000_Fc55_A2                      (-0.006150f)
339 #define BPF_Fs12000_Fc55_B1                      (-1.986733f)
340 #define BPF_Fs12000_Fc55_B2                      0.987557f
341 #define BPF_Fs16000_Fc55_A0                      0.004620f
342 #define BPF_Fs16000_Fc55_A1                      0.000000f
343 #define BPF_Fs16000_Fc55_A2                      (-0.004620f)
344 #define BPF_Fs16000_Fc55_B1                      (-1.990189f)
345 #define BPF_Fs16000_Fc55_B2                      0.990653f
346 #define BPF_Fs22050_Fc55_A0                      0.003357f
347 #define BPF_Fs22050_Fc55_A1                      0.000000f
348 #define BPF_Fs22050_Fc55_A2                      (-0.003357f)
349 #define BPF_Fs22050_Fc55_B1                      (-1.992964f)
350 #define BPF_Fs22050_Fc55_B2                      0.993209f
351 #define BPF_Fs24000_Fc55_A0                      0.003085f
352 #define BPF_Fs24000_Fc55_A1                      0.000000f
353 #define BPF_Fs24000_Fc55_A2                      (-0.003085f)
354 #define BPF_Fs24000_Fc55_B1                      (-1.993552f)
355 #define BPF_Fs24000_Fc55_B2                      0.993759f
356 #define BPF_Fs32000_Fc55_A0                      0.002315f
357 #define BPF_Fs32000_Fc55_A1                      0.000000f
358 #define BPF_Fs32000_Fc55_A2                      (-0.002315f)
359 #define BPF_Fs32000_Fc55_B1                      (-1.995199f)
360 #define BPF_Fs32000_Fc55_B2                      0.995316f
361 #define BPF_Fs44100_Fc55_A0                      0.001681f
362 #define BPF_Fs44100_Fc55_A1                      0.000000f
363 #define BPF_Fs44100_Fc55_A2                      (-0.001681f)
364 #define BPF_Fs44100_Fc55_B1                      (-1.996537f)
365 #define BPF_Fs44100_Fc55_B2                      0.996599f
366 #define BPF_Fs48000_Fc55_A0                      0.001545f
367 #define BPF_Fs48000_Fc55_A1                      0.000000f
368 #define BPF_Fs48000_Fc55_A2                      (-0.001545f)
369 #define BPF_Fs48000_Fc55_B1                      (-1.996823f)
370 #define BPF_Fs48000_Fc55_B2                      0.996875f
371 
372 #define BPF_Fs88200_Fc55_A0                      0.000831f
373 #define BPF_Fs88200_Fc55_A1                      0.000000f
374 #define BPF_Fs88200_Fc55_A2                      (-0.000831f)
375 #define BPF_Fs88200_Fc55_B1                      (-1.998321f)
376 #define BPF_Fs88200_Fc55_B2                      0.998338f
377 
378 #define BPF_Fs96000_Fc55_A0                      0.000762f
379 #define BPF_Fs96000_Fc55_A1                      0.000000f
380 #define BPF_Fs96000_Fc55_A2                      (-0.000762f)
381 #define BPF_Fs96000_Fc55_B1                      (-1.998461f)
382 #define BPF_Fs96000_Fc55_B2                      0.998477f
383 
384 #define BPF_Fs176400_Fc55_A0                     0.000416f
385 #define BPF_Fs176400_Fc55_A1                     0.000000f
386 #define BPF_Fs176400_Fc55_A2                     (-0.000416f)
387 #define BPF_Fs176400_Fc55_B1                     (-1.999164f)
388 #define BPF_Fs176400_Fc55_B2                     0.999169f
389 
390 #define BPF_Fs192000_Fc55_A0                     0.000381f
391 #define BPF_Fs192000_Fc55_A1                     0.000000f
392 #define BPF_Fs192000_Fc55_A2                     (-0.000381f)
393 #define BPF_Fs192000_Fc55_B1                     (-1.999234f)
394 #define BPF_Fs192000_Fc55_B2                     0.999238f
395 
396 /* Coefficients for centre frequency 66Hz */
397 #define BPF_Fs8000_Fc66_A0                      0.012648f
398 #define BPF_Fs8000_Fc66_A1                      0.000000f
399 #define BPF_Fs8000_Fc66_A2                      (-0.012648f)
400 #define BPF_Fs8000_Fc66_B1                      (-1.971760f)
401 #define BPF_Fs8000_Fc66_B2                      0.974412f
402 #define BPF_Fs11025_Fc66_A0                     0.009209f
403 #define BPF_Fs11025_Fc66_A1                     0.000000f
404 #define BPF_Fs11025_Fc66_A2                     (-0.009209f)
405 #define BPF_Fs11025_Fc66_B1                     (-1.979966f)
406 #define BPF_Fs11025_Fc66_B2                     0.981368f
407 #define BPF_Fs12000_Fc66_A0                     0.008468f
408 #define BPF_Fs12000_Fc66_A1                     0.000000f
409 #define BPF_Fs12000_Fc66_A2                     (-0.008468f)
410 #define BPF_Fs12000_Fc66_B1                     (-1.981685f)
411 #define BPF_Fs12000_Fc66_B2                     0.982869f
412 #define BPF_Fs16000_Fc66_A0                     0.006364f
413 #define BPF_Fs16000_Fc66_A1                     0.000000f
414 #define BPF_Fs16000_Fc66_A2                     (-0.006364f)
415 #define BPF_Fs16000_Fc66_B1                     (-1.986457f)
416 #define BPF_Fs16000_Fc66_B2                     0.987124f
417 #define BPF_Fs22050_Fc66_A0                     0.004626f
418 #define BPF_Fs22050_Fc66_A1                     0.000000f
419 #define BPF_Fs22050_Fc66_A2                     (-0.004626f)
420 #define BPF_Fs22050_Fc66_B1                     (-1.990288f)
421 #define BPF_Fs22050_Fc66_B2                     0.990641f
422 #define BPF_Fs24000_Fc66_A0                     0.004252f
423 #define BPF_Fs24000_Fc66_A1                     0.000000f
424 #define BPF_Fs24000_Fc66_A2                     (-0.004252f)
425 #define BPF_Fs24000_Fc66_B1                     (-1.991100f)
426 #define BPF_Fs24000_Fc66_B2                     0.991398f
427 #define BPF_Fs32000_Fc66_A0                     0.003192f
428 #define BPF_Fs32000_Fc66_A1                     0.000000f
429 #define BPF_Fs32000_Fc66_A2                     (-0.003192f)
430 #define BPF_Fs32000_Fc66_B1                     (-1.993374f)
431 #define BPF_Fs32000_Fc66_B2                     0.993541f
432 #define BPF_Fs44100_Fc66_A0                     0.002318f
433 #define BPF_Fs44100_Fc66_A1                     0.000000f
434 #define BPF_Fs44100_Fc66_A2                     (-0.002318f)
435 #define BPF_Fs44100_Fc66_B1                     (-1.995221f)
436 #define BPF_Fs44100_Fc66_B2                     0.995309f
437 #define BPF_Fs48000_Fc66_A0                     0.002131f
438 #define BPF_Fs48000_Fc66_A1                     0.000000f
439 #define BPF_Fs48000_Fc66_A2                     (-0.002131f)
440 #define BPF_Fs48000_Fc66_B1                     (-1.995615f)
441 #define BPF_Fs48000_Fc66_B2                     0.995690f
442 
443 #define BPF_Fs88200_Fc66_A0                     0.001146f
444 #define BPF_Fs88200_Fc66_A1                     0.000000f
445 #define BPF_Fs88200_Fc66_A2                     (-0.001146f)
446 #define BPF_Fs88200_Fc66_B1                     (-1.997684f)
447 #define BPF_Fs88200_Fc66_B2                     0.997708f
448 
449 #define BPF_Fs96000_Fc66_A0                     0.001055f
450 #define BPF_Fs96000_Fc66_A1                     0.000000f
451 #define BPF_Fs96000_Fc66_A2                     (-0.001055f)
452 #define BPF_Fs96000_Fc66_B1                     (-1.997868f)
453 #define BPF_Fs96000_Fc66_B2                     0.997891f
454 
455 #define BPF_Fs176400_Fc66_A0                    0.000573f
456 #define BPF_Fs176400_Fc66_A1                    0.000000f
457 #define BPF_Fs176400_Fc66_A2                    (-0.000573f)
458 #define BPF_Fs176400_Fc66_B1                    (-1.998847f)
459 #define BPF_Fs176400_Fc66_B2                    0.998853f
460 
461 #define BPF_Fs192000_Fc66_A0                    0.000528f
462 #define BPF_Fs192000_Fc66_A1                    0.000000f
463 #define BPF_Fs192000_Fc66_A2                   (-0.000528f)
464 #define BPF_Fs192000_Fc66_B1                   (-1.998939f)
465 #define BPF_Fs192000_Fc66_B2                    0.998945f
466 
467 /* Coefficients for centre frequency 78Hz */
468 #define BPF_Fs8000_Fc78_A0                      0.018572f
469 #define BPF_Fs8000_Fc78_A1                      0.000000f
470 #define BPF_Fs8000_Fc78_A2                      (-0.018572f)
471 #define BPF_Fs8000_Fc78_B1                      (-1.958745f)
472 #define BPF_Fs8000_Fc78_B2                      0.962427f
473 #define BPF_Fs11025_Fc78_A0                     0.013545f
474 #define BPF_Fs11025_Fc78_A1                     0.000000f
475 #define BPF_Fs11025_Fc78_A2                     (-0.013545f)
476 #define BPF_Fs11025_Fc78_B1                     (-1.970647f)
477 #define BPF_Fs11025_Fc78_B2                     0.972596f
478 #define BPF_Fs12000_Fc78_A0                     0.012458f
479 #define BPF_Fs12000_Fc78_A1                     0.000000f
480 #define BPF_Fs12000_Fc78_A2                     (-0.012458f)
481 #define BPF_Fs12000_Fc78_B1                     (-1.973148f)
482 #define BPF_Fs12000_Fc78_B2                     0.974795f
483 #define BPF_Fs16000_Fc78_A0                     0.009373f
484 #define BPF_Fs16000_Fc78_A1                     0.000000f
485 #define BPF_Fs16000_Fc78_A2                     (-0.009373f)
486 #define BPF_Fs16000_Fc78_B1                     (-1.980108f)
487 #define BPF_Fs16000_Fc78_B2                     0.981037f
488 #define BPF_Fs22050_Fc78_A0                     0.006819f
489 #define BPF_Fs22050_Fc78_A1                     0.000000f
490 #define BPF_Fs22050_Fc78_A2                     (-0.006819f)
491 #define BPF_Fs22050_Fc78_B1                     (-1.985714f)
492 #define BPF_Fs22050_Fc78_B2                     0.986204f
493 #define BPF_Fs24000_Fc78_A0                     0.006268f
494 #define BPF_Fs24000_Fc78_A1                     0.000000f
495 #define BPF_Fs24000_Fc78_A2                     (-0.006268f)
496 #define BPF_Fs24000_Fc78_B1                     (-1.986904f)
497 #define BPF_Fs24000_Fc78_B2                     0.987318f
498 #define BPF_Fs32000_Fc78_A0                     0.004709f
499 #define BPF_Fs32000_Fc78_A1                     0.000000f
500 #define BPF_Fs32000_Fc78_A2                     (-0.004709f)
501 #define BPF_Fs32000_Fc78_B1                     (-1.990240f)
502 #define BPF_Fs32000_Fc78_B2                     0.990473f
503 #define BPF_Fs44100_Fc78_A0                     0.003421f
504 #define BPF_Fs44100_Fc78_A1                     0.000000f
505 #define BPF_Fs44100_Fc78_A2                     (-0.003421f)
506 #define BPF_Fs44100_Fc78_B1                     (-1.992955f)
507 #define BPF_Fs44100_Fc78_B2                     0.993078f
508 #define BPF_Fs48000_Fc78_A0                     0.003144f
509 #define BPF_Fs48000_Fc78_A1                     0.000000f
510 #define BPF_Fs48000_Fc78_A2                     (-0.003144f)
511 #define BPF_Fs48000_Fc78_B1                     (-1.993535f)
512 #define BPF_Fs48000_Fc78_B2                     0.993639f
513 
514 #define BPF_Fs88200_Fc78_A0                    0.001693f
515 #define BPF_Fs88200_Fc78_A1                    0.000000f
516 #define BPF_Fs88200_Fc78_A2                    (-0.001693f)
517 #define BPF_Fs88200_Fc78_B1                    (-1.996582f)
518 #define BPF_Fs88200_Fc78_B2                    0.996615f
519 
520 #define BPF_Fs96000_Fc78_A0                     0.001555f
521 #define BPF_Fs96000_Fc78_A1                     0.000000f
522 #define BPF_Fs96000_Fc78_A2                    (-0.0015555f)
523 #define BPF_Fs96000_Fc78_B1                    (-1.996860f)
524 #define BPF_Fs96000_Fc78_B2                     0.996891f
525 
526 #define BPF_Fs176400_Fc78_A0                    0.000847f
527 #define BPF_Fs176400_Fc78_A1                    0.000000f
528 #define BPF_Fs176400_Fc78_A2                    (-0.000847f)
529 #define BPF_Fs176400_Fc78_B1                    (-1.998298f)
530 #define BPF_Fs176400_Fc78_B2                    0.998306f
531 
532 #define BPF_Fs192000_Fc78_A0                    0.000778f
533 #define BPF_Fs192000_Fc78_A1                    0.000000f
534 #define BPF_Fs192000_Fc78_A2                   (-0.000778f)
535 #define BPF_Fs192000_Fc78_B1                   (-1.998437f)
536 #define BPF_Fs192000_Fc78_B2                    0.998444f
537 
538 /* Coefficients for centre frequency 90Hz */
539 #define BPF_Fs8000_Fc90_A0                       0.022760f
540 #define BPF_Fs8000_Fc90_A1                       0.000000f
541 #define BPF_Fs8000_Fc90_A2                       (-0.022760f)
542 #define BPF_Fs8000_Fc90_B1                       (-1.949073f)
543 #define BPF_Fs8000_Fc90_B2                       0.953953f
544 #define BPF_Fs11025_Fc90_A0                      0.016619f
545 #define BPF_Fs11025_Fc90_A1                      0.000000f
546 #define BPF_Fs11025_Fc90_A2                      (-0.016619f)
547 #define BPF_Fs11025_Fc90_B1                      (-1.963791f)
548 #define BPF_Fs11025_Fc90_B2                      0.966377f
549 #define BPF_Fs12000_Fc90_A0                      0.015289f
550 #define BPF_Fs12000_Fc90_A1                      0.000000f
551 #define BPF_Fs12000_Fc90_A2                      (-0.015289f)
552 #define BPF_Fs12000_Fc90_B1                      (-1.966882f)
553 #define BPF_Fs12000_Fc90_B2                      0.969067f
554 #define BPF_Fs16000_Fc90_A0                      0.011511f
555 #define BPF_Fs16000_Fc90_A1                      0.000000f
556 #define BPF_Fs16000_Fc90_A2                      (-0.011511f)
557 #define BPF_Fs16000_Fc90_B1                      (-1.975477f)
558 #define BPF_Fs16000_Fc90_B2                      0.976711f
559 #define BPF_Fs22050_Fc90_A0                      0.008379f
560 #define BPF_Fs22050_Fc90_A1                      0.000000f
561 #define BPF_Fs22050_Fc90_A2                      (-0.008379f)
562 #define BPF_Fs22050_Fc90_B1                      (-1.982395f)
563 #define BPF_Fs22050_Fc90_B2                      0.983047f
564 #define BPF_Fs24000_Fc90_A0                      0.007704f
565 #define BPF_Fs24000_Fc90_A1                      0.000000f
566 #define BPF_Fs24000_Fc90_A2                      (-0.007704f)
567 #define BPF_Fs24000_Fc90_B1                      (-1.983863f)
568 #define BPF_Fs24000_Fc90_B2                      0.984414f
569 #define BPF_Fs32000_Fc90_A0                      0.005789f
570 #define BPF_Fs32000_Fc90_A1                      0.000000f
571 #define BPF_Fs32000_Fc90_A2                      (-0.005789f)
572 #define BPF_Fs32000_Fc90_B1                      (-1.987977f)
573 #define BPF_Fs32000_Fc90_B2                      0.988288f
574 #define BPF_Fs44100_Fc90_A0                      0.004207f
575 #define BPF_Fs44100_Fc90_A1                      0.000000f
576 #define BPF_Fs44100_Fc90_A2                      (-0.004207f)
577 #define BPF_Fs44100_Fc90_B1                      (-1.991324f)
578 #define BPF_Fs44100_Fc90_B2                      0.991488f
579 #define BPF_Fs48000_Fc90_A0                      0.003867f
580 #define BPF_Fs48000_Fc90_A1                      0.000000f
581 #define BPF_Fs48000_Fc90_A2                      (-0.003867f)
582 #define BPF_Fs48000_Fc90_B1                      (-1.992038f)
583 #define BPF_Fs48000_Fc90_B2                      0.992177f
584 
585 #define BPF_Fs88200_Fc90_A0                      0.002083f
586 #define BPF_Fs88200_Fc90_A1                      0.000000f
587 #define BPF_Fs88200_Fc90_A2                      (-0.002083f)
588 #define BPF_Fs88200_Fc90_B1                      (-1.995791f)
589 #define BPF_Fs88200_Fc90_B2                      0.995835f
590 
591 #define BPF_Fs96000_Fc90_A0                      0.001913f
592 #define BPF_Fs96000_Fc90_A1                      0.000000f
593 #define BPF_Fs96000_Fc90_A2                     (-0.001913f)
594 #define BPF_Fs96000_Fc90_B1                     (-1.996134f)
595 #define BPF_Fs96000_Fc90_B2                      0.996174f
596 
597 #define BPF_Fs176400_Fc90_A0                     0.001042f
598 #define BPF_Fs176400_Fc90_A1                     0.000000f
599 #define BPF_Fs176400_Fc90_A2                     (-0.001042f)
600 #define BPF_Fs176400_Fc90_B1                     (-1.997904f)
601 #define BPF_Fs176400_Fc90_B2                     0.997915f
602 
603 #define BPF_Fs192000_Fc90_A0                     0.000958f
604 #define BPF_Fs192000_Fc90_A1                     0.000000f
605 #define BPF_Fs192000_Fc90_A2                    (-0.000958f)
606 #define BPF_Fs192000_Fc90_B1                    (-1.998075f)
607 #define BPF_Fs192000_Fc90_B2                     0.998085f
608 
609 /************************************************************************************/
610 /*                                                                                  */
611 /* Automatic Gain Control time constants and gain settings                          */
612 /*                                                                                  */
613 /************************************************************************************/
614 
615 /* AGC Time constants */
616 #define AGC_ATTACK_Fs8000                             0.841395f
617 #define AGC_ATTACK_Fs11025                            0.882223f
618 #define AGC_ATTACK_Fs12000                            0.891251f
619 #define AGC_ATTACK_Fs16000                            0.917276f
620 #define AGC_ATTACK_Fs22050                            0.939267f
621 #define AGC_ATTACK_Fs24000                            0.944061f
622 #define AGC_ATTACK_Fs32000                            0.957745f
623 #define AGC_ATTACK_Fs44100                            0.969158f
624 #define AGC_ATTACK_Fs48000                            0.971628f
625 
626 #define AGC_ATTACK_Fs88200                             0.984458f
627 #define AGC_ATTACK_Fs96000                             0.985712f
628 #define AGC_ATTACK_Fs176400                            0.992199f
629 #define AGC_ATTACK_Fs192000                            0.992830f
630 
631 #define DECAY_SHIFT                                   10
632 
633 #define AGC_DECAY_Fs8000                              0.000042f
634 #define AGC_DECAY_Fs11025                             0.000030f
635 #define AGC_DECAY_Fs12000                             0.000028f
636 #define AGC_DECAY_Fs16000                             0.000021f
637 #define AGC_DECAY_Fs22050                             0.000015f
638 #define AGC_DECAY_Fs24000                             0.000014f
639 #define AGC_DECAY_Fs32000                             0.000010f
640 #define AGC_DECAY_Fs44100                             0.000008f
641 #define AGC_DECAY_Fs48000                             0.000007f
642 
643 #define AGC_DECAY_Fs88200                            0.0000038f
644 #define AGC_DECAY_FS96000                            0.0000035f
645 #define AGC_DECAY_Fs176400                          0.00000188f
646 #define AGC_DECAY_FS192000                          0.00000175f
647 
648 /* AGC Gain settings */
649 #define AGC_GAIN_SCALE                                        31         /* As a power of 2 */
650 #define AGC_GAIN_SHIFT                                         4         /* As a power of 2 */
651 #define AGC_TARGETLEVEL                            0.988553f
652 #define AGC_HPFGAIN_0dB                            0.412538f
653 #define AGC_GAIN_0dB                               0.000000f
654 #define AGC_HPFGAIN_1dB                            0.584893f
655 #define AGC_GAIN_1dB                               0.122018f
656 #define AGC_HPFGAIN_2dB                            0.778279f
657 #define AGC_GAIN_2dB                               0.258925f
658 #define AGC_HPFGAIN_3dB                            0.995262f
659 #define AGC_GAIN_3dB                               0.412538f
660 #define AGC_HPFGAIN_4dB                            1.238721f
661 #define AGC_GAIN_4dB                               0.584893f
662 #define AGC_HPFGAIN_5dB                            1.511886f
663 #define AGC_GAIN_5dB                               0.778279f
664 #define AGC_HPFGAIN_6dB                            1.818383f
665 #define AGC_GAIN_6dB                               0.995262f
666 #define AGC_HPFGAIN_7dB                            2.162278f
667 #define AGC_GAIN_7dB                               1.238721f
668 #define AGC_HPFGAIN_8dB                            2.548134f
669 #define AGC_GAIN_8dB                               1.511886f
670 #define AGC_HPFGAIN_9dB                            2.981072f
671 #define AGC_GAIN_9dB                               1.818383f
672 #define AGC_HPFGAIN_10dB                           3.466836f
673 #define AGC_GAIN_10dB                              2.162278f
674 #define AGC_HPFGAIN_11dB                           4.011872f
675 #define AGC_GAIN_11dB                              2.548134f
676 #define AGC_HPFGAIN_12dB                           4.623413f
677 #define AGC_GAIN_12dB                              2.981072f
678 #define AGC_HPFGAIN_13dB                           5.309573f
679 #define AGC_GAIN_13dB                              3.466836f
680 #define AGC_HPFGAIN_14dB                           6.079458f
681 #define AGC_GAIN_14dB                              4.011872f
682 #define AGC_HPFGAIN_15dB                           6.943282f
683 #define AGC_GAIN_15dB                              4.623413f
684 
685 /************************************************************************************/
686 /*                                                                                  */
687 /* Volume control                                                                   */
688 /*                                                                                  */
689 /************************************************************************************/
690 
691 /* Volume control gain */
692 #define VOLUME_MAX                                          0         /* In dBs */
693 #define VOLUME_SHIFT                                        0         /* In dBs */
694 
695 /* Volume control time constants */
696 #define VOL_TC_SHIFT                                       21         /* As a power of 2 */
697 #define VOL_TC_Fs8000                                   0.024690f
698 #define VOL_TC_Fs11025                                  0.017977f
699 #define VOL_TC_Fs12000                                  0.016529f
700 #define VOL_TC_Fs16000                                  0.012422f
701 #define VOL_TC_Fs22050                                  0.009029f
702 #define VOL_TC_Fs24000                                  0.008299f
703 #define VOL_TC_Fs32000                                  0.006231f
704 #define VOL_TC_Fs44100                                  0.004525f
705 #define VOL_TC_Fs48000                                  0.004158f
706 #define VOL_TC_Fs88200                                  0.002263f
707 #define VOL_TC_Fs96000                                  0.002079f
708 #define VOL_TC_Fs176400                                 0.001131f
709 #define VOL_TC_Fs192000                                 0.001039f
710 #define MIX_TC_Fs8000                                   29365         /* Floating point value 0.896151 */
711 #define MIX_TC_Fs11025                                  30230         /* Floating point value 0.922548 */
712 #define MIX_TC_Fs12000                                  30422         /* Floating point value 0.928415 */
713 #define MIX_TC_Fs16000                                  30978         /* Floating point value 0.945387 */
714 #define MIX_TC_Fs22050                                  31451         /* Floating point value 0.959804 */
715 #define MIX_TC_Fs24000                                  31554         /* Floating point value 0.962956 */
716 #define MIX_TC_Fs32000                                  31850         /* Floating point value 0.971973 */
717 #define MIX_TC_Fs44100                                  32097         /* Floating point value 0.979515 */
718 #define MIX_TC_Fs48000                                  32150         /* Floating point value 0.981150 */
719 /* Floating point value 0.989704 */
720 #define MIX_TC_Fs88200                                  32430
721 #define MIX_TC_Fs96000                                  32456         /* Floating point value 0.990530 */
722 /* Floating point value 0.994838 */
723 #define MIX_TC_Fs176400                                 32598
724 #define MIX_TC_Fs192000                                 32611         /* Floating point value 0.992524 */
725 
726 #endif
727