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 /************************************************************************************/ 19 /* */ 20 /* Includes */ 21 /* */ 22 /************************************************************************************/ 23 24 #include "LVM_Tables.h" 25 #include "LVM_Coeffs.h" 26 27 /************************************************************************************/ 28 /* */ 29 /* Treble Boost Filter Coefficients */ 30 /* */ 31 /************************************************************************************/ 32 33 FO_FLOAT_LShx_Coefs_t LVM_TrebleBoostCoefs[] = { 34 35 /* 22kHz sampling rate */ 36 {HPF_Fs22050_Gain1_A1, /* Gain setting 1 */ 37 HPF_Fs22050_Gain1_A0, 38 -HPF_Fs22050_Gain1_B1}, 39 {HPF_Fs22050_Gain2_A1, /* Gain setting 2 */ 40 HPF_Fs22050_Gain2_A0, 41 -HPF_Fs22050_Gain2_B1}, 42 {HPF_Fs22050_Gain3_A1, /* Gain setting 3 */ 43 HPF_Fs22050_Gain3_A0, 44 -HPF_Fs22050_Gain3_B1}, 45 {HPF_Fs22050_Gain4_A1, /* Gain setting 4 */ 46 HPF_Fs22050_Gain4_A0, 47 -HPF_Fs22050_Gain4_B1}, 48 {HPF_Fs22050_Gain5_A1, /* Gain setting 5 */ 49 HPF_Fs22050_Gain5_A0, 50 -HPF_Fs22050_Gain5_B1}, 51 {HPF_Fs22050_Gain6_A1, /* Gain setting 6 */ 52 HPF_Fs22050_Gain6_A0, 53 -HPF_Fs22050_Gain6_B1}, 54 {HPF_Fs22050_Gain7_A1, /* Gain setting 7 */ 55 HPF_Fs22050_Gain7_A0, 56 -HPF_Fs22050_Gain7_B1}, 57 {HPF_Fs22050_Gain8_A1, /* Gain setting 8 */ 58 HPF_Fs22050_Gain8_A0, 59 -HPF_Fs22050_Gain8_B1}, 60 {HPF_Fs22050_Gain9_A1, /* Gain setting 9 */ 61 HPF_Fs22050_Gain9_A0, 62 -HPF_Fs22050_Gain9_B1}, 63 {HPF_Fs22050_Gain10_A1, /* Gain setting 10 */ 64 HPF_Fs22050_Gain10_A0, 65 -HPF_Fs22050_Gain10_B1}, 66 {HPF_Fs22050_Gain11_A1, /* Gain setting 11 */ 67 HPF_Fs22050_Gain11_A0, 68 -HPF_Fs22050_Gain11_B1}, 69 {HPF_Fs22050_Gain12_A1, /* Gain setting 12 */ 70 HPF_Fs22050_Gain12_A0, 71 -HPF_Fs22050_Gain12_B1}, 72 {HPF_Fs22050_Gain13_A1, /* Gain setting 13 */ 73 HPF_Fs22050_Gain13_A0, 74 -HPF_Fs22050_Gain13_B1}, 75 {HPF_Fs22050_Gain14_A1, /* Gain setting 14 */ 76 HPF_Fs22050_Gain14_A0, 77 -HPF_Fs22050_Gain14_B1}, 78 {HPF_Fs22050_Gain15_A1, /* Gain setting 15 */ 79 HPF_Fs22050_Gain15_A0, 80 -HPF_Fs22050_Gain15_B1}, 81 82 /* 24kHz sampling rate */ 83 {HPF_Fs24000_Gain1_A1, /* Gain setting 1 */ 84 HPF_Fs24000_Gain1_A0, 85 -HPF_Fs24000_Gain1_B1}, 86 {HPF_Fs24000_Gain2_A1, /* Gain setting 2 */ 87 HPF_Fs24000_Gain2_A0, 88 -HPF_Fs24000_Gain2_B1}, 89 {HPF_Fs24000_Gain3_A1, /* Gain setting 3 */ 90 HPF_Fs24000_Gain3_A0, 91 -HPF_Fs24000_Gain3_B1}, 92 {HPF_Fs24000_Gain4_A1, /* Gain setting 4 */ 93 HPF_Fs24000_Gain4_A0, 94 -HPF_Fs24000_Gain4_B1}, 95 {HPF_Fs24000_Gain5_A1, /* Gain setting 5 */ 96 HPF_Fs24000_Gain5_A0, 97 -HPF_Fs24000_Gain5_B1}, 98 {HPF_Fs24000_Gain6_A1, /* Gain setting 6 */ 99 HPF_Fs24000_Gain6_A0, 100 -HPF_Fs24000_Gain6_B1}, 101 {HPF_Fs24000_Gain7_A1, /* Gain setting 7 */ 102 HPF_Fs24000_Gain7_A0, 103 -HPF_Fs24000_Gain7_B1}, 104 {HPF_Fs24000_Gain8_A1, /* Gain setting 8 */ 105 HPF_Fs24000_Gain8_A0, 106 -HPF_Fs24000_Gain8_B1}, 107 {HPF_Fs24000_Gain9_A1, /* Gain setting 9 */ 108 HPF_Fs24000_Gain9_A0, 109 -HPF_Fs24000_Gain9_B1}, 110 {HPF_Fs24000_Gain10_A1, /* Gain setting 10 */ 111 HPF_Fs24000_Gain10_A0, 112 -HPF_Fs24000_Gain10_B1}, 113 {HPF_Fs24000_Gain11_A1, /* Gain setting 11 */ 114 HPF_Fs24000_Gain11_A0, 115 -HPF_Fs24000_Gain11_B1}, 116 {HPF_Fs24000_Gain12_A1, /* Gain setting 12 */ 117 HPF_Fs24000_Gain12_A0, 118 -HPF_Fs24000_Gain12_B1}, 119 {HPF_Fs24000_Gain13_A1, /* Gain setting 13 */ 120 HPF_Fs24000_Gain13_A0, 121 -HPF_Fs24000_Gain13_B1}, 122 {HPF_Fs24000_Gain14_A1, /* Gain setting 14 */ 123 HPF_Fs24000_Gain14_A0, 124 -HPF_Fs24000_Gain14_B1}, 125 {HPF_Fs24000_Gain15_A1, /* Gain setting 15 */ 126 HPF_Fs24000_Gain15_A0, 127 -HPF_Fs24000_Gain15_B1}, 128 129 /* 32kHz sampling rate */ 130 {HPF_Fs32000_Gain1_A1, /* Gain setting 1 */ 131 HPF_Fs32000_Gain1_A0, 132 -HPF_Fs32000_Gain1_B1}, 133 {HPF_Fs32000_Gain2_A1, /* Gain setting 2 */ 134 HPF_Fs32000_Gain2_A0, 135 -HPF_Fs32000_Gain2_B1}, 136 {HPF_Fs32000_Gain3_A1, /* Gain setting 3 */ 137 HPF_Fs32000_Gain3_A0, 138 -HPF_Fs32000_Gain3_B1}, 139 {HPF_Fs32000_Gain4_A1, /* Gain setting 4 */ 140 HPF_Fs32000_Gain4_A0, 141 -HPF_Fs32000_Gain4_B1}, 142 {HPF_Fs32000_Gain5_A1, /* Gain setting 5 */ 143 HPF_Fs32000_Gain5_A0, 144 -HPF_Fs32000_Gain5_B1}, 145 {HPF_Fs32000_Gain6_A1, /* Gain setting 6 */ 146 HPF_Fs32000_Gain6_A0, 147 -HPF_Fs32000_Gain6_B1}, 148 {HPF_Fs32000_Gain7_A1, /* Gain setting 7 */ 149 HPF_Fs32000_Gain7_A0, 150 -HPF_Fs32000_Gain7_B1}, 151 {HPF_Fs32000_Gain8_A1, /* Gain setting 8 */ 152 HPF_Fs32000_Gain8_A0, 153 -HPF_Fs32000_Gain8_B1}, 154 {HPF_Fs32000_Gain9_A1, /* Gain setting 9 */ 155 HPF_Fs32000_Gain9_A0, 156 -HPF_Fs32000_Gain9_B1}, 157 {HPF_Fs32000_Gain10_A1, /* Gain setting 10 */ 158 HPF_Fs32000_Gain10_A0, 159 -HPF_Fs32000_Gain10_B1}, 160 {HPF_Fs32000_Gain11_A1, /* Gain setting 11 */ 161 HPF_Fs32000_Gain11_A0, 162 -HPF_Fs32000_Gain11_B1}, 163 {HPF_Fs32000_Gain12_A1, /* Gain setting 12 */ 164 HPF_Fs32000_Gain12_A0, 165 -HPF_Fs32000_Gain12_B1}, 166 {HPF_Fs32000_Gain13_A1, /* Gain setting 13 */ 167 HPF_Fs32000_Gain13_A0, 168 -HPF_Fs32000_Gain13_B1}, 169 {HPF_Fs32000_Gain14_A1, /* Gain setting 14 */ 170 HPF_Fs32000_Gain14_A0, 171 -HPF_Fs32000_Gain14_B1}, 172 {HPF_Fs32000_Gain15_A1, /* Gain setting 15 */ 173 HPF_Fs32000_Gain15_A0, 174 -HPF_Fs32000_Gain15_B1}, 175 176 /* 44kHz sampling rate */ 177 {HPF_Fs44100_Gain1_A1, /* Gain setting 1 */ 178 HPF_Fs44100_Gain1_A0, 179 -HPF_Fs44100_Gain1_B1,}, 180 {HPF_Fs44100_Gain2_A1, /* Gain setting 2 */ 181 HPF_Fs44100_Gain2_A0, 182 -HPF_Fs44100_Gain2_B1}, 183 {HPF_Fs44100_Gain3_A1, /* Gain setting 3 */ 184 HPF_Fs44100_Gain3_A0, 185 -HPF_Fs44100_Gain3_B1}, 186 {HPF_Fs44100_Gain4_A1, /* Gain setting 4 */ 187 HPF_Fs44100_Gain4_A0, 188 -HPF_Fs44100_Gain4_B1}, 189 {HPF_Fs44100_Gain5_A1, /* Gain setting 5 */ 190 HPF_Fs44100_Gain5_A0, 191 -HPF_Fs44100_Gain5_B1}, 192 {HPF_Fs44100_Gain6_A1, /* Gain setting 6 */ 193 HPF_Fs44100_Gain6_A0, 194 -HPF_Fs44100_Gain6_B1}, 195 {HPF_Fs44100_Gain7_A1, /* Gain setting 7 */ 196 HPF_Fs44100_Gain7_A0, 197 -HPF_Fs44100_Gain7_B1}, 198 {HPF_Fs44100_Gain8_A1, /* Gain setting 8 */ 199 HPF_Fs44100_Gain8_A0, 200 -HPF_Fs44100_Gain8_B1}, 201 {HPF_Fs44100_Gain9_A1, /* Gain setting 9 */ 202 HPF_Fs44100_Gain9_A0, 203 -HPF_Fs44100_Gain9_B1}, 204 {HPF_Fs44100_Gain10_A1, /* Gain setting 10 */ 205 HPF_Fs44100_Gain10_A0, 206 -HPF_Fs44100_Gain10_B1}, 207 {HPF_Fs44100_Gain11_A1, /* Gain setting 11 */ 208 HPF_Fs44100_Gain11_A0, 209 -HPF_Fs44100_Gain11_B1}, 210 {HPF_Fs44100_Gain12_A1, /* Gain setting 12 */ 211 HPF_Fs44100_Gain12_A0, 212 -HPF_Fs44100_Gain12_B1}, 213 {HPF_Fs44100_Gain13_A1, /* Gain setting 13 */ 214 HPF_Fs44100_Gain13_A0, 215 -HPF_Fs44100_Gain13_B1}, 216 {HPF_Fs44100_Gain14_A1, /* Gain setting 14 */ 217 HPF_Fs44100_Gain14_A0, 218 -HPF_Fs44100_Gain14_B1}, 219 {HPF_Fs44100_Gain15_A1, /* Gain setting 15 */ 220 HPF_Fs44100_Gain15_A0, 221 -HPF_Fs44100_Gain15_B1}, 222 223 /* 48kHz sampling rate */ 224 {HPF_Fs48000_Gain1_A1, /* Gain setting 1 */ 225 HPF_Fs48000_Gain1_A0, 226 -HPF_Fs48000_Gain1_B1}, 227 {HPF_Fs48000_Gain2_A1, /* Gain setting 2 */ 228 HPF_Fs48000_Gain2_A0, 229 -HPF_Fs48000_Gain2_B1}, 230 {HPF_Fs48000_Gain3_A1, /* Gain setting 3 */ 231 HPF_Fs48000_Gain3_A0, 232 -HPF_Fs48000_Gain3_B1}, 233 {HPF_Fs48000_Gain4_A1, /* Gain setting 4 */ 234 HPF_Fs48000_Gain4_A0, 235 -HPF_Fs48000_Gain4_B1}, 236 {HPF_Fs48000_Gain5_A1, /* Gain setting 5 */ 237 HPF_Fs48000_Gain5_A0, 238 -HPF_Fs48000_Gain5_B1}, 239 {HPF_Fs48000_Gain6_A1, /* Gain setting 6 */ 240 HPF_Fs48000_Gain6_A0, 241 -HPF_Fs48000_Gain6_B1}, 242 {HPF_Fs48000_Gain7_A1, /* Gain setting 7 */ 243 HPF_Fs48000_Gain7_A0, 244 -HPF_Fs48000_Gain7_B1}, 245 {HPF_Fs48000_Gain8_A1, /* Gain setting 8 */ 246 HPF_Fs48000_Gain8_A0, 247 -HPF_Fs48000_Gain8_B1}, 248 {HPF_Fs48000_Gain9_A1, /* Gain setting 9 */ 249 HPF_Fs48000_Gain9_A0, 250 -HPF_Fs48000_Gain9_B1}, 251 {HPF_Fs48000_Gain10_A1, /* Gain setting 10 */ 252 HPF_Fs48000_Gain10_A0, 253 -HPF_Fs48000_Gain10_B1}, 254 {HPF_Fs48000_Gain11_A1, /* Gain setting 11 */ 255 HPF_Fs48000_Gain11_A0, 256 -HPF_Fs48000_Gain11_B1}, 257 {HPF_Fs48000_Gain12_A1, /* Gain setting 12 */ 258 HPF_Fs48000_Gain12_A0, 259 -HPF_Fs48000_Gain12_B1}, 260 {HPF_Fs48000_Gain13_A1, /* Gain setting 13 */ 261 HPF_Fs48000_Gain13_A0, 262 -HPF_Fs48000_Gain13_B1}, 263 {HPF_Fs48000_Gain14_A1, /* Gain setting 14 */ 264 HPF_Fs48000_Gain14_A0, 265 -HPF_Fs48000_Gain14_B1}, 266 {HPF_Fs48000_Gain15_A1, /* Gain setting 15 */ 267 HPF_Fs48000_Gain15_A0, 268 -HPF_Fs48000_Gain15_B1} 269 , 270 /* 88kHz Sampling rate */ 271 {HPF_Fs88200_Gain1_A1, /* Gain Setting 1 */ 272 HPF_Fs88200_Gain1_A0, 273 -HPF_Fs88200_Gain1_B1}, 274 {HPF_Fs88200_Gain2_A1, /* Gain Setting 2 */ 275 HPF_Fs88200_Gain2_A0, 276 -HPF_Fs88200_Gain2_B1}, 277 {HPF_Fs88200_Gain3_A1, /* Gain Setting 3 */ 278 HPF_Fs88200_Gain3_A0, 279 -HPF_Fs88200_Gain3_B1}, 280 {HPF_Fs88200_Gain4_A1, /* Gain Setting 4 */ 281 HPF_Fs88200_Gain4_A0, 282 -HPF_Fs88200_Gain4_B1}, 283 {HPF_Fs88200_Gain5_A1, /* Gain Setting 5 */ 284 HPF_Fs88200_Gain5_A0, 285 -HPF_Fs88200_Gain5_B1}, 286 {HPF_Fs88200_Gain6_A1, /* Gain Setting 6 */ 287 HPF_Fs88200_Gain6_A0, 288 -HPF_Fs88200_Gain6_B1}, 289 {HPF_Fs88200_Gain7_A1, /* Gain Setting 7 */ 290 HPF_Fs88200_Gain7_A0, 291 -HPF_Fs88200_Gain7_B1}, 292 {HPF_Fs88200_Gain8_A1, /* Gain Setting 8 */ 293 HPF_Fs88200_Gain8_A0, 294 -HPF_Fs88200_Gain8_B1}, 295 {HPF_Fs88200_Gain9_A1, /* Gain Setting 9 */ 296 HPF_Fs88200_Gain9_A0, 297 -HPF_Fs88200_Gain9_B1}, 298 {HPF_Fs88200_Gain10_A1, /* Gain Setting 10 */ 299 HPF_Fs88200_Gain10_A0, 300 -HPF_Fs88200_Gain10_B1}, 301 {HPF_Fs88200_Gain11_A1, /* Gain Setting 11 */ 302 HPF_Fs88200_Gain11_A0, 303 -HPF_Fs88200_Gain11_B1}, 304 {HPF_Fs88200_Gain12_A1, /* Gain Setting 12 */ 305 HPF_Fs88200_Gain12_A0, 306 -HPF_Fs88200_Gain12_B1}, 307 {HPF_Fs88200_Gain13_A1, /* Gain Setting 13 */ 308 HPF_Fs88200_Gain13_A0, 309 -HPF_Fs88200_Gain13_B1}, 310 {HPF_Fs88200_Gain14_A1, /* Gain Setting 14 */ 311 HPF_Fs88200_Gain14_A0, 312 -HPF_Fs88200_Gain14_B1}, 313 {HPF_Fs88200_Gain15_A1, /* Gain Setting 15 */ 314 HPF_Fs88200_Gain15_A0, 315 -HPF_Fs88200_Gain15_B1}, 316 317 /* 96kHz sampling rate */ 318 {HPF_Fs96000_Gain1_A1, /* Gain setting 1 */ 319 HPF_Fs96000_Gain1_A0, 320 -HPF_Fs96000_Gain1_B1}, 321 {HPF_Fs96000_Gain2_A1, /* Gain setting 2 */ 322 HPF_Fs96000_Gain2_A0, 323 -HPF_Fs96000_Gain2_B1}, 324 {HPF_Fs96000_Gain3_A1, /* Gain setting 3 */ 325 HPF_Fs96000_Gain3_A0, 326 -HPF_Fs96000_Gain3_B1}, 327 {HPF_Fs96000_Gain4_A1, /* Gain setting 4 */ 328 HPF_Fs96000_Gain4_A0, 329 -HPF_Fs96000_Gain4_B1}, 330 {HPF_Fs96000_Gain5_A1, /* Gain setting 5 */ 331 HPF_Fs96000_Gain5_A0, 332 -HPF_Fs96000_Gain5_B1}, 333 {HPF_Fs96000_Gain6_A1, /* Gain setting 6 */ 334 HPF_Fs96000_Gain6_A0, 335 -HPF_Fs96000_Gain6_B1}, 336 {HPF_Fs96000_Gain7_A1, /* Gain setting 7 */ 337 HPF_Fs96000_Gain7_A0, 338 -HPF_Fs96000_Gain7_B1}, 339 {HPF_Fs96000_Gain8_A1, /* Gain setting 8 */ 340 HPF_Fs96000_Gain8_A0, 341 -HPF_Fs96000_Gain8_B1}, 342 {HPF_Fs96000_Gain9_A1, /* Gain setting 9 */ 343 HPF_Fs96000_Gain9_A0, 344 -HPF_Fs96000_Gain9_B1}, 345 {HPF_Fs96000_Gain10_A1, /* Gain setting 10 */ 346 HPF_Fs96000_Gain10_A0, 347 -HPF_Fs96000_Gain10_B1}, 348 {HPF_Fs96000_Gain11_A1, /* Gain setting 11 */ 349 HPF_Fs96000_Gain11_A0, 350 -HPF_Fs96000_Gain11_B1}, 351 {HPF_Fs96000_Gain12_A1, /* Gain setting 12 */ 352 HPF_Fs96000_Gain12_A0, 353 -HPF_Fs96000_Gain12_B1}, 354 {HPF_Fs96000_Gain13_A1, /* Gain setting 13 */ 355 HPF_Fs96000_Gain13_A0, 356 -HPF_Fs96000_Gain13_B1}, 357 {HPF_Fs96000_Gain14_A1, /* Gain setting 14 */ 358 HPF_Fs96000_Gain14_A0, 359 -HPF_Fs96000_Gain14_B1}, 360 {HPF_Fs96000_Gain15_A1, /* Gain setting 15 */ 361 HPF_Fs96000_Gain15_A0, 362 -HPF_Fs96000_Gain15_B1}, 363 364 /* 176kHz Sampling rate */ 365 {HPF_Fs176400_Gain1_A1, /* Gain Setting 1 */ 366 HPF_Fs176400_Gain1_A0, 367 -HPF_Fs176400_Gain1_B1}, 368 {HPF_Fs176400_Gain2_A1, /* Gain Setting 2 */ 369 HPF_Fs176400_Gain2_A0, 370 -HPF_Fs176400_Gain2_B1}, 371 {HPF_Fs176400_Gain3_A1, /* Gain Setting 3 */ 372 HPF_Fs176400_Gain3_A0, 373 -HPF_Fs176400_Gain3_B1}, 374 {HPF_Fs176400_Gain4_A1, /* Gain Setting 4 */ 375 HPF_Fs176400_Gain4_A0, 376 -HPF_Fs176400_Gain4_B1}, 377 {HPF_Fs176400_Gain5_A1, /* Gain Setting 5 */ 378 HPF_Fs176400_Gain5_A0, 379 -HPF_Fs176400_Gain5_B1}, 380 {HPF_Fs176400_Gain6_A1, /* Gain Setting 6 */ 381 HPF_Fs176400_Gain6_A0, 382 -HPF_Fs176400_Gain6_B1}, 383 {HPF_Fs176400_Gain7_A1, /* Gain Setting 7 */ 384 HPF_Fs176400_Gain7_A0, 385 -HPF_Fs176400_Gain7_B1}, 386 {HPF_Fs176400_Gain8_A1, /* Gain Setting 8 */ 387 HPF_Fs176400_Gain8_A0, 388 -HPF_Fs176400_Gain8_B1}, 389 {HPF_Fs176400_Gain9_A1, /* Gain Setting 9 */ 390 HPF_Fs176400_Gain9_A0, 391 -HPF_Fs176400_Gain9_B1}, 392 {HPF_Fs176400_Gain10_A1, /* Gain Setting 10 */ 393 HPF_Fs176400_Gain10_A0, 394 -HPF_Fs176400_Gain10_B1}, 395 {HPF_Fs176400_Gain11_A1, /* Gain Setting 11 */ 396 HPF_Fs176400_Gain11_A0, 397 -HPF_Fs176400_Gain11_B1}, 398 {HPF_Fs176400_Gain12_A1, /* Gain Setting 12 */ 399 HPF_Fs176400_Gain12_A0, 400 -HPF_Fs176400_Gain12_B1}, 401 {HPF_Fs176400_Gain13_A1, /* Gain Setting 13 */ 402 HPF_Fs176400_Gain13_A0, 403 -HPF_Fs176400_Gain13_B1}, 404 {HPF_Fs176400_Gain14_A1, /* Gain Setting 14 */ 405 HPF_Fs176400_Gain14_A0, 406 -HPF_Fs176400_Gain14_B1}, 407 {HPF_Fs176400_Gain15_A1, /* Gain Setting 15 */ 408 HPF_Fs176400_Gain15_A0, 409 -HPF_Fs176400_Gain15_B1}, 410 411 /* 192kHz sampling rate */ 412 {HPF_Fs192000_Gain1_A1, /* Gain setting 1 */ 413 HPF_Fs192000_Gain1_A0, 414 -HPF_Fs192000_Gain1_B1}, 415 {HPF_Fs192000_Gain2_A1, /* Gain setting 2 */ 416 HPF_Fs192000_Gain2_A0, 417 -HPF_Fs192000_Gain2_B1}, 418 {HPF_Fs192000_Gain3_A1, /* Gain setting 3 */ 419 HPF_Fs192000_Gain3_A0, 420 -HPF_Fs192000_Gain3_B1}, 421 {HPF_Fs192000_Gain4_A1, /* Gain setting 4 */ 422 HPF_Fs192000_Gain4_A0, 423 -HPF_Fs192000_Gain4_B1}, 424 {HPF_Fs192000_Gain5_A1, /* Gain setting 5 */ 425 HPF_Fs192000_Gain5_A0, 426 -HPF_Fs192000_Gain5_B1}, 427 {HPF_Fs192000_Gain6_A1, /* Gain setting 6 */ 428 HPF_Fs192000_Gain6_A0, 429 -HPF_Fs192000_Gain6_B1}, 430 {HPF_Fs192000_Gain7_A1, /* Gain setting 7 */ 431 HPF_Fs192000_Gain7_A0, 432 -HPF_Fs192000_Gain7_B1}, 433 {HPF_Fs192000_Gain8_A1, /* Gain setting 8 */ 434 HPF_Fs192000_Gain8_A0, 435 -HPF_Fs192000_Gain8_B1}, 436 {HPF_Fs192000_Gain9_A1, /* Gain setting 9 */ 437 HPF_Fs192000_Gain9_A0, 438 -HPF_Fs192000_Gain9_B1}, 439 {HPF_Fs192000_Gain10_A1, /* Gain setting 10 */ 440 HPF_Fs192000_Gain10_A0, 441 -HPF_Fs192000_Gain10_B1}, 442 {HPF_Fs192000_Gain11_A1, /* Gain setting 11 */ 443 HPF_Fs192000_Gain11_A0, 444 -HPF_Fs192000_Gain11_B1}, 445 {HPF_Fs192000_Gain12_A1, /* Gain setting 12 */ 446 HPF_Fs192000_Gain12_A0, 447 -HPF_Fs192000_Gain12_B1}, 448 {HPF_Fs192000_Gain13_A1, /* Gain setting 13 */ 449 HPF_Fs192000_Gain13_A0, 450 -HPF_Fs192000_Gain13_B1}, 451 {HPF_Fs192000_Gain14_A1, /* Gain setting 14 */ 452 HPF_Fs192000_Gain14_A0, 453 -HPF_Fs192000_Gain14_B1}, 454 {HPF_Fs192000_Gain15_A1, /* Gain setting 15 */ 455 HPF_Fs192000_Gain15_A0, 456 -HPF_Fs192000_Gain15_B1} 457 }; 458 459 /************************************************************************************/ 460 /* */ 461 /* Volume control gain and time constant tables */ 462 /* */ 463 /************************************************************************************/ 464 465 /* dB to linear conversion table */ 466 const LVM_FLOAT LVM_VolumeTable[] = { 467 1.000f, /* 0dB */ 468 0.891f, /* -1dB */ 469 0.794f, /* -2dB */ 470 0.708f, /* -3dB */ 471 0.631f, /* -4dB */ 472 0.562f, /* -5dB */ 473 0.501f}; /* -6dB */ 474 475 /************************************************************************************/ 476 /* */ 477 /* Volume mixer time constants (100ms) */ 478 /* */ 479 /************************************************************************************/ 480 481 #define LVM_MIX_TC_Fs8000 32580 /* Floating point value 0.994262695 */ 482 #define LVM_MIX_TC_Fs11025 32632 /* Floating point value 0.995849609 */ 483 #define LVM_MIX_TC_Fs12000 32643 /* Floating point value 0.996185303 */ 484 #define LVM_MIX_TC_Fs16000 32674 /* Floating point value 0.997131348 */ 485 #define LVM_MIX_TC_Fs22050 32700 /* Floating point value 0.997924805 */ 486 #define LVM_MIX_TC_Fs24000 32705 /* Floating point value 0.998077393 */ 487 #define LVM_MIX_TC_Fs32000 32721 /* Floating point value 0.998565674 */ 488 #define LVM_MIX_TC_Fs44100 32734 /* Floating point value 0.998962402 */ 489 #define LVM_MIX_TC_Fs48000 32737 /* Floating point value 0.999053955 */ 490 491 const LVM_INT16 LVM_MixerTCTable[] = { 492 LVM_MIX_TC_Fs8000, 493 LVM_MIX_TC_Fs11025, 494 LVM_MIX_TC_Fs12000, 495 LVM_MIX_TC_Fs16000, 496 LVM_MIX_TC_Fs22050, 497 LVM_MIX_TC_Fs24000, 498 LVM_MIX_TC_Fs32000, 499 LVM_MIX_TC_Fs44100, 500 LVM_MIX_TC_Fs48000}; 501 502