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 /* */ 24 /* General */ 25 /* */ 26 /************************************************************************************/ 27 28 #define LVDBE_SCALESHIFT 10 /* As a power of 2 */ 29 30 31 /************************************************************************************/ 32 /* */ 33 /* High Pass Filter coefficients */ 34 /* */ 35 /************************************************************************************/ 36 37 /* Coefficients for centre frequency 55Hz */ 38 #define HPF_Fs8000_Fc55_A0 1029556328 /* Floating point value 0.958849 */ 39 #define HPF_Fs8000_Fc55_A1 -2059112655 /* Floating point value -1.917698 */ 40 #define HPF_Fs8000_Fc55_A2 1029556328 /* Floating point value 0.958849 */ 41 #define HPF_Fs8000_Fc55_B1 -2081986375 /* Floating point value -1.939001 */ 42 #define HPF_Fs8000_Fc55_B2 1010183914 /* Floating point value 0.940807 */ 43 #define HPF_Fs11025_Fc55_A0 1038210831 /* Floating point value 0.966909 */ 44 #define HPF_Fs11025_Fc55_A1 -2076421662 /* Floating point value -1.933818 */ 45 #define HPF_Fs11025_Fc55_A2 1038210831 /* Floating point value 0.966909 */ 46 #define HPF_Fs11025_Fc55_B1 -2099950710 /* Floating point value -1.955732 */ 47 #define HPF_Fs11025_Fc55_B2 1027238450 /* Floating point value 0.956690 */ 48 #define HPF_Fs12000_Fc55_A0 1040079943 /* Floating point value 0.968650 */ 49 #define HPF_Fs12000_Fc55_A1 -2080159885 /* Floating point value -1.937300 */ 50 #define HPF_Fs12000_Fc55_A2 1040079943 /* Floating point value 0.968650 */ 51 #define HPF_Fs12000_Fc55_B1 -2103811702 /* Floating point value -1.959327 */ 52 #define HPF_Fs12000_Fc55_B2 1030940477 /* Floating point value 0.960138 */ 53 #define HPF_Fs16000_Fc55_A0 1045381988 /* Floating point value 0.973588 */ 54 #define HPF_Fs16000_Fc55_A1 -2090763976 /* Floating point value -1.947176 */ 55 #define HPF_Fs16000_Fc55_A2 1045381988 /* Floating point value 0.973588 */ 56 #define HPF_Fs16000_Fc55_B1 -2114727793 /* Floating point value -1.969494 */ 57 #define HPF_Fs16000_Fc55_B2 1041478147 /* Floating point value 0.969952 */ 58 #define HPF_Fs22050_Fc55_A0 1049766523 /* Floating point value 0.977671 */ 59 #define HPF_Fs22050_Fc55_A1 -2099533046 /* Floating point value -1.955343 */ 60 #define HPF_Fs22050_Fc55_A2 1049766523 /* Floating point value 0.977671 */ 61 #define HPF_Fs22050_Fc55_B1 -2123714381 /* Floating point value -1.977863 */ 62 #define HPF_Fs22050_Fc55_B2 1050232780 /* Floating point value 0.978105 */ 63 #define HPF_Fs24000_Fc55_A0 1050711051 /* Floating point value 0.978551 */ 64 #define HPF_Fs24000_Fc55_A1 -2101422103 /* Floating point value -1.957102 */ 65 #define HPF_Fs24000_Fc55_A2 1050711051 /* Floating point value 0.978551 */ 66 #define HPF_Fs24000_Fc55_B1 -2125645498 /* Floating point value -1.979662 */ 67 #define HPF_Fs24000_Fc55_B2 1052123526 /* Floating point value 0.979866 */ 68 #define HPF_Fs32000_Fc55_A0 1053385759 /* Floating point value 0.981042 */ 69 #define HPF_Fs32000_Fc55_A1 -2106771519 /* Floating point value -1.962084 */ 70 #define HPF_Fs32000_Fc55_A2 1053385759 /* Floating point value 0.981042 */ 71 #define HPF_Fs32000_Fc55_B1 -2131104794 /* Floating point value -1.984746 */ 72 #define HPF_Fs32000_Fc55_B2 1057486949 /* Floating point value 0.984861 */ 73 #define HPF_Fs44100_Fc55_A0 1055592498 /* Floating point value 0.983097 */ 74 #define HPF_Fs44100_Fc55_A1 -2111184995 /* Floating point value -1.966194 */ 75 #define HPF_Fs44100_Fc55_A2 1055592498 /* Floating point value 0.983097 */ 76 #define HPF_Fs44100_Fc55_B1 -2135598658 /* Floating point value -1.988931 */ 77 #define HPF_Fs44100_Fc55_B2 1061922249 /* Floating point value 0.988992 */ 78 #define HPF_Fs48000_Fc55_A0 1056067276 /* Floating point value 0.983539 */ 79 #define HPF_Fs48000_Fc55_A1 -2112134551 /* Floating point value -1.967079 */ 80 #define HPF_Fs48000_Fc55_A2 1056067276 /* Floating point value 0.983539 */ 81 #define HPF_Fs48000_Fc55_B1 -2136564296 /* Floating point value -1.989831 */ 82 #define HPF_Fs48000_Fc55_B2 1062877714 /* Floating point value 0.989882 */ 83 84 /* Coefficients for centre frequency 66Hz */ 85 #define HPF_Fs8000_Fc66_A0 1023293271 /* Floating point value 0.953016 */ 86 #define HPF_Fs8000_Fc66_A1 -2046586542 /* Floating point value -1.906032 */ 87 #define HPF_Fs8000_Fc66_A2 1023293271 /* Floating point value 0.953016 */ 88 #define HPF_Fs8000_Fc66_B1 -2068896860 /* Floating point value -1.926810 */ 89 #define HPF_Fs8000_Fc66_B2 997931110 /* Floating point value 0.929396 */ 90 #define HPF_Fs11025_Fc66_A0 1033624228 /* Floating point value 0.962638 */ 91 #define HPF_Fs11025_Fc66_A1 -2067248455 /* Floating point value -1.925275 */ 92 #define HPF_Fs11025_Fc66_A2 1033624228 /* Floating point value 0.962638 */ 93 #define HPF_Fs11025_Fc66_B1 -2090448000 /* Floating point value -1.946881 */ 94 #define HPF_Fs11025_Fc66_B2 1018182305 /* Floating point value 0.948256 */ 95 #define HPF_Fs12000_Fc66_A0 1035857662 /* Floating point value 0.964718 */ 96 #define HPF_Fs12000_Fc66_A1 -2071715325 /* Floating point value -1.929435 */ 97 #define HPF_Fs12000_Fc66_A2 1035857662 /* Floating point value 0.964718 */ 98 #define HPF_Fs12000_Fc66_B1 -2095080333 /* Floating point value -1.951196 */ 99 #define HPF_Fs12000_Fc66_B2 1022587158 /* Floating point value 0.952359 */ 100 #define HPF_Fs16000_Fc66_A0 1042197528 /* Floating point value 0.970622 */ 101 #define HPF_Fs16000_Fc66_A1 -2084395056 /* Floating point value -1.941244 */ 102 #define HPF_Fs16000_Fc66_A2 1042197528 /* Floating point value 0.970622 */ 103 #define HPF_Fs16000_Fc66_B1 -2108177912 /* Floating point value -1.963394 */ 104 #define HPF_Fs16000_Fc66_B2 1035142690 /* Floating point value 0.964052 */ 105 #define HPF_Fs22050_Fc66_A0 1047445145 /* Floating point value 0.975509 */ 106 #define HPF_Fs22050_Fc66_A1 -2094890289 /* Floating point value -1.951019 */ 107 #define HPF_Fs22050_Fc66_A2 1047445145 /* Floating point value 0.975509 */ 108 #define HPF_Fs22050_Fc66_B1 -2118961025 /* Floating point value -1.973436 */ 109 #define HPF_Fs22050_Fc66_B2 1045593102 /* Floating point value 0.973784 */ 110 #define HPF_Fs24000_Fc66_A0 1048576175 /* Floating point value 0.976563 */ 111 #define HPF_Fs24000_Fc66_A1 -2097152349 /* Floating point value -1.953125 */ 112 #define HPF_Fs24000_Fc66_A2 1048576175 /* Floating point value 0.976563 */ 113 #define HPF_Fs24000_Fc66_B1 -2121278255 /* Floating point value -1.975594 */ 114 #define HPF_Fs24000_Fc66_B2 1047852379 /* Floating point value 0.975889 */ 115 #define HPF_Fs32000_Fc66_A0 1051780119 /* Floating point value 0.979547 */ 116 #define HPF_Fs32000_Fc66_A1 -2103560237 /* Floating point value -1.959093 */ 117 #define HPF_Fs32000_Fc66_A2 1051780119 /* Floating point value 0.979547 */ 118 #define HPF_Fs32000_Fc66_B1 -2127829187 /* Floating point value -1.981695 */ 119 #define HPF_Fs32000_Fc66_B2 1054265623 /* Floating point value 0.981861 */ 120 #define HPF_Fs44100_Fc66_A0 1054424722 /* Floating point value 0.982010 */ 121 #define HPF_Fs44100_Fc66_A1 -2108849444 /* Floating point value -1.964019 */ 122 #define HPF_Fs44100_Fc66_A2 1054424722 /* Floating point value 0.982010 */ 123 #define HPF_Fs44100_Fc66_B1 -2133221723 /* Floating point value -1.986718 */ 124 #define HPF_Fs44100_Fc66_B2 1059573993 /* Floating point value 0.986805 */ 125 #define HPF_Fs48000_Fc66_A0 1054993851 /* Floating point value 0.982540 */ 126 #define HPF_Fs48000_Fc66_A1 -2109987702 /* Floating point value -1.965079 */ 127 #define HPF_Fs48000_Fc66_A2 1054993851 /* Floating point value 0.982540 */ 128 #define HPF_Fs48000_Fc66_B1 -2134380475 /* Floating point value -1.987797 */ 129 #define HPF_Fs48000_Fc66_B2 1060718118 /* Floating point value 0.987871 */ 130 131 /* Coefficients for centre frequency 78Hz */ 132 #define HPF_Fs8000_Fc78_A0 1016504203 /* Floating point value 0.946693 */ 133 #define HPF_Fs8000_Fc78_A1 -2033008405 /* Floating point value -1.893387 */ 134 #define HPF_Fs8000_Fc78_A2 1016504203 /* Floating point value 0.946693 */ 135 #define HPF_Fs8000_Fc78_B1 -2054623390 /* Floating point value -1.913517 */ 136 #define HPF_Fs8000_Fc78_B2 984733853 /* Floating point value 0.917105 */ 137 #define HPF_Fs11025_Fc78_A0 1028643741 /* Floating point value 0.957999 */ 138 #define HPF_Fs11025_Fc78_A1 -2057287482 /* Floating point value -1.915998 */ 139 #define HPF_Fs11025_Fc78_A2 1028643741 /* Floating point value 0.957999 */ 140 #define HPF_Fs11025_Fc78_B1 -2080083769 /* Floating point value -1.937229 */ 141 #define HPF_Fs11025_Fc78_B2 1008393904 /* Floating point value 0.939140 */ 142 #define HPF_Fs12000_Fc78_A0 1031271067 /* Floating point value 0.960446 */ 143 #define HPF_Fs12000_Fc78_A1 -2062542133 /* Floating point value -1.920892 */ 144 #define HPF_Fs12000_Fc78_A2 1031271067 /* Floating point value 0.960446 */ 145 #define HPF_Fs12000_Fc78_B1 -2085557048 /* Floating point value -1.942326 */ 146 #define HPF_Fs12000_Fc78_B2 1013551620 /* Floating point value 0.943944 */ 147 #define HPF_Fs16000_Fc78_A0 1038734628 /* Floating point value 0.967397 */ 148 #define HPF_Fs16000_Fc78_A1 -2077469256 /* Floating point value -1.934794 */ 149 #define HPF_Fs16000_Fc78_A2 1038734628 /* Floating point value 0.967397 */ 150 #define HPF_Fs16000_Fc78_B1 -2101033380 /* Floating point value -1.956740 */ 151 #define HPF_Fs16000_Fc78_B2 1028275228 /* Floating point value 0.957656 */ 152 #define HPF_Fs22050_Fc78_A0 1044918584 /* Floating point value 0.973156 */ 153 #define HPF_Fs22050_Fc78_A1 -2089837169 /* Floating point value -1.946313 */ 154 #define HPF_Fs22050_Fc78_A2 1044918584 /* Floating point value 0.973156 */ 155 #define HPF_Fs22050_Fc78_B1 -2113775854 /* Floating point value -1.968607 */ 156 #define HPF_Fs22050_Fc78_B2 1040555007 /* Floating point value 0.969092 */ 157 #define HPF_Fs24000_Fc78_A0 1046252164 /* Floating point value 0.974398 */ 158 #define HPF_Fs24000_Fc78_A1 -2092504328 /* Floating point value -1.948797 */ 159 #define HPF_Fs24000_Fc78_A2 1046252164 /* Floating point value 0.974398 */ 160 #define HPF_Fs24000_Fc78_B1 -2116514229 /* Floating point value -1.971157 */ 161 #define HPF_Fs24000_Fc78_B2 1043212719 /* Floating point value 0.971568 */ 162 #define HPF_Fs32000_Fc78_A0 1050031301 /* Floating point value 0.977918 */ 163 #define HPF_Fs32000_Fc78_A1 -2100062603 /* Floating point value -1.955836 */ 164 #define HPF_Fs32000_Fc78_A2 1050031301 /* Floating point value 0.977918 */ 165 #define HPF_Fs32000_Fc78_B1 -2124255900 /* Floating point value -1.978367 */ 166 #define HPF_Fs32000_Fc78_B2 1050762639 /* Floating point value 0.978599 */ 167 #define HPF_Fs44100_Fc78_A0 1053152258 /* Floating point value 0.980824 */ 168 #define HPF_Fs44100_Fc78_A1 -2106304516 /* Floating point value -1.961649 */ 169 #define HPF_Fs44100_Fc78_A2 1053152258 /* Floating point value 0.980824 */ 170 #define HPF_Fs44100_Fc78_B1 -2130628742 /* Floating point value -1.984303 */ 171 #define HPF_Fs44100_Fc78_B2 1057018180 /* Floating point value 0.984425 */ 172 #define HPF_Fs48000_Fc78_A0 1053824087 /* Floating point value 0.981450 */ 173 #define HPF_Fs48000_Fc78_A1 -2107648173 /* Floating point value -1.962900 */ 174 #define HPF_Fs48000_Fc78_A2 1053824087 /* Floating point value 0.981450 */ 175 #define HPF_Fs48000_Fc78_B1 -2131998154 /* Floating point value -1.985578 */ 176 #define HPF_Fs48000_Fc78_B2 1058367200 /* Floating point value 0.985681 */ 177 178 /* Coefficients for centre frequency 90Hz */ 179 #define HPF_Fs8000_Fc90_A0 1009760053 /* Floating point value 0.940412 */ 180 #define HPF_Fs8000_Fc90_A1 -2019520105 /* Floating point value -1.880825 */ 181 #define HPF_Fs8000_Fc90_A2 1009760053 /* Floating point value 0.940412 */ 182 #define HPF_Fs8000_Fc90_B1 -2040357139 /* Floating point value -1.900231 */ 183 #define HPF_Fs8000_Fc90_B2 971711129 /* Floating point value 0.904977 */ 184 #define HPF_Fs11025_Fc90_A0 1023687217 /* Floating point value 0.953383 */ 185 #define HPF_Fs11025_Fc90_A1 -2047374434 /* Floating point value -1.906766 */ 186 #define HPF_Fs11025_Fc90_A2 1023687217 /* Floating point value 0.953383 */ 187 #define HPF_Fs11025_Fc90_B1 -2069722397 /* Floating point value -1.927579 */ 188 #define HPF_Fs11025_Fc90_B2 998699604 /* Floating point value 0.930111 */ 189 #define HPF_Fs12000_Fc90_A0 1026704754 /* Floating point value 0.956193 */ 190 #define HPF_Fs12000_Fc90_A1 -2053409508 /* Floating point value -1.912387 */ 191 #define HPF_Fs12000_Fc90_A2 1026704754 /* Floating point value 0.956193 */ 192 #define HPF_Fs12000_Fc90_B1 -2076035996 /* Floating point value -1.933459 */ 193 #define HPF_Fs12000_Fc90_B2 1004595918 /* Floating point value 0.935603 */ 194 #define HPF_Fs16000_Fc90_A0 1035283225 /* Floating point value 0.964183 */ 195 #define HPF_Fs16000_Fc90_A1 -2070566451 /* Floating point value -1.928365 */ 196 #define HPF_Fs16000_Fc90_A2 1035283225 /* Floating point value 0.964183 */ 197 #define HPF_Fs16000_Fc90_B1 -2093889811 /* Floating point value -1.950087 */ 198 #define HPF_Fs16000_Fc90_B2 1021453326 /* Floating point value 0.951303 */ 199 #define HPF_Fs22050_Fc90_A0 1042398116 /* Floating point value 0.970809 */ 200 #define HPF_Fs22050_Fc90_A1 -2084796232 /* Floating point value -1.941618 */ 201 #define HPF_Fs22050_Fc90_A2 1042398116 /* Floating point value 0.970809 */ 202 #define HPF_Fs22050_Fc90_B1 -2108591057 /* Floating point value -1.963778 */ 203 #define HPF_Fs22050_Fc90_B2 1035541188 /* Floating point value 0.964423 */ 204 #define HPF_Fs24000_Fc90_A0 1043933302 /* Floating point value 0.972239 */ 205 #define HPF_Fs24000_Fc90_A1 -2087866604 /* Floating point value -1.944477 */ 206 #define HPF_Fs24000_Fc90_A2 1043933302 /* Floating point value 0.972239 */ 207 #define HPF_Fs24000_Fc90_B1 -2111750495 /* Floating point value -1.966721 */ 208 #define HPF_Fs24000_Fc90_B2 1038593601 /* Floating point value 0.967266 */ 209 #define HPF_Fs32000_Fc90_A0 1048285391 /* Floating point value 0.976292 */ 210 #define HPF_Fs32000_Fc90_A1 -2096570783 /* Floating point value -1.952584 */ 211 #define HPF_Fs32000_Fc90_A2 1048285391 /* Floating point value 0.976292 */ 212 #define HPF_Fs32000_Fc90_B1 -2120682737 /* Floating point value -1.975040 */ 213 #define HPF_Fs32000_Fc90_B2 1047271295 /* Floating point value 0.975347 */ 214 #define HPF_Fs44100_Fc90_A0 1051881330 /* Floating point value 0.979641 */ 215 #define HPF_Fs44100_Fc90_A1 -2103762660 /* Floating point value -1.959282 */ 216 #define HPF_Fs44100_Fc90_A2 1051881330 /* Floating point value 0.979641 */ 217 #define HPF_Fs44100_Fc90_B1 -2128035809 /* Floating point value -1.981888 */ 218 #define HPF_Fs44100_Fc90_B2 1054468533 /* Floating point value 0.982050 */ 219 #define HPF_Fs48000_Fc90_A0 1052655619 /* Floating point value 0.980362 */ 220 #define HPF_Fs48000_Fc90_A1 -2105311238 /* Floating point value -1.960724 */ 221 #define HPF_Fs48000_Fc90_A2 1052655619 /* Floating point value 0.980362 */ 222 #define HPF_Fs48000_Fc90_B1 -2129615871 /* Floating point value -1.983359 */ 223 #define HPF_Fs48000_Fc90_B2 1056021492 /* Floating point value 0.983497 */ 224 225 226 /************************************************************************************/ 227 /* */ 228 /* Band Pass Filter coefficients */ 229 /* */ 230 /************************************************************************************/ 231 232 /* Coefficients for centre frequency 55Hz */ 233 #define BPF_Fs8000_Fc55_A0 9875247 /* Floating point value 0.009197 */ 234 #define BPF_Fs8000_Fc55_A1 0 /* Floating point value 0.000000 */ 235 #define BPF_Fs8000_Fc55_A2 -9875247 /* Floating point value -0.009197 */ 236 #define BPF_Fs8000_Fc55_B1 -2125519830 /* Floating point value -1.979545 */ 237 #define BPF_Fs8000_Fc55_B2 1053762629 /* Floating point value 0.981393 */ 238 #define BPF_Fs11025_Fc55_A0 7183952 /* Floating point value 0.006691 */ 239 #define BPF_Fs11025_Fc55_A1 0 /* Floating point value 0.000000 */ 240 #define BPF_Fs11025_Fc55_A2 -7183952 /* Floating point value -0.006691 */ 241 #define BPF_Fs11025_Fc55_B1 -2131901658 /* Floating point value -1.985488 */ 242 #define BPF_Fs11025_Fc55_B2 1059207548 /* Floating point value 0.986464 */ 243 #define BPF_Fs12000_Fc55_A0 6603871 /* Floating point value 0.006150 */ 244 #define BPF_Fs12000_Fc55_A1 0 /* Floating point value 0.000000 */ 245 #define BPF_Fs12000_Fc55_A2 -6603871 /* Floating point value -0.006150 */ 246 #define BPF_Fs12000_Fc55_B1 -2133238092 /* Floating point value -1.986733 */ 247 #define BPF_Fs12000_Fc55_B2 1060381143 /* Floating point value 0.987557 */ 248 #define BPF_Fs16000_Fc55_A0 4960591 /* Floating point value 0.004620 */ 249 #define BPF_Fs16000_Fc55_A1 0 /* Floating point value 0.000000 */ 250 #define BPF_Fs16000_Fc55_A2 -4960591 /* Floating point value -0.004620 */ 251 #define BPF_Fs16000_Fc55_B1 -2136949052 /* Floating point value -1.990189 */ 252 #define BPF_Fs16000_Fc55_B2 1063705760 /* Floating point value 0.990653 */ 253 #define BPF_Fs22050_Fc55_A0 3604131 /* Floating point value 0.003357 */ 254 #define BPF_Fs22050_Fc55_A1 0 /* Floating point value 0.000000 */ 255 #define BPF_Fs22050_Fc55_A2 -3604131 /* Floating point value -0.003357 */ 256 #define BPF_Fs22050_Fc55_B1 -2139929085 /* Floating point value -1.992964 */ 257 #define BPF_Fs22050_Fc55_B2 1066450095 /* Floating point value 0.993209 */ 258 #define BPF_Fs24000_Fc55_A0 3312207 /* Floating point value 0.003085 */ 259 #define BPF_Fs24000_Fc55_A1 0 /* Floating point value 0.000000 */ 260 #define BPF_Fs24000_Fc55_A2 -3312207 /* Floating point value -0.003085 */ 261 #define BPF_Fs24000_Fc55_B1 -2140560606 /* Floating point value -1.993552 */ 262 #define BPF_Fs24000_Fc55_B2 1067040703 /* Floating point value 0.993759 */ 263 #define BPF_Fs32000_Fc55_A0 2486091 /* Floating point value 0.002315 */ 264 #define BPF_Fs32000_Fc55_A1 0 /* Floating point value 0.000000 */ 265 #define BPF_Fs32000_Fc55_A2 -2486091 /* Floating point value -0.002315 */ 266 #define BPF_Fs32000_Fc55_B1 -2142328962 /* Floating point value -1.995199 */ 267 #define BPF_Fs32000_Fc55_B2 1068712067 /* Floating point value 0.995316 */ 268 #define BPF_Fs44100_Fc55_A0 1805125 /* Floating point value 0.001681 */ 269 #define BPF_Fs44100_Fc55_A1 0 /* Floating point value 0.000000 */ 270 #define BPF_Fs44100_Fc55_A2 -1805125 /* Floating point value -0.001681 */ 271 #define BPF_Fs44100_Fc55_B1 -2143765772 /* Floating point value -1.996537 */ 272 #define BPF_Fs44100_Fc55_B2 1070089770 /* Floating point value 0.996599 */ 273 #define BPF_Fs48000_Fc55_A0 1658687 /* Floating point value 0.001545 */ 274 #define BPF_Fs48000_Fc55_A1 0 /* Floating point value 0.000000 */ 275 #define BPF_Fs48000_Fc55_A2 -1658687 /* Floating point value -0.001545 */ 276 #define BPF_Fs48000_Fc55_B1 -2144072292 /* Floating point value -1.996823 */ 277 #define BPF_Fs48000_Fc55_B2 1070386036 /* Floating point value 0.996875 */ 278 279 /* Coefficients for centre frequency 66Hz */ 280 #define BPF_Fs8000_Fc66_A0 13580189 /* Floating point value 0.012648 */ 281 #define BPF_Fs8000_Fc66_A1 0 /* Floating point value 0.000000 */ 282 #define BPF_Fs8000_Fc66_A2 -13580189 /* Floating point value -0.012648 */ 283 #define BPF_Fs8000_Fc66_B1 -2117161175 /* Floating point value -1.971760 */ 284 #define BPF_Fs8000_Fc66_B2 1046266945 /* Floating point value 0.974412 */ 285 #define BPF_Fs11025_Fc66_A0 9888559 /* Floating point value 0.009209 */ 286 #define BPF_Fs11025_Fc66_A1 0 /* Floating point value 0.000000 */ 287 #define BPF_Fs11025_Fc66_A2 -9888559 /* Floating point value -0.009209 */ 288 #define BPF_Fs11025_Fc66_B1 -2125972738 /* Floating point value -1.979966 */ 289 #define BPF_Fs11025_Fc66_B2 1053735698 /* Floating point value 0.981368 */ 290 #define BPF_Fs12000_Fc66_A0 9091954 /* Floating point value 0.008468 */ 291 #define BPF_Fs12000_Fc66_A1 0 /* Floating point value 0.000000 */ 292 #define BPF_Fs12000_Fc66_A2 -9091954 /* Floating point value -0.008468 */ 293 #define BPF_Fs12000_Fc66_B1 -2127818004 /* Floating point value -1.981685 */ 294 #define BPF_Fs12000_Fc66_B2 1055347356 /* Floating point value 0.982869 */ 295 #define BPF_Fs16000_Fc66_A0 6833525 /* Floating point value 0.006364 */ 296 #define BPF_Fs16000_Fc66_A1 0 /* Floating point value 0.000000 */ 297 #define BPF_Fs16000_Fc66_A2 -6833525 /* Floating point value -0.006364 */ 298 #define BPF_Fs16000_Fc66_B1 -2132941739 /* Floating point value -1.986457 */ 299 #define BPF_Fs16000_Fc66_B2 1059916517 /* Floating point value 0.987124 */ 300 #define BPF_Fs22050_Fc66_A0 4967309 /* Floating point value 0.004626 */ 301 #define BPF_Fs22050_Fc66_A1 0 /* Floating point value 0.000000 */ 302 #define BPF_Fs22050_Fc66_A2 -4967309 /* Floating point value -0.004626 */ 303 #define BPF_Fs22050_Fc66_B1 -2137056003 /* Floating point value -1.990288 */ 304 #define BPF_Fs22050_Fc66_B2 1063692170 /* Floating point value 0.990641 */ 305 #define BPF_Fs24000_Fc66_A0 4565445 /* Floating point value 0.004252 */ 306 #define BPF_Fs24000_Fc66_A1 0 /* Floating point value 0.000000 */ 307 #define BPF_Fs24000_Fc66_A2 -4565445 /* Floating point value -0.004252 */ 308 #define BPF_Fs24000_Fc66_B1 -2137927842 /* Floating point value -1.991100 */ 309 #define BPF_Fs24000_Fc66_B2 1064505202 /* Floating point value 0.991398 */ 310 #define BPF_Fs32000_Fc66_A0 3427761 /* Floating point value 0.003192 */ 311 #define BPF_Fs32000_Fc66_A1 0 /* Floating point value 0.000000 */ 312 #define BPF_Fs32000_Fc66_A2 -3427761 /* Floating point value -0.003192 */ 313 #define BPF_Fs32000_Fc66_B1 -2140369007 /* Floating point value -1.993374 */ 314 #define BPF_Fs32000_Fc66_B2 1066806920 /* Floating point value 0.993541 */ 315 #define BPF_Fs44100_Fc66_A0 2489466 /* Floating point value 0.002318 */ 316 #define BPF_Fs44100_Fc66_A1 0 /* Floating point value 0.000000 */ 317 #define BPF_Fs44100_Fc66_A2 -2489466 /* Floating point value -0.002318 */ 318 #define BPF_Fs44100_Fc66_B1 -2142352342 /* Floating point value -1.995221 */ 319 #define BPF_Fs44100_Fc66_B2 1068705240 /* Floating point value 0.995309 */ 320 #define BPF_Fs48000_Fc66_A0 2287632 /* Floating point value 0.002131 */ 321 #define BPF_Fs48000_Fc66_A1 0 /* Floating point value 0.000000 */ 322 #define BPF_Fs48000_Fc66_A2 -2287632 /* Floating point value -0.002131 */ 323 #define BPF_Fs48000_Fc66_B1 -2142775436 /* Floating point value -1.995615 */ 324 #define BPF_Fs48000_Fc66_B2 1069113581 /* Floating point value 0.995690 */ 325 326 /* Coefficients for centre frequency 78Hz */ 327 #define BPF_Fs8000_Fc78_A0 19941180 /* Floating point value 0.018572 */ 328 #define BPF_Fs8000_Fc78_A1 0 /* Floating point value 0.000000 */ 329 #define BPF_Fs8000_Fc78_A2 -19941180 /* Floating point value -0.018572 */ 330 #define BPF_Fs8000_Fc78_B1 -2103186749 /* Floating point value -1.958745 */ 331 #define BPF_Fs8000_Fc78_B2 1033397648 /* Floating point value 0.962427 */ 332 #define BPF_Fs11025_Fc78_A0 14543934 /* Floating point value 0.013545 */ 333 #define BPF_Fs11025_Fc78_A1 0 /* Floating point value 0.000000 */ 334 #define BPF_Fs11025_Fc78_A2 -14543934 /* Floating point value -0.013545 */ 335 #define BPF_Fs11025_Fc78_B1 -2115966638 /* Floating point value -1.970647 */ 336 #define BPF_Fs11025_Fc78_B2 1044317135 /* Floating point value 0.972596 */ 337 #define BPF_Fs12000_Fc78_A0 13376999 /* Floating point value 0.012458 */ 338 #define BPF_Fs12000_Fc78_A1 0 /* Floating point value 0.000000 */ 339 #define BPF_Fs12000_Fc78_A2 -13376999 /* Floating point value -0.012458 */ 340 #define BPF_Fs12000_Fc78_B1 -2118651708 /* Floating point value -1.973148 */ 341 #define BPF_Fs12000_Fc78_B2 1046678029 /* Floating point value 0.974795 */ 342 #define BPF_Fs16000_Fc78_A0 10064222 /* Floating point value 0.009373 */ 343 #define BPF_Fs16000_Fc78_A1 0 /* Floating point value 0.000000 */ 344 #define BPF_Fs16000_Fc78_A2 -10064222 /* Floating point value -0.009373 */ 345 #define BPF_Fs16000_Fc78_B1 -2126124342 /* Floating point value -1.980108 */ 346 #define BPF_Fs16000_Fc78_B2 1053380304 /* Floating point value 0.981037 */ 347 #define BPF_Fs22050_Fc78_A0 7321780 /* Floating point value 0.006819 */ 348 #define BPF_Fs22050_Fc78_A1 0 /* Floating point value 0.000000 */ 349 #define BPF_Fs22050_Fc78_A2 -7321780 /* Floating point value -0.006819 */ 350 #define BPF_Fs22050_Fc78_B1 -2132143771 /* Floating point value -1.985714 */ 351 #define BPF_Fs22050_Fc78_B2 1058928700 /* Floating point value 0.986204 */ 352 #define BPF_Fs24000_Fc78_A0 6730640 /* Floating point value 0.006268 */ 353 #define BPF_Fs24000_Fc78_A1 0 /* Floating point value 0.000000 */ 354 #define BPF_Fs24000_Fc78_A2 -6730640 /* Floating point value -0.006268 */ 355 #define BPF_Fs24000_Fc78_B1 -2133421607 /* Floating point value -1.986904 */ 356 #define BPF_Fs24000_Fc78_B2 1060124669 /* Floating point value 0.987318 */ 357 #define BPF_Fs32000_Fc78_A0 5055965 /* Floating point value 0.004709 */ 358 #define BPF_Fs32000_Fc78_A1 0 /* Floating point value 0.000000 */ 359 #define BPF_Fs32000_Fc78_A2 -5055965 /* Floating point value -0.004709 */ 360 #define BPF_Fs32000_Fc78_B1 -2137003977 /* Floating point value -1.990240 */ 361 #define BPF_Fs32000_Fc78_B2 1063512802 /* Floating point value 0.990473 */ 362 #define BPF_Fs44100_Fc78_A0 3673516 /* Floating point value 0.003421 */ 363 #define BPF_Fs44100_Fc78_A1 0 /* Floating point value 0.000000 */ 364 #define BPF_Fs44100_Fc78_A2 -3673516 /* Floating point value -0.003421 */ 365 #define BPF_Fs44100_Fc78_B1 -2139919394 /* Floating point value -1.992955 */ 366 #define BPF_Fs44100_Fc78_B2 1066309718 /* Floating point value 0.993078 */ 367 #define BPF_Fs48000_Fc78_A0 3375990 /* Floating point value 0.003144 */ 368 #define BPF_Fs48000_Fc78_A1 0 /* Floating point value 0.000000 */ 369 #define BPF_Fs48000_Fc78_A2 -3375990 /* Floating point value -0.003144 */ 370 #define BPF_Fs48000_Fc78_B1 -2140541906 /* Floating point value -1.993535 */ 371 #define BPF_Fs48000_Fc78_B2 1066911660 /* Floating point value 0.993639 */ 372 373 /* Coefficients for centre frequency 90Hz */ 374 #define BPF_Fs8000_Fc90_A0 24438548 /* Floating point value 0.022760 */ 375 #define BPF_Fs8000_Fc90_A1 0 /* Floating point value 0.000000 */ 376 #define BPF_Fs8000_Fc90_A2 -24438548 /* Floating point value -0.022760 */ 377 #define BPF_Fs8000_Fc90_B1 -2092801347 /* Floating point value -1.949073 */ 378 #define BPF_Fs8000_Fc90_B2 1024298757 /* Floating point value 0.953953 */ 379 #define BPF_Fs11025_Fc90_A0 17844385 /* Floating point value 0.016619 */ 380 #define BPF_Fs11025_Fc90_A1 0 /* Floating point value 0.000000 */ 381 #define BPF_Fs11025_Fc90_A2 -17844385 /* Floating point value -0.016619 */ 382 #define BPF_Fs11025_Fc90_B1 -2108604921 /* Floating point value -1.963791 */ 383 #define BPF_Fs11025_Fc90_B2 1037639797 /* Floating point value 0.966377 */ 384 #define BPF_Fs12000_Fc90_A0 16416707 /* Floating point value 0.015289 */ 385 #define BPF_Fs12000_Fc90_A1 0 /* Floating point value 0.000000 */ 386 #define BPF_Fs12000_Fc90_A2 -16416707 /* Floating point value -0.015289 */ 387 #define BPF_Fs12000_Fc90_B1 -2111922936 /* Floating point value -1.966882 */ 388 #define BPF_Fs12000_Fc90_B2 1040528216 /* Floating point value 0.969067 */ 389 #define BPF_Fs16000_Fc90_A0 12359883 /* Floating point value 0.011511 */ 390 #define BPF_Fs16000_Fc90_A1 0 /* Floating point value 0.000000 */ 391 #define BPF_Fs16000_Fc90_A2 -12359883 /* Floating point value -0.011511 */ 392 #define BPF_Fs16000_Fc90_B1 -2121152162 /* Floating point value -1.975477 */ 393 #define BPF_Fs16000_Fc90_B2 1048735817 /* Floating point value 0.976711 */ 394 #define BPF_Fs22050_Fc90_A0 8997173 /* Floating point value 0.008379 */ 395 #define BPF_Fs22050_Fc90_A1 0 /* Floating point value 0.000000 */ 396 #define BPF_Fs22050_Fc90_A2 -8997173 /* Floating point value -0.008379 */ 397 #define BPF_Fs22050_Fc90_B1 -2128580762 /* Floating point value -1.982395 */ 398 #define BPF_Fs22050_Fc90_B2 1055539113 /* Floating point value 0.983047 */ 399 #define BPF_Fs24000_Fc90_A0 8271818 /* Floating point value 0.007704 */ 400 #define BPF_Fs24000_Fc90_A1 0 /* Floating point value 0.000000 */ 401 #define BPF_Fs24000_Fc90_A2 -8271818 /* Floating point value -0.007704 */ 402 #define BPF_Fs24000_Fc90_B1 -2130157013 /* Floating point value -1.983863 */ 403 #define BPF_Fs24000_Fc90_B2 1057006621 /* Floating point value 0.984414 */ 404 #define BPF_Fs32000_Fc90_A0 6215918 /* Floating point value 0.005789 */ 405 #define BPF_Fs32000_Fc90_A1 0 /* Floating point value 0.000000 */ 406 #define BPF_Fs32000_Fc90_A2 -6215918 /* Floating point value -0.005789 */ 407 #define BPF_Fs32000_Fc90_B1 -2134574521 /* Floating point value -1.987977 */ 408 #define BPF_Fs32000_Fc90_B2 1061166033 /* Floating point value 0.988288 */ 409 #define BPF_Fs44100_Fc90_A0 4517651 /* Floating point value 0.004207 */ 410 #define BPF_Fs44100_Fc90_A1 0 /* Floating point value 0.000000 */ 411 #define BPF_Fs44100_Fc90_A2 -4517651 /* Floating point value -0.004207 */ 412 #define BPF_Fs44100_Fc90_B1 -2138167926 /* Floating point value -1.991324 */ 413 #define BPF_Fs44100_Fc90_B2 1064601898 /* Floating point value 0.991488 */ 414 #define BPF_Fs48000_Fc90_A0 4152024 /* Floating point value 0.003867 */ 415 #define BPF_Fs48000_Fc90_A1 0 /* Floating point value 0.000000 */ 416 #define BPF_Fs48000_Fc90_A2 -4152024 /* Floating point value -0.003867 */ 417 #define BPF_Fs48000_Fc90_B1 -2138935002 /* Floating point value -1.992038 */ 418 #define BPF_Fs48000_Fc90_B2 1065341620 /* Floating point value 0.992177 */ 419 420 421 /************************************************************************************/ 422 /* */ 423 /* Automatic Gain Control time constants and gain settings */ 424 /* */ 425 /************************************************************************************/ 426 427 /* AGC Time constants */ 428 #define AGC_ATTACK_Fs8000 27571 /* Floating point value 0.841395 */ 429 #define AGC_ATTACK_Fs11025 28909 /* Floating point value 0.882223 */ 430 #define AGC_ATTACK_Fs12000 29205 /* Floating point value 0.891251 */ 431 #define AGC_ATTACK_Fs16000 30057 /* Floating point value 0.917276 */ 432 #define AGC_ATTACK_Fs22050 30778 /* Floating point value 0.939267 */ 433 #define AGC_ATTACK_Fs24000 30935 /* Floating point value 0.944061 */ 434 #define AGC_ATTACK_Fs32000 31383 /* Floating point value 0.957745 */ 435 #define AGC_ATTACK_Fs44100 31757 /* Floating point value 0.969158 */ 436 #define AGC_ATTACK_Fs48000 31838 /* Floating point value 0.971628 */ 437 #define DECAY_SHIFT 10 /* As a power of 2 */ 438 #define AGC_DECAY_Fs8000 44 /* Floating point value 0.000042 */ 439 #define AGC_DECAY_Fs11025 32 /* Floating point value 0.000030 */ 440 #define AGC_DECAY_Fs12000 29 /* Floating point value 0.000028 */ 441 #define AGC_DECAY_Fs16000 22 /* Floating point value 0.000021 */ 442 #define AGC_DECAY_Fs22050 16 /* Floating point value 0.000015 */ 443 #define AGC_DECAY_Fs24000 15 /* Floating point value 0.000014 */ 444 #define AGC_DECAY_Fs32000 11 /* Floating point value 0.000010 */ 445 #define AGC_DECAY_Fs44100 8 /* Floating point value 0.000008 */ 446 #define AGC_DECAY_Fs48000 7 /* Floating point value 0.000007 */ 447 448 /* AGC Gain settings */ 449 #define AGC_GAIN_SCALE 31 /* As a power of 2 */ 450 #define AGC_GAIN_SHIFT 4 /* As a power of 2 */ 451 #define AGC_TARGETLEVEL 33170337 /* Floating point value -0.100000dB */ 452 #define AGC_HPFGAIN_0dB 110739704 /* Floating point value 0.412538 */ 453 #define AGC_GAIN_0dB 0 /* Floating point value 0.000000 */ 454 #define AGC_HPFGAIN_1dB 157006071 /* Floating point value 0.584893 */ 455 #define AGC_GAIN_1dB 32754079 /* Floating point value 0.122018 */ 456 #define AGC_HPFGAIN_2dB 208917788 /* Floating point value 0.778279 */ 457 #define AGC_GAIN_2dB 69504761 /* Floating point value 0.258925 */ 458 #define AGC_HPFGAIN_3dB 267163693 /* Floating point value 0.995262 */ 459 #define AGC_GAIN_3dB 110739704 /* Floating point value 0.412538 */ 460 #define AGC_HPFGAIN_4dB 332516674 /* Floating point value 1.238721 */ 461 #define AGC_GAIN_4dB 157006071 /* Floating point value 0.584893 */ 462 #define AGC_HPFGAIN_5dB 405843924 /* Floating point value 1.511886 */ 463 #define AGC_GAIN_5dB 208917788 /* Floating point value 0.778279 */ 464 #define AGC_HPFGAIN_6dB 488118451 /* Floating point value 1.818383 */ 465 #define AGC_GAIN_6dB 267163693 /* Floating point value 0.995262 */ 466 #define AGC_HPFGAIN_7dB 580431990 /* Floating point value 2.162278 */ 467 #define AGC_GAIN_7dB 332516674 /* Floating point value 1.238721 */ 468 #define AGC_HPFGAIN_8dB 684009483 /* Floating point value 2.548134 */ 469 #define AGC_GAIN_8dB 405843924 /* Floating point value 1.511886 */ 470 #define AGC_HPFGAIN_9dB 800225343 /* Floating point value 2.981072 */ 471 #define AGC_GAIN_9dB 488118451 /* Floating point value 1.818383 */ 472 #define AGC_HPFGAIN_10dB 930621681 /* Floating point value 3.466836 */ 473 #define AGC_GAIN_10dB 580431990 /* Floating point value 2.162278 */ 474 #define AGC_HPFGAIN_11dB 1076928780 /* Floating point value 4.011872 */ 475 #define AGC_GAIN_11dB 684009483 /* Floating point value 2.548134 */ 476 #define AGC_HPFGAIN_12dB 1241088045 /* Floating point value 4.623413 */ 477 #define AGC_GAIN_12dB 800225343 /* Floating point value 2.981072 */ 478 #define AGC_HPFGAIN_13dB 1425277769 /* Floating point value 5.309573 */ 479 #define AGC_GAIN_13dB 930621681 /* Floating point value 3.466836 */ 480 #define AGC_HPFGAIN_14dB 1631942039 /* Floating point value 6.079458 */ 481 #define AGC_GAIN_14dB 1076928780 /* Floating point value 4.011872 */ 482 #define AGC_HPFGAIN_15dB 1863823163 /* Floating point value 6.943282 */ 483 #define AGC_GAIN_15dB 1241088045 /* Floating point value 4.623413 */ 484 485 486 /************************************************************************************/ 487 /* */ 488 /* Volume control */ 489 /* */ 490 /************************************************************************************/ 491 492 /* Volume control gain */ 493 #define VOLUME_MAX 0 /* In dBs */ 494 #define VOLUME_SHIFT 0 /* In dBs */ 495 496 /* Volume control time constants */ 497 #define VOL_TC_SHIFT 21 /* As a power of 2 */ 498 #define VOL_TC_Fs8000 25889 /* Floating point value 0.024690 */ 499 #define VOL_TC_Fs11025 18850 /* Floating point value 0.017977 */ 500 #define VOL_TC_Fs12000 17331 /* Floating point value 0.016529 */ 501 #define VOL_TC_Fs16000 13026 /* Floating point value 0.012422 */ 502 #define VOL_TC_Fs22050 9468 /* Floating point value 0.009029 */ 503 #define VOL_TC_Fs24000 8702 /* Floating point value 0.008299 */ 504 #define VOL_TC_Fs32000 6533 /* Floating point value 0.006231 */ 505 #define VOL_TC_Fs44100 4745 /* Floating point value 0.004525 */ 506 #define VOL_TC_Fs48000 4360 /* Floating point value 0.004158 */ 507 #define MIX_TC_Fs8000 29365 /* Floating point value 0.896151 */ 508 #define MIX_TC_Fs11025 30230 /* Floating point value 0.922548 */ 509 #define MIX_TC_Fs12000 30422 /* Floating point value 0.928415 */ 510 #define MIX_TC_Fs16000 30978 /* Floating point value 0.945387 */ 511 #define MIX_TC_Fs22050 31451 /* Floating point value 0.959804 */ 512 #define MIX_TC_Fs24000 31554 /* Floating point value 0.962956 */ 513 #define MIX_TC_Fs32000 31850 /* Floating point value 0.971973 */ 514 #define MIX_TC_Fs44100 32097 /* Floating point value 0.979515 */ 515 #define MIX_TC_Fs48000 32150 /* Floating point value 0.981150 */ 516 517 518 #endif 519