Audio Signal Processing/audio_transducer_chipset_api.h
changeset 0 bb4b476bbb96
child 2 ea09f30a96a5
equal deleted inserted replaced
-1:000000000000 0:bb4b476bbb96
       
     1 /*
       
     2   audio_transducer_chipset_api.h
       
     3 
       
     4   Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
       
     5   All rights reserved.
       
     6 
       
     7   This program and the accompanying materials are made available 
       
     8   under the terms of the Eclipse Public License v1.0 which accompanies 
       
     9   this distribution, and is available at 
       
    10   http://www.eclipse.org/legal/epl-v10.html
       
    11 
       
    12   Initial Contributors:
       
    13   Nokia Corporation - initial contribution.
       
    14 
       
    15   Contributors:
       
    16 */
       
    17 
       
    18 #ifndef AUDIO_TRANSDUCER_CHIPSET_API_H
       
    19 #define AUDIO_TRANSDUCER_CHIPSET_API_H
       
    20 
       
    21 #ifdef __cplusplus
       
    22 extern "C" {
       
    23 #endif /* __cplusplus */
       
    24 
       
    25 
       
    26 /* Each OMX header must include all required header files to allow the
       
    27  *  header to compile without errors.  The includes below are required
       
    28  *  for this header file to compile successfully 
       
    29  */
       
    30 
       
    31 #include <OMX_Audio.h>
       
    32 
       
    33 #define MAX_FIRRESPONSE_POINTS 100
       
    34 
       
    35 /* Transducer Equalizer parameters */
       
    36 
       
    37 
       
    38 typedef enum OMX_AUDIO_PHASERESPONSETYPE {
       
    39 OMX_AUDIO_PhaseNotDefined,   
       
    40 OMX_AUDIO_LinearPhase,	
       
    41 OMX_AUDIO_MinimumPhase,
       
    42 } OMX_AUDIO_PHASERESPONSETYPE;
       
    43 
       
    44 
       
    45 typedef enum OMX_AUDIO_FILTERTYPE {
       
    46 OMX_AUDIO_NotDefined,   
       
    47 OMX_AUDIO_Peaking,	
       
    48 OMX_AUDIO_Lowpass,	
       
    49 OMX_AUDIO_Highpass,
       
    50 OMX_AUDIO_Lowshelf,	
       
    51 OMX_AUDIO_Highshelf,
       
    52 } OMX_AUDIO_FILTERTYPE;
       
    53 
       
    54 
       
    55 typedef struct OMX_AUDIO_CONFIG_IIR_EQUALIZER  {
       
    56      OMX_U32 nSize;
       
    57      OMX_VERSIONTYPE nVersion;  
       
    58      OMX_U32 nPortIndex;
       
    59      OMX_BU32 sBandIndex ; 
       
    60      OMX_AUDIO_FILTERTYPE eFilterType;
       
    61      OMX_U32 nFilterCenterCutoffFrequency;
       
    62      OMX_S32 nFilterGain;
       
    63      OMX_U32 nFilterBandwidth; /* Q-value could be used instead. */
       
    64  } OMX_AUDIO_CONFIG_IIR_EQUALIZER;
       
    65 
       
    66 
       
    67 typedef struct OMX_AUDIO_CONFIG_FIR_RESPONSE  {
       
    68      OMX_U32 nSize;
       
    69      OMX_VERSIONTYPE nVersion;  
       
    70      OMX_U32 nPortIndex;
       
    71      OMX_u32 nFrequencyPoints; 
       
    72      OMX_S32 nFrequencies[MAX_FIRRESPONSE_POINTS];
       
    73      OMX_S32 nGains[MAX_FIRRESPONSE_POINTS];
       
    74 } OMX_AUDIO_CONFIG_FIR_RESPONSE;
       
    75 
       
    76 
       
    77 typedef struct OMX_AUDIO_CONFIG_TRANSDUCEREQUALIZERTYPE  { 
       
    78      OMX_U32 nSize;                                    
       
    79      OMX_VERSIONTYPE nVersion;                   
       
    80      OMX_U32 nPortIndex;            
       
    81      OMX_BOOL bEnableFir;
       
    82      OMX_BOOL bEnableIir;
       
    83      OMX_U32 nChannel;
       
    84      OMX_AUDIO_PHASERESPONSETYPE ePhaseResponseTargetFir;
       
    85      OMX_AUDIO_PHASERESPONSETYPE ePhaseResponseTargetIir;
       
    86      OMX_U32 nIIREqualizerBlocks;
       
    87      OMX_U32 nIIREqualizerGain;
       
    88 } OMX_AUDIO_CONFIG_TRANSDUCEREQUALIZERTYPE;
       
    89 
       
    90 
       
    91 /* MDRC parameters */
       
    92 
       
    93 typedef struct OMX_AUDIO_CONFIG_MDRCTYPE {
       
    94     OMX_U32 nSize;
       
    95     OMX_VERSIONTYPE nVersion;
       
    96     OMX_U32 nPortIndex;
       
    97     OMX_BOOL bEnable;
       
    98     OMX_BU32 sBandIndex;
       
    99     OMX_BU32 sBandRange;
       
   100     OMX_BU32 sBandLevel;
       
   101     OMX_BU32 sKneePoints;	
       
   102     OMX_U32 nDynamicResponse[10][2];
       
   103     OMX_BU32 sAttackTime; 
       
   104     OMX_BU32 sReleaseTime;	    
       
   105 } OMX_AUDIO_CONFIG_MDRCTYPE;
       
   106 
       
   107 /* Transducer (Loudspeaker) protection parameters */
       
   108 
       
   109 typedef struct OMX_AUDIO_CONFIG_LSPROTECTIONTYPE {
       
   110     OMX_U32 nSize;
       
   111     OMX_VERSIONTYPE nVersion;
       
   112     OMX_U32 nPortIndex;
       
   113     OMX_AUDIO_CHANNELTYPE eChannel;
       
   114     OMX_BOOL bEnable;
       
   115  } OMX_AUDIO_CONFIG_LSPROTECTIONTYPE;
       
   116 
       
   117 /* End of Transducer protection params */
       
   118 
       
   119 /* Transducer SPL limit parameters */
       
   120 
       
   121 typedef enum OMX_AUDIO_SPLLIMITTYPE {
       
   122 OMX_AUDIO_SPLLimitation,	
       
   123 OMX_AUDIO_SPLNormalization,	
       
   124 OMX_AUDIO_SPLMax,
       
   125 } OMX_AUDIO_OMX_AUDIO_SPLLIMITTYPE;
       
   126 
       
   127 
       
   128 typedef struct OMX_AUDIO_CONFIG_SPLLIMITTYPE {
       
   129     OMX_U32 nSize;
       
   130     OMX_VERSIONTYPE nVersion;
       
   131     OMX_U32 nPortIndex;
       
   132     OMX_BOOL bEnable;
       
   133     OMX_AUDIO_SPLLIMITTYPE eMode;
       
   134     OMX_S32 nSplLimit;
       
   135     OMX_S32 nGain;	    
       
   136 } OMX_AUDIO_CONFIG_SPLLIMITTYPE;
       
   137 /* End of transducer SPL limit params */
       
   138 
       
   139 /* Click Removal algorithm parameters */
       
   140 
       
   141 typedef struct OMX_AUDIO_CONFIG_CLICKREMOVALTYPE {
       
   142    	OMX_U32 nSize;
       
   143    	OMX_VERSIONTYPE nVersion;
       
   144    	OMX_U32 nPortIndex;
       
   145    	OMX_BOOL bEnable;
       
   146 		OMX_BU16 sClickControl;
       
   147 } OMX_AUDIO_CONFIG_CLICKREMOVALTYPE;
       
   148 /* End of click removal params */
       
   149 
       
   150 /* Earpiece Active Noise Control */
       
   151 
       
   152 typedef struct OMX_AUDIO_CONFIG_EARPIECE_ACTIVE_NOISE_CONTROL { 
       
   153      OMX_U32 nSize;                                    
       
   154      OMX_VERSIONTYPE nVersion;                   
       
   155      OMX_U32 nPortIndex;            
       
   156      OMX_BOOL bEnable;
       
   157 } OMX_AUDIO_CONFIG_EARPIECE_ACTIVE_NOISE_CONTROL;
       
   158 
       
   159 /* Algorithm for Preventing System Shutdown by Audio System (APSSAS) */
       
   160 
       
   161 typedef struct OMX_AUDIO_PARAM_APSSASTYPE {
       
   162     OMX_U32 nSize;
       
   163     OMX_VERSIONTYPE nVersion;
       
   164     OMX_U32 nPortIndex;
       
   165     OMX_BOOL bEnable;
       
   166 } OMX_AUDIO_PARAM_APSSASTYPE;
       
   167 
       
   168 typedef struct OMX_AUDIO_CONFIG_BATTERY_VOLTAGETYPE {
       
   169     OMX_U32 nSize;
       
   170     OMX_VERSIONTYPE nVersion;
       
   171     OMX_U32 nPortIndex;
       
   172     OMX_U32 nBattVol;
       
   173 } OMX_AUDIO_CONFIG_BATTERY_VOLTAGETYPE;
       
   174 
       
   175 
       
   176 #ifdef __cplusplus
       
   177 }
       
   178 #endif /* __cplusplus */
       
   179 
       
   180 #endif