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 __LVCS_TABLES_H__
19 #define __LVCS_TABLES_H__
20 
21 #ifdef __cplusplus
22 extern "C" {
23 #endif /* __cplusplus */
24 
25 /************************************************************************************/
26 /*                                                                                  */
27 /*  Includes                                                                        */
28 /*                                                                                  */
29 /************************************************************************************/
30 
31 #include "BIQUAD.h"                             /* Biquad definitions */
32 
33 /************************************************************************************/
34 /*                                                                                  */
35 /*  Stereo Enhancer coefficient constant tables                                     */
36 /*                                                                                  */
37 /************************************************************************************/
38 
39 /* Coefficient table for the middle filter */
40 extern const BiquadA01B1CoefsSP_t LVCS_SEMidCoefTable[];
41 
42 /* Coefficient table for the side filter */
43 extern const BiquadA012B12CoefsSP_t LVCS_SESideCoefTable[];
44 
45 /************************************************************************************/
46 /*                                                                                  */
47 /*  Equaliser coefficient constant tables                                           */
48 /*                                                                                  */
49 /************************************************************************************/
50 
51 extern const BiquadA012B12CoefsSP_t LVCS_EqualiserCoefTable[];
52 
53 /************************************************************************************/
54 /*                                                                                  */
55 /*  Reverb delay constant tables                                                    */
56 /*                                                                                  */
57 /************************************************************************************/
58 
59 /* Stereo delay table for Concert Sound */
60 extern const LVM_UINT16 LVCS_StereoDelayCS[];
61 
62 /************************************************************************************/
63 /*                                                                                  */
64 /*  Reverb coefficients constant table                                              */
65 /*                                                                                  */
66 /************************************************************************************/
67 
68 extern const BiquadA012B12CoefsSP_t LVCS_ReverbCoefTable[];
69 
70 /************************************************************************************/
71 /*                                                                                  */
72 /*  Bypass mixer constant tables                                                    */
73 /*                                                                                  */
74 /************************************************************************************/
75 
76 extern const Gain_t LVCS_OutputGainTable[];
77 
78 /************************************************************************************/
79 /*                                                                                  */
80 /*  Volume correction table                                                         */
81 /*                                                                                  */
82 /*  Coefficient order:                                                              */
83 /*      Compression 100% effect                                                     */
84 /*      Compression 0% effect                                                       */
85 /*      Gain 100% effect                                                            */
86 /*      Gain 0% effect                                                              */
87 /*                                                                                  */
88 /*  The Compression gain is represented by a Q1.15 number to give a range of 0dB    */
89 /*  to +6dB, E.g.:                                                                  */
90 /*          0       is 0dB compression (no effect)                                  */
91 /*          5461    is 1dB compression gain                                         */
92 /*          10923   is 2dB compression gain                                         */
93 /*          32767   is 6dB compression gain                                         */
94 /*                                                                                  */
95 /*  The Gain is represented as a Q3.13 number to give a range of +8 to -infinity    */
96 /*  E.g.:                                                                           */
97 /*          0       is -infinity                                                    */
98 /*          32767   is +18dB (x8) gain                                              */
99 /*          4096    is 0dB gain                                                     */
100 /*          1024    is -12dB gain                                                   */
101 /*                                                                                  */
102 /************************************************************************************/
103 
104 extern const LVCS_VolCorrect_t LVCS_VolCorrectTable[];
105 extern const LVM_INT16 LVCS_VolumeTCTable[];
106 
107 
108 /************************************************************************************/
109 /*                                                                                  */
110 /*  Sample rates                                                                    */
111 /*                                                                                  */
112 /************************************************************************************/
113 
114 extern LVM_INT32                LVCS_SampleRateTable[];
115 
116 
117 /*Speaker coeffient tables*/
118 extern LVM_UINT16               LVCS_MS_Small_SEMiddleGainTable[];
119 extern BiquadA012B12CoefsSP_t   LVCS_MS_Small_SESideCoefTable[];
120 extern BiquadA012B12CoefsSP_t   LVCS_MS_Small_EqualiserCoefTable[];
121 extern BiquadA012B12CoefsSP_t   LVCS_MS_Small_ReverbCoefTable[] ;
122 extern LVM_UINT16               LVCS_MS_Small_StereoDelayCS4MS[];
123 extern Gain_t                   LVCS_MS_Small_OutputGainTable[];
124 extern LVCS_VolCorrect_t        LVCS_MS_Small_VolCorrectTable[];
125 extern LVM_UINT16               LVCS_MS_Small_ReverbGainTable[];
126 
127 extern LVM_UINT16               LVCS_MS_Medium_SEMiddleGainTable[];
128 extern BiquadA012B12CoefsSP_t   LVCS_MS_Medium_SESideCoefTable[];
129 extern BiquadA012B12CoefsSP_t   LVCS_MS_Medium_EqualiserCoefTable[];
130 extern BiquadA012B12CoefsSP_t   LVCS_MS_Medium_ReverbCoefTable[] ;
131 extern LVM_UINT16               LVCS_MS_Medium_StereoDelayCS4MS[];
132 extern Gain_t                   LVCS_MS_Medium_OutputGainTable[];
133 extern LVCS_VolCorrect_t        LVCS_MS_Medium_VolCorrectTable[];
134 extern LVM_UINT16               LVCS_MS_Medium_ReverbGainTable[];
135 
136 extern LVM_UINT16               LVCS_MS_Large_SEMiddleGainTable[];
137 extern BiquadA012B12CoefsSP_t   LVCS_MS_Large_SESideCoefTable[];
138 extern BiquadA012B12CoefsSP_t   LVCS_MS_Large_EqualiserCoefTable[];
139 extern BiquadA012B12CoefsSP_t   LVCS_MS_Large_ReverbCoefTable[] ;
140 extern LVM_UINT16               LVCS_MS_Large_StereoDelayCS4MS[];
141 extern Gain_t                   LVCS_MS_Large_OutputGainTable[];
142 extern LVCS_VolCorrect_t        LVCS_MS_Large_VolCorrectTable[];
143 extern LVM_UINT16               LVCS_MS_Large_ReverbGainTable[];
144 
145 
146 
147 #ifdef __cplusplus
148 }
149 #endif /* __cplusplus */
150 
151 #endif /* __LVCS_TABLES_H__ */
152 
153