Home | History | Annotate | Download | only in lib
      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 __AGC_H__
     19 #define __AGC_H__
     20 
     21 
     22 #ifdef __cplusplus
     23 extern "C" {
     24 #endif /* __cplusplus */
     25 
     26 /**********************************************************************************/
     27 /*                                                                                */
     28 /*    Includes                                                                    */
     29 /*                                                                                */
     30 /**********************************************************************************/
     31 
     32 #include "LVM_Types.h"
     33 
     34 
     35 /**********************************************************************************/
     36 /*                                                                                */
     37 /*    Types                                                                       */
     38 /*                                                                                */
     39 /**********************************************************************************/
     40 
     41 typedef struct
     42 {
     43     LVM_INT32  AGC_Gain;                        /* The current AGC gain */
     44     LVM_INT32  AGC_MaxGain;                     /* The maximum AGC gain */
     45     LVM_INT32  Volume;                          /* The current volume setting */
     46     LVM_INT32  Target;                          /* The target volume setting */
     47     LVM_INT32  AGC_Target;                      /* AGC target level */
     48     LVM_INT16  AGC_Attack;                      /* AGC attack scaler */
     49     LVM_INT16  AGC_Decay;                       /* AGC decay scaler */
     50     LVM_INT16  AGC_GainShift;                   /* The gain shift */
     51     LVM_INT16  VolumeShift;                     /* Volume shift scaling */
     52     LVM_INT16  VolumeTC;                        /* Volume update time constant */
     53 
     54 } AGC_MIX_VOL_2St1Mon_D32_t;
     55 
     56 
     57 /**********************************************************************************/
     58 /*                                                                                */
     59 /*    Function Prototypes                                                              */
     60 /*                                                                                */
     61 /**********************************************************************************/
     62 
     63 void AGC_MIX_VOL_2St1Mon_D32_WRA(AGC_MIX_VOL_2St1Mon_D32_t  *pInstance,     /* Instance pointer */
     64                                  const LVM_INT32            *pStSrc,        /* Stereo source */
     65                                  const LVM_INT32            *pMonoSrc,      /* Mono source */
     66                                  LVM_INT32                  *pDst,          /* Stereo destination */
     67                                  LVM_UINT16                 n);             /* Number of samples */
     68 
     69 #ifdef __cplusplus
     70 }
     71 #endif /* __cplusplus */
     72 
     73 
     74 #endif  /* __AGC_H__ */
     75 
     76 
     77 
     78 
     79 
     80 
     81 
     82 
     83 
     84 
     85