• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 __LVC_MIXER_PRIVATE_H__
19 #define __LVC_MIXER_PRIVATE_H__
20 
21 /**********************************************************************************
22    INCLUDE FILES
23 ***********************************************************************************/
24 
25 #include "LVC_Mixer.h"
26 #include "VectorArithmetic.h"
27 
28 /* Instance parameter structure */
29 typedef struct {
30     /* General */
31     LVM_FLOAT Target;  /*number specifying value of Target Gain */
32     LVM_FLOAT Current; /*number specifying value of Current Gain */
33     LVM_FLOAT Delta;   /*number specifying value of Delta Gain */
34 } Mix_Private_FLOAT_st;
35 
36 /**********************************************************************************
37    DEFINITIONS
38 ***********************************************************************************/
39 #define LVCore_MixInSoft_D32C31_SAT LVCore_InSoft_D32C31_SAT
40 #define LVCore_MixSoft_1St_D32C31_WRA LVCore_Soft_1St_D32C31_WRA
41 #define LVCore_MixHard_2St_D32C31_SAT LVCore_Hard_2St_D32C31_SAT
42 
43 /**********************************************************************************
44    FUNCTION PROTOTYPES (LOW LEVEL SUBFUNCTIONS)
45 ***********************************************************************************/
46 
47 /*** 16 bit functions *************************************************************/
48 void LVC_Core_MixInSoft_D16C31_SAT(LVMixer3_FLOAT_st* ptrInstance, const LVM_FLOAT* src,
49                                    LVM_FLOAT* dst, LVM_INT16 n);
50 void LVC_Core_MixInSoft_Mc_D16C31_SAT(LVMixer3_FLOAT_st* ptrInstance, const LVM_FLOAT* src,
51                                       LVM_FLOAT* dst, LVM_INT16 NrFrames, LVM_INT16 NrChannels);
52 void LVC_Core_MixSoft_1St_D16C31_WRA(LVMixer3_FLOAT_st* ptrInstance, const LVM_FLOAT* src,
53                                      LVM_FLOAT* dst, LVM_INT16 n);
54 void LVC_Core_MixSoft_Mc_D16C31_WRA(LVMixer3_FLOAT_st* ptrInstance, const LVM_FLOAT* src,
55                                     LVM_FLOAT* dst, LVM_INT16 NrFrames, LVM_INT16 NrChannels);
56 void LVC_Core_MixHard_2St_D16C31_SAT(LVMixer3_FLOAT_st* pInstance1, LVMixer3_FLOAT_st* pInstance2,
57                                      const LVM_FLOAT* src1, const LVM_FLOAT* src2, LVM_FLOAT* dst,
58                                      LVM_INT16 n);
59 
60 /**********************************************************************************/
61 /* For applying different gains to Left and right chennals                        */
62 /* ptrInstance1 applies to Left channel                                           */
63 /* ptrInstance2 applies to Right channel                                          */
64 /* Gain values should not be more that 1.0                                        */
65 /**********************************************************************************/
66 void LVC_Core_MixSoft_1St_MC_float_WRA(Mix_Private_FLOAT_st** ptrInstance, const LVM_FLOAT* src,
67                                        LVM_FLOAT* dst, LVM_INT16 NrFrames, LVM_INT16 NrChannels);
68 
69 /**********************************************************************************/
70 /* For applying different gains to Left and right chennals                        */
71 /* ptrInstance1 applies to Left channel                                           */
72 /* ptrInstance2 applies to Right channel                                          */
73 /* Gain values should not be more that 1.0                                        */
74 /**********************************************************************************/
75 void LVC_Core_MixHard_1St_MC_float_SAT(Mix_Private_FLOAT_st** ptrInstance, const LVM_FLOAT* src,
76                                        LVM_FLOAT* dst, LVM_INT16 NrFrames, LVM_INT16 NrChannels);
77 
78 #endif  //#ifndef __LVC_MIXER_PRIVATE_H__
79