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 _FILTER_H_
19#define _FILTER_H_
20
21#ifdef __cplusplus
22extern "C" {
23#endif /* __cplusplus */
24
25/**********************************************************************************
26   INCLUDES
27***********************************************************************************/
28#include "LVM_Types.h"
29#include "BIQUAD.h"
30
31
32/**********************************************************************************
33   DEFINES
34***********************************************************************************/
35#define FILTER_LOSS     32730       /* -0.01dB loss to avoid wrapping due to band ripple */
36
37/**********************************************************************************
38   FUNCTION PROTOTYPES
39***********************************************************************************/
40
41LVM_INT32 LVM_Polynomial(LVM_UINT16 N,
42                         LVM_INT32  *pCoefficients,
43                         LVM_INT32  X);
44
45LVM_INT32 LVM_Power10(   LVM_INT32  X);
46
47LVM_INT32 LVM_FO_LPF(    LVM_INT32  w,
48                         FO_C32_Coefs_t  *pCoeffs);
49
50LVM_INT32 LVM_FO_HPF(    LVM_INT32  w,
51                         FO_C32_Coefs_t  *pCoeffs);
52
53LVM_INT32   LVM_GetOmega(LVM_UINT16  Fc,
54                         LVM_Fs_en   SampleRate);
55
56/**********************************************************************************/
57#ifdef __cplusplus
58}
59#endif /* __cplusplus */
60
61#endif  /** _FILTER_H_ **/
62
63