LVCS_StereoEnhancer.h revision 2c8e5cab3faa6d360e222b7a6c40a80083d021ac
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     $Author: beq07716 $
21     $Revision: 1001 $
22     $Date: 2010-06-28 13:23:02 +0200 (Mon, 28 Jun 2010) $
23
24*************************************************************************************/
25
26#ifndef __LVCS_STEREOENHANCER_H__
27#define __LVCS_STEREOENHANCER_H__
28
29#ifdef __cplusplus
30extern "C" {
31#endif /* __cplusplus */
32
33
34/************************************************************************************/
35/*                                                                                  */
36/*    Includes                                                                      */
37/*                                                                                  */
38/************************************************************************************/
39
40#include "Filters.h"                        /* Filter definitions */
41#include "LVCS_Headphone_Coeffs.h"          /* Headphone coefficients */
42#include "BIQUAD.h"
43
44
45/************************************************************************************/
46/*                                                                                  */
47/*    Structures                                                                    */
48/*                                                                                  */
49/************************************************************************************/
50
51/* Stereo enhancer structure */
52typedef struct
53{
54    /*
55     * Middle filter
56     */
57    void                    (*pBiquadCallBack_Mid)(Biquad_Instance_t*, LVM_INT16*, LVM_INT16*, LVM_INT16);
58
59    /*
60     * Side filter
61     */
62    void                    (*pBiquadCallBack_Side)(Biquad_Instance_t*, LVM_INT16*, LVM_INT16*, LVM_INT16);
63
64      LVM_UINT16              MidGain;            /* Middle gain in mobile speaker mode */
65
66} LVCS_StereoEnhancer_t;
67
68
69/************************************************************************************/
70/*                                                                                  */
71/*    Function prototypes                                                           */
72/*                                                                                  */
73/************************************************************************************/
74
75LVCS_ReturnStatus_en LVCS_SEnhancerInit(LVCS_Handle_t        hInstance,
76                                        LVCS_Params_t        *pParams);
77
78LVCS_ReturnStatus_en LVCS_StereoEnhancer(LVCS_Handle_t        hInstance,
79                                         const LVM_INT16    *pInData,
80                                         LVM_INT16            *pOutData,
81                                         LVM_UINT16            NumSamples);
82
83
84#ifdef __cplusplus
85}
86#endif /* __cplusplus */
87
88#endif  /* STEREOENHANCE_H */
89