• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2008 The Khronos Group Inc.
3  *
4  * Permission is hereby granted, free of charge, to any person obtaining
5  * a copy of this software and associated documentation files (the
6  * "Software"), to deal in the Software without restriction, including
7  * without limitation the rights to use, copy, modify, merge, publish,
8  * distribute, sublicense, and/or sell copies of the Software, and to
9  * permit persons to whom the Software is furnished to do so, subject
10  * to the following conditions:
11  * The above copyright notice and this permission notice shall be included
12  * in all copies or substantial portions of the Software.
13  *
14  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
15  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
17  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
18  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
19  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
20  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21  *
22  */
23 
24 /** @file OMX_Audio.h - OpenMax IL version 1.1.2
25  *  The structures needed by Audio components to exchange
26  *  parameters and configuration data with the componenmilts.
27  */
28 
29 #ifndef OMX_Audio_h
30 #define OMX_Audio_h
31 
32 #ifdef __cplusplus
33 extern "C" {
34 #endif /* __cplusplus */
35 
36 
37 /* Each OMX header must include all required header files to allow the
38  *  header to compile without errors.  The includes below are required
39  *  for this header file to compile successfully
40  */
41 
42 #include <OMX_Core.h>
43 
44 /** @defgroup midi MIDI
45  * @ingroup audio
46  */
47 
48 /** @defgroup effects Audio effects
49  * @ingroup audio
50  */
51 
52 /** @defgroup audio OpenMAX IL Audio Domain
53  * Structures for OpenMAX IL Audio domain
54  * @{
55  */
56 
57 /** Enumeration used to define the possible audio codings.
58  *  If "OMX_AUDIO_CodingUnused" is selected, the coding selection must
59  *  be done in a vendor specific way.  Since this is for an audio
60  *  processing element this enum is relevant.  However, for another
61  *  type of component other enums would be in this area.
62  */
63 typedef enum OMX_AUDIO_CODINGTYPE {
64     OMX_AUDIO_CodingUnused = 0,  /**< Placeholder value when coding is N/A  */
65     OMX_AUDIO_CodingAutoDetect,  /**< auto detection of audio format */
66     OMX_AUDIO_CodingPCM,         /**< Any variant of PCM coding */
67     OMX_AUDIO_CodingADPCM,       /**< Any variant of ADPCM encoded data */
68     OMX_AUDIO_CodingAMR,         /**< Any variant of AMR encoded data */
69     OMX_AUDIO_CodingGSMFR,       /**< Any variant of GSM fullrate (i.e. GSM610) */
70     OMX_AUDIO_CodingGSMEFR,      /**< Any variant of GSM Enhanced Fullrate encoded data*/
71     OMX_AUDIO_CodingGSMHR,       /**< Any variant of GSM Halfrate encoded data */
72     OMX_AUDIO_CodingPDCFR,       /**< Any variant of PDC Fullrate encoded data */
73     OMX_AUDIO_CodingPDCEFR,      /**< Any variant of PDC Enhanced Fullrate encoded data */
74     OMX_AUDIO_CodingPDCHR,       /**< Any variant of PDC Halfrate encoded data */
75     OMX_AUDIO_CodingTDMAFR,      /**< Any variant of TDMA Fullrate encoded data (TIA/EIA-136-420) */
76     OMX_AUDIO_CodingTDMAEFR,     /**< Any variant of TDMA Enhanced Fullrate encoded data (TIA/EIA-136-410) */
77     OMX_AUDIO_CodingQCELP8,      /**< Any variant of QCELP 8kbps encoded data */
78     OMX_AUDIO_CodingQCELP13,     /**< Any variant of QCELP 13kbps encoded data */
79     OMX_AUDIO_CodingEVRC,        /**< Any variant of EVRC encoded data */
80     OMX_AUDIO_CodingSMV,         /**< Any variant of SMV encoded data */
81     OMX_AUDIO_CodingG711,        /**< Any variant of G.711 encoded data */
82     OMX_AUDIO_CodingG723,        /**< Any variant of G.723 dot 1 encoded data */
83     OMX_AUDIO_CodingG726,        /**< Any variant of G.726 encoded data */
84     OMX_AUDIO_CodingG729,        /**< Any variant of G.729 encoded data */
85     OMX_AUDIO_CodingAAC,         /**< Any variant of AAC encoded data */
86     OMX_AUDIO_CodingMP3,         /**< Any variant of MP3 encoded data */
87     OMX_AUDIO_CodingSBC,         /**< Any variant of SBC encoded data */
88     OMX_AUDIO_CodingVORBIS,      /**< Any variant of VORBIS encoded data */
89     OMX_AUDIO_CodingWMA,         /**< Any variant of WMA encoded data */
90     OMX_AUDIO_CodingRA,          /**< Any variant of RA encoded data */
91     OMX_AUDIO_CodingMIDI,        /**< Any variant of MIDI encoded data */
92     OMX_AUDIO_CodingAC3,         /**< Any variant of AC3 encoded data */
93     OMX_AUDIO_CodingKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
94     OMX_AUDIO_CodingVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
95     OMX_AUDIO_CodingMax = 0x7FFFFFFF
96 } OMX_AUDIO_CODINGTYPE;
97 
98 
99 /** The PortDefinition structure is used to define all of the parameters
100  *  necessary for the compliant component to setup an input or an output audio
101  *  path.  If additional information is needed to define the parameters of the
102  *  port (such as frequency), additional structures must be sent such as the
103  *  OMX_AUDIO_PARAM_PCMMODETYPE structure to supply the extra parameters for the port.
104  */
105 typedef struct OMX_AUDIO_PORTDEFINITIONTYPE {
106     OMX_STRING cMIMEType;            /**< MIME type of data for the port */
107     OMX_NATIVE_DEVICETYPE pNativeRender; /** < platform specific reference
108                                                for an output device,
109                                                otherwise this field is 0 */
110     OMX_BOOL bFlagErrorConcealment;  /**< Turns on error concealment if it is
111                                           supported by the OMX component */
112     OMX_AUDIO_CODINGTYPE eEncoding;  /**< Type of data expected for this
113                                           port (e.g. PCM, AMR, MP3, etc) */
114 } OMX_AUDIO_PORTDEFINITIONTYPE;
115 
116 
117 /**  Port format parameter.  This structure is used to enumerate
118   *  the various data input/output format supported by the port.
119   */
120 typedef struct OMX_AUDIO_PARAM_PORTFORMATTYPE {
121     OMX_U32 nSize;                  /**< size of the structure in bytes */
122     OMX_VERSIONTYPE nVersion;       /**< OMX specification version information */
123     OMX_U32 nPortIndex;             /**< Indicates which port to set */
124     OMX_U32 nIndex;                 /**< Indicates the enumeration index for the format from 0x0 to N-1 */
125     OMX_AUDIO_CODINGTYPE eEncoding; /**< Type of data expected for this port (e.g. PCM, AMR, MP3, etc) */
126 } OMX_AUDIO_PARAM_PORTFORMATTYPE;
127 
128 
129 /** PCM mode type  */
130 typedef enum OMX_AUDIO_PCMMODETYPE {
131     OMX_AUDIO_PCMModeLinear = 0,  /**< Linear PCM encoded data */
132     OMX_AUDIO_PCMModeALaw,        /**< A law PCM encoded data (G.711) */
133     OMX_AUDIO_PCMModeMULaw,       /**< Mu law PCM encoded data (G.711)  */
134     OMX_AUDIO_PCMModeKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
135     OMX_AUDIO_PCMModeVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
136     OMX_AUDIO_PCMModeMax = 0x7FFFFFFF
137 } OMX_AUDIO_PCMMODETYPE;
138 
139 
140 typedef enum OMX_AUDIO_CHANNELTYPE {
141     OMX_AUDIO_ChannelNone = 0x0,    /**< Unused or empty */
142     OMX_AUDIO_ChannelLF   = 0x1,    /**< Left front */
143     OMX_AUDIO_ChannelRF   = 0x2,    /**< Right front */
144     OMX_AUDIO_ChannelCF   = 0x3,    /**< Center front */
145     OMX_AUDIO_ChannelLS   = 0x4,    /**< Left surround */
146     OMX_AUDIO_ChannelRS   = 0x5,    /**< Right surround */
147     OMX_AUDIO_ChannelLFE  = 0x6,    /**< Low frequency effects */
148     OMX_AUDIO_ChannelCS   = 0x7,    /**< Back surround */
149     OMX_AUDIO_ChannelLR   = 0x8,    /**< Left rear. */
150     OMX_AUDIO_ChannelRR   = 0x9,    /**< Right rear. */
151     OMX_AUDIO_ChannelKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
152     OMX_AUDIO_ChannelVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
153     OMX_AUDIO_ChannelMax  = 0x7FFFFFFF
154 } OMX_AUDIO_CHANNELTYPE;
155 
156 #define OMX_AUDIO_MAXCHANNELS 16  /**< maximum number distinct audio channels that a buffer may contain */
157 #define OMX_MIN_PCMPAYLOAD_MSEC 5 /**< Minimum audio buffer payload size for uncompressed (PCM) audio */
158 
159 /** PCM format description */
160 typedef struct OMX_AUDIO_PARAM_PCMMODETYPE {
161     OMX_U32 nSize;                    /**< Size of this structure, in Bytes */
162     OMX_VERSIONTYPE nVersion;         /**< OMX specification version information */
163     OMX_U32 nPortIndex;               /**< port that this structure applies to */
164     OMX_U32 nChannels;                /**< Number of channels (e.g. 2 for stereo) */
165     OMX_NUMERICALDATATYPE eNumData;   /**< indicates PCM data as signed or unsigned */
166     OMX_ENDIANTYPE eEndian;           /**< indicates PCM data as little or big endian */
167     OMX_BOOL bInterleaved;            /**< True for normal interleaved data; false for
168                                            non-interleaved data (e.g. block data) */
169     OMX_U32 nBitPerSample;            /**< Bit per sample */
170     OMX_U32 nSamplingRate;            /**< Sampling rate of the source data.  Use 0 for
171                                            variable or unknown sampling rate. */
172     OMX_AUDIO_PCMMODETYPE ePCMMode;   /**< PCM mode enumeration */
173     OMX_AUDIO_CHANNELTYPE eChannelMapping[OMX_AUDIO_MAXCHANNELS]; /**< Slot i contains channel defined by eChannelMap[i] */
174 
175 } OMX_AUDIO_PARAM_PCMMODETYPE;
176 
177 
178 /** Audio channel mode.  This is used by both AAC and MP3, although the names are more appropriate
179  * for the MP3.  For example, JointStereo for MP3 is CouplingChannels for AAC.
180  */
181 typedef enum OMX_AUDIO_CHANNELMODETYPE {
182     OMX_AUDIO_ChannelModeStereo = 0,  /**< 2 channels, the bitrate allocation between those
183                                           two channels changes accordingly to each channel information */
184     OMX_AUDIO_ChannelModeJointStereo, /**< mode that takes advantage of what is common between
185                                            2 channels for higher compression gain */
186     OMX_AUDIO_ChannelModeDual,        /**< 2 mono-channels, each channel is encoded with half
187                                            the bitrate of the overall bitrate */
188     OMX_AUDIO_ChannelModeMono,        /**< Mono channel mode */
189     OMX_AUDIO_ChannelModeKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
190     OMX_AUDIO_ChannelModeVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
191     OMX_AUDIO_ChannelModeMax = 0x7FFFFFFF
192 } OMX_AUDIO_CHANNELMODETYPE;
193 
194 
195 typedef enum OMX_AUDIO_MP3STREAMFORMATTYPE {
196     OMX_AUDIO_MP3StreamFormatMP1Layer3 = 0, /**< MP3 Audio MPEG 1 Layer 3 Stream format */
197     OMX_AUDIO_MP3StreamFormatMP2Layer3,     /**< MP3 Audio MPEG 2 Layer 3 Stream format */
198     OMX_AUDIO_MP3StreamFormatMP2_5Layer3,   /**< MP3 Audio MPEG2.5 Layer 3 Stream format */
199     OMX_AUDIO_MP3StreamFormatKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
200     OMX_AUDIO_MP3StreamFormatVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
201     OMX_AUDIO_MP3StreamFormatMax = 0x7FFFFFFF
202 } OMX_AUDIO_MP3STREAMFORMATTYPE;
203 
204 /** MP3 params */
205 typedef struct OMX_AUDIO_PARAM_MP3TYPE {
206     OMX_U32 nSize;                 /**< size of the structure in bytes */
207     OMX_VERSIONTYPE nVersion;      /**< OMX specification version information */
208     OMX_U32 nPortIndex;            /**< port that this structure applies to */
209     OMX_U32 nChannels;             /**< Number of channels */
210     OMX_U32 nBitRate;              /**< Bit rate of the input data.  Use 0 for variable
211                                         rate or unknown bit rates */
212     OMX_U32 nSampleRate;           /**< Sampling rate of the source data.  Use 0 for
213                                         variable or unknown sampling rate. */
214     OMX_U32 nAudioBandWidth;       /**< Audio band width (in Hz) to which an encoder should
215                                         limit the audio signal. Use 0 to let encoder decide */
216     OMX_AUDIO_CHANNELMODETYPE eChannelMode;   /**< Channel mode enumeration */
217     OMX_AUDIO_MP3STREAMFORMATTYPE eFormat;  /**< MP3 stream format */
218 } OMX_AUDIO_PARAM_MP3TYPE;
219 
220 
221 typedef enum OMX_AUDIO_AACSTREAMFORMATTYPE {
222     OMX_AUDIO_AACStreamFormatMP2ADTS = 0, /**< AAC Audio Data Transport Stream 2 format */
223     OMX_AUDIO_AACStreamFormatMP4ADTS,     /**< AAC Audio Data Transport Stream 4 format */
224     OMX_AUDIO_AACStreamFormatMP4LOAS,     /**< AAC Low Overhead Audio Stream format */
225     OMX_AUDIO_AACStreamFormatMP4LATM,     /**< AAC Low overhead Audio Transport Multiplex */
226     OMX_AUDIO_AACStreamFormatADIF,        /**< AAC Audio Data Interchange Format */
227     OMX_AUDIO_AACStreamFormatMP4FF,       /**< AAC inside MPEG-4/ISO File Format */
228     OMX_AUDIO_AACStreamFormatRAW,         /**< AAC Raw Format */
229     OMX_AUDIO_AACStreamFormatKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
230     OMX_AUDIO_AACStreamFormatVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
231     OMX_AUDIO_AACStreamFormatMax = 0x7FFFFFFF
232 } OMX_AUDIO_AACSTREAMFORMATTYPE;
233 
234 
235 /** AAC mode type.  Note that the term profile is used with the MPEG-2
236  * standard and the term object type and profile is used with MPEG-4 */
237 typedef enum OMX_AUDIO_AACPROFILETYPE{
238   OMX_AUDIO_AACObjectNull = 0,      /**< Null, not used */
239   OMX_AUDIO_AACObjectMain = 1,      /**< AAC Main object */
240   OMX_AUDIO_AACObjectLC,            /**< AAC Low Complexity object (AAC profile) */
241   OMX_AUDIO_AACObjectSSR,           /**< AAC Scalable Sample Rate object */
242   OMX_AUDIO_AACObjectLTP,           /**< AAC Long Term Prediction object */
243   OMX_AUDIO_AACObjectHE,            /**< AAC High Efficiency (object type SBR, HE-AAC profile) */
244   OMX_AUDIO_AACObjectScalable,      /**< AAC Scalable object */
245   OMX_AUDIO_AACObjectERLC = 17,     /**< ER AAC Low Complexity object (Error Resilient AAC-LC) */
246   OMX_AUDIO_AACObjectLD = 23,       /**< AAC Low Delay object (Error Resilient) */
247   OMX_AUDIO_AACObjectHE_PS = 29,    /**< AAC High Efficiency with Parametric Stereo coding (HE-AAC v2, object type PS) */
248   OMX_AUDIO_AACObjectKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
249   OMX_AUDIO_AACObjectVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
250   OMX_AUDIO_AACObjectMax = 0x7FFFFFFF
251 } OMX_AUDIO_AACPROFILETYPE;
252 
253 
254 /** AAC tool usage (for nAACtools in OMX_AUDIO_PARAM_AACPROFILETYPE).
255  * Required for encoder configuration and optional as decoder info output.
256  * For MP3, OMX_AUDIO_CHANNELMODETYPE is sufficient. */
257 #define OMX_AUDIO_AACToolNone 0x00000000 /**< no AAC tools allowed (encoder config) or active (decoder info output) */
258 #define OMX_AUDIO_AACToolMS   0x00000001 /**< MS: Mid/side joint coding tool allowed or active */
259 #define OMX_AUDIO_AACToolIS   0x00000002 /**< IS: Intensity stereo tool allowed or active */
260 #define OMX_AUDIO_AACToolTNS  0x00000004 /**< TNS: Temporal Noise Shaping tool allowed or active */
261 #define OMX_AUDIO_AACToolPNS  0x00000008 /**< PNS: MPEG-4 Perceptual Noise substitution tool allowed or active */
262 #define OMX_AUDIO_AACToolLTP  0x00000010 /**< LTP: MPEG-4 Long Term Prediction tool allowed or active */
263 #define OMX_AUDIO_AACToolAll  0x7FFFFFFF /**< all AAC tools allowed or active (*/
264 
265 /** MPEG-4 AAC error resilience (ER) tool usage (for nAACERtools in OMX_AUDIO_PARAM_AACPROFILETYPE).
266  * Required for ER encoder configuration and optional as decoder info output */
267 #define OMX_AUDIO_AACERNone  0x00000000  /**< no AAC ER tools allowed/used */
268 #define OMX_AUDIO_AACERVCB11 0x00000001  /**< VCB11: Virtual Code Books for AAC section data */
269 #define OMX_AUDIO_AACERRVLC  0x00000002  /**< RVLC: Reversible Variable Length Coding */
270 #define OMX_AUDIO_AACERHCR   0x00000004  /**< HCR: Huffman Codeword Reordering */
271 #define OMX_AUDIO_AACERAll   0x7FFFFFFF  /**< all AAC ER tools allowed/used */
272 
273 
274 /** AAC params */
275 typedef struct OMX_AUDIO_PARAM_AACPROFILETYPE {
276     OMX_U32 nSize;                 /**< Size of this structure, in Bytes */
277     OMX_VERSIONTYPE nVersion;      /**< OMX specification version information */
278     OMX_U32 nPortIndex;            /**< Port that this structure applies to */
279     OMX_U32 nChannels;             /**< Number of channels */
280     OMX_U32 nSampleRate;           /**< Sampling rate of the source data.  Use 0 for
281                                         variable or unknown sampling rate. */
282     OMX_U32 nBitRate;              /**< Bit rate of the input data.  Use 0 for variable
283                                         rate or unknown bit rates */
284     OMX_U32 nAudioBandWidth;       /**< Audio band width (in Hz) to which an encoder should
285                                         limit the audio signal. Use 0 to let encoder decide */
286     OMX_U32 nFrameLength;          /**< Frame length (in audio samples per channel) of the codec.
287                                         Can be 1024 or 960 (AAC-LC), 2048 (HE-AAC), 480 or 512 (AAC-LD).
288                                         Use 0 to let encoder decide */
289     OMX_U32 nAACtools;             /**< AAC tool usage */
290     OMX_U32 nAACERtools;           /**< MPEG-4 AAC error resilience tool usage */
291     OMX_AUDIO_AACPROFILETYPE eAACProfile;   /**< AAC profile enumeration */
292     OMX_AUDIO_AACSTREAMFORMATTYPE eAACStreamFormat; /**< AAC stream format enumeration */
293     OMX_AUDIO_CHANNELMODETYPE eChannelMode;   /**< Channel mode enumeration */
294 } OMX_AUDIO_PARAM_AACPROFILETYPE;
295 
296 
297 /** VORBIS params */
298 typedef struct OMX_AUDIO_PARAM_VORBISTYPE {
299     OMX_U32 nSize;            /**< size of the structure in bytes */
300     OMX_VERSIONTYPE nVersion; /**< OMX specification version information */
301     OMX_U32 nPortIndex;       /**< port that this structure applies to */
302     OMX_U32 nChannels;        /**< Number of channels */
303     OMX_U32 nBitRate;         /**< Bit rate of the encoded data data.  Use 0 for variable
304                                    rate or unknown bit rates. Encoding is set to the
305                                    bitrate closest to specified  value (in bps) */
306     OMX_U32 nMinBitRate;      /**< Sets minimum bitrate (in bps). */
307     OMX_U32 nMaxBitRate;      /**< Sets maximum bitrate (in bps). */
308 
309     OMX_U32 nSampleRate;      /**< Sampling rate of the source data.  Use 0 for
310                                    variable or unknown sampling rate. */
311     OMX_U32 nAudioBandWidth;  /**< Audio band width (in Hz) to which an encoder should
312                                    limit the audio signal. Use 0 to let encoder decide */
313     OMX_S32 nQuality;		  /**< Sets encoding quality to n, between -1 (low) and 10 (high).
314                                    In the default mode of operation, teh quality level is 3.
315                                    Normal quality range is 0 - 10. */
316     OMX_BOOL bManaged;		  /**< Set  bitrate  management  mode. This turns off the
317                                    normal VBR encoding, but allows hard or soft bitrate
318                                    constraints to be enforced by the encoder. This mode can
319                                    be slower, and may also be lower quality. It is
320                                    primarily useful for streaming. */
321     OMX_BOOL bDownmix;		  /**< Downmix input from stereo to mono (has no effect on
322                                    non-stereo streams). Useful for lower-bitrate encoding. */
323 } OMX_AUDIO_PARAM_VORBISTYPE;
324 
325 
326 /** WMA Version */
327 typedef enum OMX_AUDIO_WMAFORMATTYPE {
328   OMX_AUDIO_WMAFormatUnused = 0, /**< format unused or unknown */
329   OMX_AUDIO_WMAFormat7,          /**< Windows Media Audio format 7 */
330   OMX_AUDIO_WMAFormat8,          /**< Windows Media Audio format 8 */
331   OMX_AUDIO_WMAFormat9,          /**< Windows Media Audio format 9 */
332   OMX_AUDIO_WMAFormatKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
333   OMX_AUDIO_WMAFormatVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
334   OMX_AUDIO_WMAFormatMax = 0x7FFFFFFF
335 } OMX_AUDIO_WMAFORMATTYPE;
336 
337 
338 /** WMA Profile */
339 typedef enum OMX_AUDIO_WMAPROFILETYPE {
340   OMX_AUDIO_WMAProfileUnused = 0,  /**< profile unused or unknown */
341   OMX_AUDIO_WMAProfileL1,          /**< Windows Media audio version 9 profile L1 */
342   OMX_AUDIO_WMAProfileL2,          /**< Windows Media audio version 9 profile L2 */
343   OMX_AUDIO_WMAProfileL3,          /**< Windows Media audio version 9 profile L3 */
344   OMX_AUDIO_WMAProfileKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
345   OMX_AUDIO_WMAProfileVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
346   OMX_AUDIO_WMAProfileMax = 0x7FFFFFFF
347 } OMX_AUDIO_WMAPROFILETYPE;
348 
349 
350 /** WMA params */
351 typedef struct OMX_AUDIO_PARAM_WMATYPE {
352     OMX_U32 nSize;            /**< size of the structure in bytes */
353     OMX_VERSIONTYPE nVersion; /**< OMX specification version information */
354     OMX_U32 nPortIndex;       /**< port that this structure applies to */
355     OMX_U16 nChannels;        /**< Number of channels */
356     OMX_U32 nBitRate;         /**< Bit rate of the input data.  Use 0 for variable
357                                    rate or unknown bit rates */
358     OMX_AUDIO_WMAFORMATTYPE eFormat; /**< Version of WMA stream / data */
359 	OMX_AUDIO_WMAPROFILETYPE eProfile;  /**< Profile of WMA stream / data */
360     OMX_U32 nSamplingRate;    /**< Sampling rate of the source data */
361     OMX_U16 nBlockAlign;      /**< is the block alignment, or block size, in bytes of the audio codec */
362     OMX_U16 nEncodeOptions;   /**< WMA Type-specific data */
363     OMX_U32 nSuperBlockAlign; /**< WMA Type-specific data */
364 } OMX_AUDIO_PARAM_WMATYPE;
365 
366 /**
367  * RealAudio format
368  */
369 typedef enum OMX_AUDIO_RAFORMATTYPE {
370     OMX_AUDIO_RAFormatUnused = 0, /**< Format unused or unknown */
371     OMX_AUDIO_RA8,                /**< RealAudio 8 codec */
372     OMX_AUDIO_RA9,                /**< RealAudio 9 codec */
373     OMX_AUDIO_RA10_AAC,           /**< MPEG-4 AAC codec for bitrates of more than 128kbps */
374     OMX_AUDIO_RA10_CODEC,         /**< RealAudio codec for bitrates less than 128 kbps */
375     OMX_AUDIO_RA10_LOSSLESS,      /**< RealAudio Lossless */
376     OMX_AUDIO_RA10_MULTICHANNEL,  /**< RealAudio Multichannel */
377     OMX_AUDIO_RA10_VOICE,         /**< RealAudio Voice for bitrates below 15 kbps */
378     OMX_AUDIO_RAFormatKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
379     OMX_AUDIO_RAFormatVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
380     OMX_VIDEO_RAFormatMax = 0x7FFFFFFF
381 } OMX_AUDIO_RAFORMATTYPE;
382 
383 /** RA (Real Audio) params */
384 typedef struct OMX_AUDIO_PARAM_RATYPE {
385     OMX_U32 nSize;              /**< Size of this structure, in Bytes */
386     OMX_VERSIONTYPE nVersion;   /**< OMX specification version information */
387     OMX_U32 nPortIndex;         /**< Port that this structure applies to */
388     OMX_U32 nChannels;          /**< Number of channels */
389     OMX_U32 nSamplingRate;      /**< is the sampling rate of the source data */
390     OMX_U32 nBitsPerFrame;      /**< is the value for bits per frame  */
391     OMX_U32 nSamplePerFrame;    /**< is the value for samples per frame */
392     OMX_U32 nCouplingQuantBits; /**< is the number of coupling quantization bits in the stream */
393     OMX_U32 nCouplingStartRegion;   /**< is the coupling start region in the stream  */
394     OMX_U32 nNumRegions;        /**< is the number of regions value */
395     OMX_AUDIO_RAFORMATTYPE eFormat; /**< is the RealAudio audio format */
396 } OMX_AUDIO_PARAM_RATYPE;
397 
398 
399 /** SBC Allocation Method Type */
400 typedef enum OMX_AUDIO_SBCALLOCMETHODTYPE {
401   OMX_AUDIO_SBCAllocMethodLoudness, /**< Loudness allocation method */
402   OMX_AUDIO_SBCAllocMethodSNR,      /**< SNR allocation method */
403   OMX_AUDIO_SBCAllocMethodKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
404   OMX_AUDIO_SBCAllocMethodVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
405   OMX_AUDIO_SBCAllocMethodMax = 0x7FFFFFFF
406 } OMX_AUDIO_SBCALLOCMETHODTYPE;
407 
408 
409 /** SBC params */
410 typedef struct OMX_AUDIO_PARAM_SBCTYPE {
411     OMX_U32 nSize;             /**< size of the structure in bytes */
412     OMX_VERSIONTYPE nVersion;  /**< OMX specification version information */
413     OMX_U32 nPortIndex;        /**< port that this structure applies to */
414     OMX_U32 nChannels;         /**< Number of channels */
415     OMX_U32 nBitRate;          /**< Bit rate of the input data.  Use 0 for variable
416                                     rate or unknown bit rates */
417     OMX_U32 nSampleRate;       /**< Sampling rate of the source data.  Use 0 for
418                                     variable or unknown sampling rate. */
419     OMX_U32 nBlocks;           /**< Number of blocks */
420     OMX_U32 nSubbands;         /**< Number of subbands */
421     OMX_U32 nBitPool;          /**< Bitpool value */
422     OMX_BOOL bEnableBitrate;   /**< Use bitrate value instead of bitpool */
423     OMX_AUDIO_CHANNELMODETYPE eChannelMode; /**< Channel mode enumeration */
424     OMX_AUDIO_SBCALLOCMETHODTYPE eSBCAllocType;   /**< SBC Allocation method type */
425 } OMX_AUDIO_PARAM_SBCTYPE;
426 
427 
428 /** ADPCM stream format parameters */
429 typedef struct OMX_AUDIO_PARAM_ADPCMTYPE {
430     OMX_U32 nSize;              /**< size of the structure in bytes */
431     OMX_VERSIONTYPE nVersion;   /**< OMX specification version information */
432     OMX_U32 nPortIndex;         /**< port that this structure applies to */
433     OMX_U32 nChannels;          /**< Number of channels in the data stream (not
434                                      necessarily the same as the number of channels
435                                      to be rendered. */
436     OMX_U32 nBitsPerSample;     /**< Number of bits in each sample */
437     OMX_U32 nSampleRate;        /**< Sampling rate of the source data.  Use 0 for
438                                     variable or unknown sampling rate. */
439 } OMX_AUDIO_PARAM_ADPCMTYPE;
440 
441 
442 /** G723 rate */
443 typedef enum OMX_AUDIO_G723RATE {
444     OMX_AUDIO_G723ModeUnused = 0,  /**< AMRNB Mode unused / unknown */
445     OMX_AUDIO_G723ModeLow,         /**< 5300 bps */
446     OMX_AUDIO_G723ModeHigh,        /**< 6300 bps */
447     OMX_AUDIO_G723ModeKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
448     OMX_AUDIO_G723ModeVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
449     OMX_AUDIO_G723ModeMax = 0x7FFFFFFF
450 } OMX_AUDIO_G723RATE;
451 
452 
453 /** G723 - Sample rate must be 8 KHz */
454 typedef struct OMX_AUDIO_PARAM_G723TYPE {
455     OMX_U32 nSize;                /**< size of the structure in bytes */
456     OMX_VERSIONTYPE nVersion;     /**< OMX specification version information */
457     OMX_U32 nPortIndex;           /**< port that this structure applies to */
458     OMX_U32 nChannels;            /**< Number of channels in the data stream (not
459                                        necessarily the same as the number of channels
460                                        to be rendered. */
461     OMX_BOOL bDTX;                /**< Enable Discontinuous Transmisssion */
462     OMX_AUDIO_G723RATE eBitRate;  /**< todo: Should this be moved to a config? */
463     OMX_BOOL bHiPassFilter;       /**< Enable High Pass Filter */
464     OMX_BOOL bPostFilter;         /**< Enable Post Filter */
465 } OMX_AUDIO_PARAM_G723TYPE;
466 
467 
468 /** ITU G726 (ADPCM) rate */
469 typedef enum OMX_AUDIO_G726MODE {
470     OMX_AUDIO_G726ModeUnused = 0,  /**< G726 Mode unused / unknown */
471     OMX_AUDIO_G726Mode16,          /**< 16 kbps */
472     OMX_AUDIO_G726Mode24,          /**< 24 kbps */
473     OMX_AUDIO_G726Mode32,          /**< 32 kbps, most common rate, also G721 */
474     OMX_AUDIO_G726Mode40,          /**< 40 kbps */
475     OMX_AUDIO_G726ModeKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
476     OMX_AUDIO_G726ModeVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
477     OMX_AUDIO_G726ModeMax = 0x7FFFFFFF
478 } OMX_AUDIO_G726MODE;
479 
480 
481 /** G.726 stream format parameters - must be at 8KHz */
482 typedef struct OMX_AUDIO_PARAM_G726TYPE {
483     OMX_U32 nSize;              /**< size of the structure in bytes */
484     OMX_VERSIONTYPE nVersion;   /**< OMX specification version information */
485     OMX_U32 nPortIndex;         /**< port that this structure applies to */
486     OMX_U32 nChannels;          /**< Number of channels in the data stream (not
487                                      necessarily the same as the number of channels
488                                      to be rendered. */
489      OMX_AUDIO_G726MODE eG726Mode;
490 } OMX_AUDIO_PARAM_G726TYPE;
491 
492 
493 /** G729 coder type */
494 typedef enum OMX_AUDIO_G729TYPE {
495     OMX_AUDIO_G729 = 0,           /**< ITU G.729  encoded data */
496     OMX_AUDIO_G729A,              /**< ITU G.729 annex A  encoded data */
497     OMX_AUDIO_G729B,              /**< ITU G.729 with annex B encoded data */
498     OMX_AUDIO_G729AB,             /**< ITU G.729 annexes A and B encoded data */
499     OMX_AUDIO_G729KhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
500     OMX_AUDIO_G729VendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
501     OMX_AUDIO_G729Max = 0x7FFFFFFF
502 } OMX_AUDIO_G729TYPE;
503 
504 
505 /** G729 stream format parameters - fixed 6KHz sample rate */
506 typedef struct OMX_AUDIO_PARAM_G729TYPE {
507     OMX_U32 nSize;            /**< size of the structure in bytes */
508     OMX_VERSIONTYPE nVersion; /**< OMX specification version information */
509     OMX_U32 nPortIndex;       /**< port that this structure applies to */
510     OMX_U32 nChannels;        /**< Number of channels in the data stream (not
511                                    necessarily the same as the number of channels
512                                    to be rendered. */
513     OMX_BOOL bDTX;            /**< Enable Discontinuous Transmisssion */
514     OMX_AUDIO_G729TYPE eBitType;
515 } OMX_AUDIO_PARAM_G729TYPE;
516 
517 
518 /** AMR Frame format */
519 typedef enum OMX_AUDIO_AMRFRAMEFORMATTYPE {
520     OMX_AUDIO_AMRFrameFormatConformance = 0,  /**< Frame Format is AMR Conformance
521                                                    (Standard) Format */
522     OMX_AUDIO_AMRFrameFormatIF1,              /**< Frame Format is AMR Interface
523                                                    Format 1 */
524     OMX_AUDIO_AMRFrameFormatIF2,              /**< Frame Format is AMR Interface
525                                                    Format 2*/
526     OMX_AUDIO_AMRFrameFormatFSF,              /**< Frame Format is AMR File Storage
527                                                    Format */
528     OMX_AUDIO_AMRFrameFormatRTPPayload,       /**< Frame Format is AMR Real-Time
529                                                    Transport Protocol Payload Format */
530     OMX_AUDIO_AMRFrameFormatITU,              /**< Frame Format is ITU Format (added at Motorola request) */
531     OMX_AUDIO_AMRFrameFormatKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
532     OMX_AUDIO_AMRFrameFormatVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
533     OMX_AUDIO_AMRFrameFormatMax = 0x7FFFFFFF
534 } OMX_AUDIO_AMRFRAMEFORMATTYPE;
535 
536 
537 /** AMR band mode */
538 typedef enum OMX_AUDIO_AMRBANDMODETYPE {
539     OMX_AUDIO_AMRBandModeUnused = 0,          /**< AMRNB Mode unused / unknown */
540     OMX_AUDIO_AMRBandModeNB0,                 /**< AMRNB Mode 0 =  4750 bps */
541     OMX_AUDIO_AMRBandModeNB1,                 /**< AMRNB Mode 1 =  5150 bps */
542     OMX_AUDIO_AMRBandModeNB2,                 /**< AMRNB Mode 2 =  5900 bps */
543     OMX_AUDIO_AMRBandModeNB3,                 /**< AMRNB Mode 3 =  6700 bps */
544     OMX_AUDIO_AMRBandModeNB4,                 /**< AMRNB Mode 4 =  7400 bps */
545     OMX_AUDIO_AMRBandModeNB5,                 /**< AMRNB Mode 5 =  7950 bps */
546     OMX_AUDIO_AMRBandModeNB6,                 /**< AMRNB Mode 6 = 10200 bps */
547     OMX_AUDIO_AMRBandModeNB7,                 /**< AMRNB Mode 7 = 12200 bps */
548     OMX_AUDIO_AMRBandModeWB0,                 /**< AMRWB Mode 0 =  6600 bps */
549     OMX_AUDIO_AMRBandModeWB1,                 /**< AMRWB Mode 1 =  8850 bps */
550     OMX_AUDIO_AMRBandModeWB2,                 /**< AMRWB Mode 2 = 12650 bps */
551     OMX_AUDIO_AMRBandModeWB3,                 /**< AMRWB Mode 3 = 14250 bps */
552     OMX_AUDIO_AMRBandModeWB4,                 /**< AMRWB Mode 4 = 15850 bps */
553     OMX_AUDIO_AMRBandModeWB5,                 /**< AMRWB Mode 5 = 18250 bps */
554     OMX_AUDIO_AMRBandModeWB6,                 /**< AMRWB Mode 6 = 19850 bps */
555     OMX_AUDIO_AMRBandModeWB7,                 /**< AMRWB Mode 7 = 23050 bps */
556     OMX_AUDIO_AMRBandModeWB8,                 /**< AMRWB Mode 8 = 23850 bps */
557     OMX_AUDIO_AMRBandModeKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
558     OMX_AUDIO_AMRBandModeVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
559     OMX_AUDIO_AMRBandModeMax = 0x7FFFFFFF
560 } OMX_AUDIO_AMRBANDMODETYPE;
561 
562 
563 /** AMR Discontinuous Transmission mode */
564 typedef enum OMX_AUDIO_AMRDTXMODETYPE {
565     OMX_AUDIO_AMRDTXModeOff = 0,        /**< AMR Discontinuous Transmission Mode is disabled */
566     OMX_AUDIO_AMRDTXModeOnVAD1,         /**< AMR Discontinuous Transmission Mode using
567                                              Voice Activity Detector 1 (VAD1) is enabled */
568     OMX_AUDIO_AMRDTXModeOnVAD2,         /**< AMR Discontinuous Transmission Mode using
569                                              Voice Activity Detector 2 (VAD2) is enabled */
570     OMX_AUDIO_AMRDTXModeOnAuto,         /**< The codec will automatically select between
571                                              Off, VAD1 or VAD2 modes */
572 
573     OMX_AUDIO_AMRDTXasEFR,             /**< DTX as EFR instead of AMR standard (3GPP 26.101, frame type =8,9,10) */
574 
575     OMX_AUDIO_AMRDTXModeKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
576     OMX_AUDIO_AMRDTXModeVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
577     OMX_AUDIO_AMRDTXModeMax = 0x7FFFFFFF
578 } OMX_AUDIO_AMRDTXMODETYPE;
579 
580 
581 /** AMR params */
582 typedef struct OMX_AUDIO_PARAM_AMRTYPE {
583     OMX_U32 nSize;                          /**< size of the structure in bytes */
584     OMX_VERSIONTYPE nVersion;               /**< OMX specification version information */
585     OMX_U32 nPortIndex;                     /**< port that this structure applies to */
586     OMX_U32 nChannels;                      /**< Number of channels */
587     OMX_U32 nBitRate;                       /**< Bit rate read only field */
588     OMX_AUDIO_AMRBANDMODETYPE eAMRBandMode; /**< AMR Band Mode enumeration */
589     OMX_AUDIO_AMRDTXMODETYPE  eAMRDTXMode;  /**< AMR DTX Mode enumeration */
590     OMX_AUDIO_AMRFRAMEFORMATTYPE eAMRFrameFormat; /**< AMR frame format enumeration */
591 } OMX_AUDIO_PARAM_AMRTYPE;
592 
593 
594 /** GSM_FR (ETSI 06.10, 3GPP 46.010) stream format parameters */
595 typedef struct OMX_AUDIO_PARAM_GSMFRTYPE {
596     OMX_U32 nSize;            /**< size of the structure in bytes */
597     OMX_VERSIONTYPE nVersion; /**< OMX specification version information */
598     OMX_U32 nPortIndex;       /**< port that this structure applies to */
599     OMX_BOOL bDTX;            /**< Enable Discontinuous Transmisssion */
600     OMX_BOOL bHiPassFilter;   /**< Enable High Pass Filter */
601 } OMX_AUDIO_PARAM_GSMFRTYPE;
602 
603 
604 /** GSM-HR (ETSI 06.20, 3GPP 46.020) stream format parameters */
605 typedef struct OMX_AUDIO_PARAM_GSMHRTYPE {
606     OMX_U32 nSize;            /**< size of the structure in bytes */
607     OMX_VERSIONTYPE nVersion; /**< OMX specification version information */
608     OMX_U32 nPortIndex;       /**< port that this structure applies to */
609     OMX_BOOL bDTX;            /**< Enable Discontinuous Transmisssion */
610     OMX_BOOL bHiPassFilter;   /**< Enable High Pass Filter */
611 } OMX_AUDIO_PARAM_GSMHRTYPE;
612 
613 
614 /** GSM-EFR (ETSI 06.60, 3GPP 46.060) stream format parameters */
615 typedef struct OMX_AUDIO_PARAM_GSMEFRTYPE {
616     OMX_U32 nSize;            /**< size of the structure in bytes */
617     OMX_VERSIONTYPE nVersion; /**< OMX specification version information */
618     OMX_U32 nPortIndex;       /**< port that this structure applies to */
619     OMX_BOOL bDTX;            /**< Enable Discontinuous Transmisssion */
620     OMX_BOOL bHiPassFilter;   /**< Enable High Pass Filter */
621 } OMX_AUDIO_PARAM_GSMEFRTYPE;
622 
623 
624 /** TDMA FR (TIA/EIA-136-420, VSELP 7.95kbps coder) stream format parameters */
625 typedef struct OMX_AUDIO_PARAM_TDMAFRTYPE {
626     OMX_U32 nSize;                /**< size of the structure in bytes */
627     OMX_VERSIONTYPE nVersion;     /**< OMX specification version information */
628     OMX_U32 nPortIndex;           /**< port that this structure applies to */
629     OMX_U32 nChannels;            /**< Number of channels in the data stream (not
630                                        necessarily the same as the number of channels
631                                        to be rendered. */
632     OMX_BOOL bDTX;                /**< Enable Discontinuous Transmisssion */
633     OMX_BOOL bHiPassFilter;       /**< Enable High Pass Filter */
634 } OMX_AUDIO_PARAM_TDMAFRTYPE;
635 
636 
637 /** TDMA EFR (TIA/EIA-136-410, ACELP 7.4kbps coder) stream format parameters */
638 typedef struct OMX_AUDIO_PARAM_TDMAEFRTYPE {
639     OMX_U32 nSize;                /**< size of the structure in bytes */
640     OMX_VERSIONTYPE nVersion;     /**< OMX specification version information */
641     OMX_U32 nPortIndex;           /**< port that this structure applies to */
642     OMX_U32 nChannels;            /**< Number of channels in the data stream (not
643                                        necessarily the same as the number of channels
644                                        to be rendered. */
645     OMX_BOOL bDTX;                /**< Enable Discontinuous Transmisssion */
646     OMX_BOOL bHiPassFilter;       /**< Enable High Pass Filter */
647 } OMX_AUDIO_PARAM_TDMAEFRTYPE;
648 
649 
650 /** PDC FR ( RCR-27, VSELP 6.7kbps coder) stream format parameters */
651 typedef struct OMX_AUDIO_PARAM_PDCFRTYPE {
652     OMX_U32 nSize;                /**< size of the structure in bytes */
653     OMX_VERSIONTYPE nVersion;     /**< OMX specification version information */
654     OMX_U32 nPortIndex;           /**< port that this structure applies to */
655     OMX_U32 nChannels;            /**< Number of channels in the data stream (not
656                                        necessarily the same as the number of channels
657                                        to be rendered. */
658     OMX_BOOL bDTX;                /**< Enable Discontinuous Transmisssion */
659     OMX_BOOL bHiPassFilter;       /**< Enable High Pass Filter */
660 } OMX_AUDIO_PARAM_PDCFRTYPE;
661 
662 
663 /** PDC EFR ( RCR-27, ACELP 6.7kbps coder) stream format parameters */
664 typedef struct OMX_AUDIO_PARAM_PDCEFRTYPE {
665     OMX_U32 nSize;                /**< size of the structure in bytes */
666     OMX_VERSIONTYPE nVersion;     /**< OMX specification version information */
667     OMX_U32 nPortIndex;           /**< port that this structure applies to */
668     OMX_U32 nChannels;            /**< Number of channels in the data stream (not
669                                        necessarily the same as the number of channels
670                                        to be rendered. */
671     OMX_BOOL bDTX;                /**< Enable Discontinuous Transmisssion */
672     OMX_BOOL bHiPassFilter;       /**< Enable High Pass Filter */
673 } OMX_AUDIO_PARAM_PDCEFRTYPE;
674 
675 /** PDC HR ( RCR-27, PSI-CELP 3.45kbps coder) stream format parameters */
676 typedef struct OMX_AUDIO_PARAM_PDCHRTYPE {
677     OMX_U32 nSize;                /**< size of the structure in bytes */
678     OMX_VERSIONTYPE nVersion;     /**< OMX specification version information */
679     OMX_U32 nPortIndex;           /**< port that this structure applies to */
680     OMX_U32 nChannels;            /**< Number of channels in the data stream (not
681                                        necessarily the same as the number of channels
682                                        to be rendered. */
683     OMX_BOOL bDTX;                /**< Enable Discontinuous Transmisssion */
684     OMX_BOOL bHiPassFilter;       /**< Enable High Pass Filter */
685 } OMX_AUDIO_PARAM_PDCHRTYPE;
686 
687 
688 /** CDMA Rate types */
689 typedef enum OMX_AUDIO_CDMARATETYPE {
690     OMX_AUDIO_CDMARateBlank = 0,          /**< CDMA encoded frame is blank */
691     OMX_AUDIO_CDMARateFull,               /**< CDMA encoded frame in full rate */
692     OMX_AUDIO_CDMARateHalf,               /**< CDMA encoded frame in half rate */
693     OMX_AUDIO_CDMARateQuarter,            /**< CDMA encoded frame in quarter rate */
694     OMX_AUDIO_CDMARateEighth,             /**< CDMA encoded frame in eighth rate (DTX)*/
695     OMX_AUDIO_CDMARateErasure,            /**< CDMA erasure frame */
696     OMX_AUDIO_CDMARateKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
697     OMX_AUDIO_CDMARateVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
698     OMX_AUDIO_CDMARateMax = 0x7FFFFFFF
699 } OMX_AUDIO_CDMARATETYPE;
700 
701 
702 /** QCELP8 (TIA/EIA-96, up to 8kbps coder) stream format parameters */
703 typedef struct OMX_AUDIO_PARAM_QCELP8TYPE {
704     OMX_U32 nSize;                /**< size of the structure in bytes */
705     OMX_VERSIONTYPE nVersion;     /**< OMX specification version information */
706     OMX_U32 nPortIndex;           /**< port that this structure applies to */
707     OMX_U32 nChannels;            /**< Number of channels in the data stream (not
708                                        necessarily the same as the number of channels
709                                        to be rendered. */
710     OMX_U32 nBitRate;             /**< Bit rate of the input data.  Use 0 for variable
711                                        rate or unknown bit rates */
712     OMX_AUDIO_CDMARATETYPE eCDMARate; /**< Frame rate */
713     OMX_U32 nMinBitRate;          /**< minmal rate for the encoder = 1,2,3,4, default = 1 */
714     OMX_U32 nMaxBitRate;          /**< maximal rate for the encoder = 1,2,3,4, default = 4 */
715 } OMX_AUDIO_PARAM_QCELP8TYPE;
716 
717 
718 /** QCELP13 ( CDMA, EIA/TIA-733, 13.3kbps coder) stream format parameters */
719 typedef struct OMX_AUDIO_PARAM_QCELP13TYPE {
720     OMX_U32 nSize;                /**< size of the structure in bytes */
721     OMX_VERSIONTYPE nVersion;     /**< OMX specification version information */
722     OMX_U32 nPortIndex;           /**< port that this structure applies to */
723     OMX_U32 nChannels;            /**< Number of channels in the data stream (not
724                                        necessarily the same as the number of channels
725                                        to be rendered. */
726     OMX_AUDIO_CDMARATETYPE eCDMARate; /**< Frame rate */
727     OMX_U32 nMinBitRate;          /**< minmal rate for the encoder = 1,2,3,4, default = 1 */
728     OMX_U32 nMaxBitRate;          /**< maximal rate for the encoder = 1,2,3,4, default = 4 */
729 } OMX_AUDIO_PARAM_QCELP13TYPE;
730 
731 
732 /** EVRC ( CDMA, EIA/TIA-127, RCELP up to 8.55kbps coder) stream format parameters */
733 typedef struct OMX_AUDIO_PARAM_EVRCTYPE {
734     OMX_U32 nSize;                /**< size of the structure in bytes */
735     OMX_VERSIONTYPE nVersion;     /**< OMX specification version information */
736     OMX_U32 nPortIndex;           /**< port that this structure applies to */
737     OMX_U32 nChannels;            /**< Number of channels in the data stream (not
738                                        necessarily the same as the number of channels
739                                        to be rendered. */
740     OMX_AUDIO_CDMARATETYPE eCDMARate; /**< actual Frame rate */
741     OMX_BOOL bRATE_REDUCon;       /**< RATE_REDUCtion is requested for this frame */
742     OMX_U32 nMinBitRate;          /**< minmal rate for the encoder = 1,2,3,4, default = 1 */
743     OMX_U32 nMaxBitRate;          /**< maximal rate for the encoder = 1,2,3,4, default = 4 */
744     OMX_BOOL bHiPassFilter;       /**< Enable encoder's High Pass Filter */
745     OMX_BOOL bNoiseSuppressor;    /**< Enable encoder's noise suppressor pre-processing */
746     OMX_BOOL bPostFilter;         /**< Enable decoder's post Filter */
747 } OMX_AUDIO_PARAM_EVRCTYPE;
748 
749 
750 /** SMV ( up to 8.55kbps coder) stream format parameters */
751 typedef struct OMX_AUDIO_PARAM_SMVTYPE {
752     OMX_U32 nSize;                /**< size of the structure in bytes */
753     OMX_VERSIONTYPE nVersion;     /**< OMX specification version information */
754     OMX_U32 nPortIndex;           /**< port that this structure applies to */
755     OMX_U32 nChannels;            /**< Number of channels in the data stream (not
756                                        necessarily the same as the number of channels
757                                        to be rendered. */
758     OMX_AUDIO_CDMARATETYPE eCDMARate; /**< Frame rate */
759     OMX_BOOL bRATE_REDUCon;           /**< RATE_REDUCtion is requested for this frame */
760     OMX_U32 nMinBitRate;          /**< minmal rate for the encoder = 1,2,3,4, default = 1 ??*/
761     OMX_U32 nMaxBitRate;          /**< maximal rate for the encoder = 1,2,3,4, default = 4 ??*/
762     OMX_BOOL bHiPassFilter;       /**< Enable encoder's High Pass Filter ??*/
763     OMX_BOOL bNoiseSuppressor;    /**< Enable encoder's noise suppressor pre-processing */
764     OMX_BOOL bPostFilter;         /**< Enable decoder's post Filter ??*/
765 } OMX_AUDIO_PARAM_SMVTYPE;
766 
767 
768 /** MIDI Format
769  * @ingroup midi
770  */
771 typedef enum OMX_AUDIO_MIDIFORMATTYPE
772 {
773     OMX_AUDIO_MIDIFormatUnknown = 0, /**< MIDI Format unknown or don't care */
774     OMX_AUDIO_MIDIFormatSMF0,        /**< Standard MIDI File Type 0 */
775     OMX_AUDIO_MIDIFormatSMF1,        /**< Standard MIDI File Type 1 */
776     OMX_AUDIO_MIDIFormatSMF2,        /**< Standard MIDI File Type 2 */
777     OMX_AUDIO_MIDIFormatSPMIDI,      /**< SP-MIDI */
778     OMX_AUDIO_MIDIFormatXMF0,        /**< eXtensible Music Format type 0 */
779     OMX_AUDIO_MIDIFormatXMF1,        /**< eXtensible Music Format type 1 */
780     OMX_AUDIO_MIDIFormatMobileXMF,   /**< Mobile XMF (eXtensible Music Format type 2) */
781     OMX_AUDIO_MIDIFormatKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
782     OMX_AUDIO_MIDIFormatVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
783     OMX_AUDIO_MIDIFormatMax = 0x7FFFFFFF
784 } OMX_AUDIO_MIDIFORMATTYPE;
785 
786 
787 /** MIDI params
788  * @ingroup midi
789  */
790 typedef struct OMX_AUDIO_PARAM_MIDITYPE {
791     OMX_U32 nSize;                 /**< size of the structure in bytes */
792     OMX_VERSIONTYPE nVersion;      /**< OMX specification version information */
793     OMX_U32 nPortIndex;            /**< port that this structure applies to */
794     OMX_U32 nFileSize;             /**< size of the MIDI file in bytes, where the entire
795                                         MIDI file passed in, otherwise if 0x0, the MIDI data
796                                         is merged and streamed (instead of passed as an
797                                         entire MIDI file) */
798     OMX_BU32 sMaxPolyphony;        /**< Specifies the maximum simultaneous polyphonic
799                                         voices. A value of zero indicates that the default
800                                         polyphony of the device is used  */
801     OMX_BOOL bLoadDefaultSound;    /**< Whether to load default sound
802                                         bank at initialization */
803     OMX_AUDIO_MIDIFORMATTYPE eMidiFormat; /**< Version of the MIDI file */
804 } OMX_AUDIO_PARAM_MIDITYPE;
805 
806 
807 /** Type of the MIDI sound bank
808  * @ingroup midi
809  */
810 typedef enum OMX_AUDIO_MIDISOUNDBANKTYPE {
811     OMX_AUDIO_MIDISoundBankUnused = 0,           /**< unused/unknown soundbank type */
812     OMX_AUDIO_MIDISoundBankDLS1,                 /**< DLS version 1 */
813     OMX_AUDIO_MIDISoundBankDLS2,                 /**< DLS version 2 */
814     OMX_AUDIO_MIDISoundBankMobileDLSBase,        /**< Mobile DLS, using the base functionality */
815     OMX_AUDIO_MIDISoundBankMobileDLSPlusOptions, /**< Mobile DLS, using the specification-defined optional feature set */
816     OMX_AUDIO_MIDISoundBankKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
817     OMX_AUDIO_MIDISoundBankVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
818     OMX_AUDIO_MIDISoundBankMax = 0x7FFFFFFF
819 } OMX_AUDIO_MIDISOUNDBANKTYPE;
820 
821 
822 /** Bank Layout describes how bank MSB & LSB are used in the DLS instrument definitions sound bank
823  * @ingroup midi
824  */
825 typedef enum OMX_AUDIO_MIDISOUNDBANKLAYOUTTYPE {
826    OMX_AUDIO_MIDISoundBankLayoutUnused = 0,   /**< unused/unknown soundbank type */
827    OMX_AUDIO_MIDISoundBankLayoutGM,           /**< GS layout (based on bank MSB 0x00) */
828    OMX_AUDIO_MIDISoundBankLayoutGM2,          /**< General MIDI 2 layout (using MSB 0x78/0x79, LSB 0x00) */
829    OMX_AUDIO_MIDISoundBankLayoutUser,         /**< Does not conform to any bank numbering standards */
830    OMX_AUDIO_MIDISoundBankLayoutKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
831    OMX_AUDIO_MIDISoundBankLayoutVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
832    OMX_AUDIO_MIDISoundBankLayoutMax = 0x7FFFFFFF
833 } OMX_AUDIO_MIDISOUNDBANKLAYOUTTYPE;
834 
835 
836 /** MIDI params to load/unload user soundbank
837  * @ingroup midi
838  */
839 typedef struct OMX_AUDIO_PARAM_MIDILOADUSERSOUNDTYPE {
840     OMX_U32 nSize;            /**< size of the structure in bytes */
841     OMX_VERSIONTYPE nVersion; /**< OMX specification version information */
842     OMX_U32 nPortIndex;       /**< port that this structure applies to */
843     OMX_U32 nDLSIndex;        /**< DLS file index to be loaded */
844     OMX_U32 nDLSSize;         /**< Size in bytes */
845     OMX_PTR pDLSData;         /**< Pointer to DLS file data */
846     OMX_AUDIO_MIDISOUNDBANKTYPE eMidiSoundBank;   /**< Midi sound bank type enumeration */
847     OMX_AUDIO_MIDISOUNDBANKLAYOUTTYPE eMidiSoundBankLayout; /**< Midi sound bank layout enumeration */
848 } OMX_AUDIO_PARAM_MIDILOADUSERSOUNDTYPE;
849 
850 
851 /** Structure for Live MIDI events and MIP messages.
852  * (MIP = Maximum Instantaneous Polyphony; part of the SP-MIDI standard.)
853  * @ingroup midi
854  */
855 typedef struct OMX_AUDIO_CONFIG_MIDIIMMEDIATEEVENTTYPE {
856     OMX_U32 nSize;            /**< size of the structure in bytes */
857     OMX_VERSIONTYPE nVersion; /**< OMX specification version information */
858     OMX_U32 nPortIndex;       /**< Port that this structure applies to */
859     OMX_U32 nMidiEventSize;   /**< Size of immediate MIDI events or MIP message in bytes  */
860     OMX_U8 nMidiEvents[1];    /**< MIDI event array to be rendered immediately, or an
861                                    array for the MIP message buffer, where the size is
862                                    indicated by nMidiEventSize */
863 } OMX_AUDIO_CONFIG_MIDIIMMEDIATEEVENTTYPE;
864 
865 
866 /** MIDI sound bank/ program pair in a given channel
867  * @ingroup midi
868  */
869 typedef struct OMX_AUDIO_CONFIG_MIDISOUNDBANKPROGRAMTYPE {
870     OMX_U32 nSize;              /**< size of the structure in bytes */
871     OMX_VERSIONTYPE nVersion;   /**< OMX specification version information */
872     OMX_U32 nPortIndex;         /**< Port that this structure applies to */
873     OMX_U32 nChannel;           /**< Valid channel values range from 1 to 16 */
874     OMX_U16 nIDProgram;         /**< Valid program ID range is 1 to 128 */
875     OMX_U16 nIDSoundBank;       /**< Sound bank ID */
876     OMX_U32 nUserSoundBankIndex;/**< User soundbank index, easier to access soundbanks
877                                      by index if multiple banks are present */
878 } OMX_AUDIO_CONFIG_MIDISOUNDBANKPROGRAMTYPE;
879 
880 
881 /** MIDI control
882  * @ingroup midi
883  */
884 typedef struct OMX_AUDIO_CONFIG_MIDICONTROLTYPE {
885     OMX_U32 nSize;                /**< size of the structure in bytes */
886     OMX_VERSIONTYPE nVersion;     /**< OMX specification version information */
887     OMX_U32 nPortIndex;           /**< port that this structure applies to */
888     OMX_BS32 sPitchTransposition; /**< Pitch transposition in semitones, stored as Q22.10
889                                        format based on JAVA MMAPI (JSR-135) requirement */
890     OMX_BU32 sPlayBackRate;       /**< Relative playback rate, stored as Q14.17 fixed-point
891                                        number based on JSR-135 requirement */
892     OMX_BU32 sTempo ;             /**< Tempo in beats per minute (BPM), stored as Q22.10
893                                        fixed-point number based on JSR-135 requirement */
894     OMX_U32 nMaxPolyphony;        /**< Specifies the maximum simultaneous polyphonic
895                                        voices. A value of zero indicates that the default
896                                        polyphony of the device is used  */
897     OMX_U32 nNumRepeat;           /**< Number of times to repeat playback */
898     OMX_U32 nStopTime;            /**< Time in milliseconds to indicate when playback
899                                        will stop automatically.  Set to zero if not used */
900     OMX_U16 nChannelMuteMask;     /**< 16 bit mask for channel mute status */
901     OMX_U16 nChannelSoloMask;     /**< 16 bit mask for channel solo status */
902     OMX_U32 nTrack0031MuteMask;   /**< 32 bit mask for track mute status. Note: This is for tracks 0-31 */
903     OMX_U32 nTrack3263MuteMask;   /**< 32 bit mask for track mute status. Note: This is for tracks 32-63 */
904     OMX_U32 nTrack0031SoloMask;   /**< 32 bit mask for track solo status. Note: This is for tracks 0-31 */
905     OMX_U32 nTrack3263SoloMask;   /**< 32 bit mask for track solo status. Note: This is for tracks 32-63 */
906 
907 } OMX_AUDIO_CONFIG_MIDICONTROLTYPE;
908 
909 
910 /** MIDI Playback States
911  * @ingroup midi
912  */
913 typedef enum OMX_AUDIO_MIDIPLAYBACKSTATETYPE {
914   OMX_AUDIO_MIDIPlayBackStateUnknown = 0,      /**< Unknown state or state does not map to
915   													other defined states */
916   OMX_AUDIO_MIDIPlayBackStateClosedEngaged,    /**< No MIDI resource is currently open.
917                                                     The MIDI engine is currently processing
918                                                     MIDI events. */
919   OMX_AUDIO_MIDIPlayBackStateParsing,          /**< A MIDI resource is open and is being
920                                                     primed. The MIDI engine is currently
921                                                     processing MIDI events. */
922   OMX_AUDIO_MIDIPlayBackStateOpenEngaged,      /**< A MIDI resource is open and primed but
923                                                     not playing. The MIDI engine is currently
924                                                     processing MIDI events. The transition to
925                                                     this state is only possible from the
926                                                     OMX_AUDIO_MIDIPlayBackStatePlaying state,
927                                                     when the 'playback head' reaches the end
928                                                     of media data or the playback stops due
929                                                     to stop time set.*/
930   OMX_AUDIO_MIDIPlayBackStatePlaying,          /**< A MIDI resource is open and currently
931                                                     playing. The MIDI engine is currently
932                                                     processing MIDI events.*/
933   OMX_AUDIO_MIDIPlayBackStatePlayingPartially, /**< Best-effort playback due to SP-MIDI/DLS
934                                                     resource constraints */
935   OMX_AUDIO_MIDIPlayBackStatePlayingSilently,  /**< Due to system resource constraints and
936                                                     SP-MIDI content constraints, there is
937                                                     no audible MIDI content during playback
938                                                     currently. The situation may change if
939                                                     resources are freed later.*/
940   OMX_AUDIO_MIDIPlayBackStateKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
941   OMX_AUDIO_MIDIPlayBackStateVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
942   OMX_AUDIO_MIDIPlayBackStateMax = 0x7FFFFFFF
943 } OMX_AUDIO_MIDIPLAYBACKSTATETYPE;
944 
945 
946 /** MIDI status
947  * @ingroup midi
948  */
949 typedef struct OMX_AUDIO_CONFIG_MIDISTATUSTYPE {
950     OMX_U32 nSize;              /**< size of the structure in bytes */
951     OMX_VERSIONTYPE nVersion;   /**< OMX specification version information */
952     OMX_U32 nPortIndex;         /**< port that this structure applies to */
953     OMX_U16 nNumTracks;         /**< Number of MIDI tracks in the file, read only field.
954                                      NOTE: May not return a meaningful value until the entire
955                                      file is parsed and buffered.  */
956     OMX_U32 nDuration;          /**< The length of the currently open MIDI resource
957                                      in milliseconds. NOTE: May not return a meaningful value
958                                      until the entire file is parsed and buffered.  */
959     OMX_U32 nPosition;          /**< Current Position of the MIDI resource being played
960                                      in milliseconds */
961     OMX_BOOL bVibra;            /**< Does Vibra track exist? NOTE: May not return a meaningful
962                                      value until the entire file is parsed and buffered. */
963     OMX_U32 nNumMetaEvents;     /**< Total number of MIDI Meta Events in the currently
964                                      open MIDI resource. NOTE: May not return a meaningful value
965                                      until the entire file is parsed and buffered.  */
966     OMX_U32 nNumActiveVoices;   /**< Number of active voices in the currently playing
967                                      MIDI resource. NOTE: May not return a meaningful value until
968                                      the entire file is parsed and buffered. */
969     OMX_AUDIO_MIDIPLAYBACKSTATETYPE eMIDIPlayBackState;  /**< MIDI playback state enumeration, read only field */
970 } OMX_AUDIO_CONFIG_MIDISTATUSTYPE;
971 
972 
973 /** MIDI Meta Event structure one per Meta Event.
974  *  MIDI Meta Events are like audio metadata, except that they are interspersed
975  *  with the MIDI content throughout the file and are not localized in the header.
976  *  As such, it is necessary to retrieve information about these Meta Events from
977  *  the engine, as it encounters these Meta Events within the MIDI content.
978  *  For example, SMF files can have up to 14 types of MIDI Meta Events (copyright,
979  *  author, default tempo, etc.) scattered throughout the file.
980  *  @ingroup midi
981  */
982 typedef struct OMX_AUDIO_CONFIG_MIDIMETAEVENTTYPE{
983     OMX_U32 nSize;            /**< size of the structure in bytes */
984     OMX_VERSIONTYPE nVersion; /**< OMX specification version information */
985     OMX_U32 nPortIndex;       /**< port that this structure applies to */
986     OMX_U32 nIndex;           /**< Index of Meta Event */
987     OMX_U8 nMetaEventType;    /**< Meta Event Type, 7bits (i.e. 0 - 127) */
988     OMX_U32 nMetaEventSize;   /**< size of the Meta Event in bytes */
989     OMX_U32 nTrack;           /**< track number for the meta event */
990     OMX_U32 nPosition;        /**< Position of the meta-event in milliseconds */
991 } OMX_AUDIO_CONFIG_MIDIMETAEVENTTYPE;
992 
993 
994 /** MIDI Meta Event Data structure - one per Meta Event.
995  * @ingroup midi
996  */
997 typedef struct OMX_AUDIO_CONFIG_MIDIMETAEVENTDATATYPE{
998     OMX_U32 nSize;            /**< size of the structure in bytes */
999     OMX_VERSIONTYPE nVersion; /**< OMX specification version information */
1000     OMX_U32 nPortIndex;       /**< port that this structure applies to */
1001     OMX_U32 nIndex;           /**< Index of Meta Event */
1002     OMX_U32 nMetaEventSize;   /**< size of the Meta Event in bytes */
1003     OMX_U8 nData[1];          /**< array of one or more bytes of meta data
1004                                    as indicated by the nMetaEventSize field */
1005 } OMX_AUDIO_CONFIG__MIDIMETAEVENTDATATYPE;
1006 
1007 
1008 /** Audio Volume adjustment for a port */
1009 typedef struct OMX_AUDIO_CONFIG_VOLUMETYPE {
1010     OMX_U32 nSize;              /**< size of the structure in bytes */
1011     OMX_VERSIONTYPE nVersion;   /**< OMX specification version information */
1012     OMX_U32 nPortIndex;         /**< Port index indicating which port to
1013                                      set.  Select the input port to set
1014                                      just that port's volume.  Select the
1015                                      output port to adjust the master
1016                                      volume. */
1017     OMX_BOOL bLinear;           /**< Is the volume to be set in linear (0.100)
1018                                      or logarithmic scale (mB) */
1019     OMX_BS32 sVolume;           /**< Volume linear setting in the 0..100 range, OR
1020                                      Volume logarithmic setting for this port.  The values
1021                                      for volume are in mB (millibels = 1/100 dB) relative
1022                                      to a gain of 1 (e.g. the output is the same as the
1023                                      input level).  Values are in mB from nMax
1024                                      (maximum volume) to nMin mB (typically negative).
1025                                      Since the volume is "voltage"
1026                                      and not a "power", it takes a setting of
1027                                      -600 mB to decrease the volume by 1/2.  If
1028                                      a component cannot accurately set the
1029                                      volume to the requested value, it must
1030                                      set the volume to the closest value BELOW
1031                                      the requested value.  When getting the
1032                                      volume setting, the current actual volume
1033                                      must be returned. */
1034 } OMX_AUDIO_CONFIG_VOLUMETYPE;
1035 
1036 
1037 /** Audio Volume adjustment for a channel */
1038 typedef struct OMX_AUDIO_CONFIG_CHANNELVOLUMETYPE {
1039     OMX_U32 nSize;              /**< size of the structure in bytes */
1040     OMX_VERSIONTYPE nVersion;   /**< OMX specification version information */
1041     OMX_U32 nPortIndex;         /**< Port index indicating which port to
1042                                      set.  Select the input port to set
1043                                      just that port's volume.  Select the
1044                                      output port to adjust the master
1045                                      volume. */
1046     OMX_U32 nChannel;           /**< channel to select from 0 to N-1,
1047                                      using OMX_ALL to apply volume settings
1048                                      to all channels */
1049     OMX_BOOL bLinear;           /**< Is the volume to be set in linear (0.100) or
1050                                      logarithmic scale (mB) */
1051     OMX_BS32 sVolume;           /**< Volume linear setting in the 0..100 range, OR
1052                                      Volume logarithmic setting for this port.
1053                                      The values for volume are in mB
1054                                      (millibels = 1/100 dB) relative to a gain
1055                                      of 1 (e.g. the output is the same as the
1056                                      input level).  Values are in mB from nMax
1057                                      (maximum volume) to nMin mB (typically negative).
1058                                      Since the volume is "voltage"
1059                                      and not a "power", it takes a setting of
1060                                      -600 mB to decrease the volume by 1/2.  If
1061                                      a component cannot accurately set the
1062                                      volume to the requested value, it must
1063                                      set the volume to the closest value BELOW
1064                                      the requested value.  When getting the
1065                                      volume setting, the current actual volume
1066                                      must be returned. */
1067     OMX_BOOL bIsMIDI;           /**< TRUE if nChannel refers to a MIDI channel,
1068                                      FALSE otherwise */
1069 } OMX_AUDIO_CONFIG_CHANNELVOLUMETYPE;
1070 
1071 
1072 /** Audio balance setting */
1073 typedef struct OMX_AUDIO_CONFIG_BALANCETYPE {
1074     OMX_U32 nSize;              /**< size of the structure in bytes */
1075     OMX_VERSIONTYPE nVersion;   /**< OMX specification version information */
1076     OMX_U32 nPortIndex;         /**< Port index indicating which port to
1077                                      set.  Select the input port to set
1078                                      just that port's balance.  Select the
1079                                      output port to adjust the master
1080                                      balance. */
1081     OMX_S32 nBalance;           /**< balance setting for this port
1082                                      (-100 to 100, where -100 indicates
1083                                      all left, and no right */
1084 } OMX_AUDIO_CONFIG_BALANCETYPE;
1085 
1086 
1087 /** Audio Port mute */
1088 typedef struct OMX_AUDIO_CONFIG_MUTETYPE {
1089     OMX_U32 nSize;              /**< size of the structure in bytes */
1090     OMX_VERSIONTYPE nVersion;   /**< OMX specification version information */
1091     OMX_U32 nPortIndex;         /**< Port index indicating which port to
1092                                      set.  Select the input port to set
1093                                      just that port's mute.  Select the
1094                                      output port to adjust the master
1095                                      mute. */
1096     OMX_BOOL bMute;             /**< Mute setting for this port */
1097 } OMX_AUDIO_CONFIG_MUTETYPE;
1098 
1099 
1100 /** Audio Channel mute */
1101 typedef struct OMX_AUDIO_CONFIG_CHANNELMUTETYPE {
1102     OMX_U32 nSize;              /**< size of the structure in bytes */
1103     OMX_VERSIONTYPE nVersion;   /**< OMX specification version information */
1104     OMX_U32 nPortIndex;         /**< port that this structure applies to */
1105     OMX_U32 nChannel;           /**< channel to select from 0 to N-1,
1106                                      using OMX_ALL to apply mute settings
1107                                      to all channels */
1108     OMX_BOOL bMute;             /**< Mute setting for this channel */
1109     OMX_BOOL bIsMIDI;           /**< TRUE if nChannel refers to a MIDI channel,
1110                                      FALSE otherwise */
1111 } OMX_AUDIO_CONFIG_CHANNELMUTETYPE;
1112 
1113 
1114 
1115 /** Enable / Disable for loudness control, which boosts bass and to a
1116  *  smaller extent high end frequencies to compensate for hearing
1117  *  ability at the extreme ends of the audio spectrum
1118  */
1119 typedef struct OMX_AUDIO_CONFIG_LOUDNESSTYPE {
1120     OMX_U32 nSize;             /**< size of the structure in bytes */
1121     OMX_VERSIONTYPE nVersion;  /**< OMX specification version information */
1122     OMX_U32 nPortIndex;        /**< port that this structure applies to */
1123     OMX_BOOL bLoudness;        /**< Enable/disable for loudness */
1124 } OMX_AUDIO_CONFIG_LOUDNESSTYPE;
1125 
1126 
1127 /** Enable / Disable for bass, which controls low frequencies
1128  */
1129 typedef struct OMX_AUDIO_CONFIG_BASSTYPE {
1130     OMX_U32 nSize;             /**< size of the structure in bytes */
1131     OMX_VERSIONTYPE nVersion;  /**< OMX specification version information */
1132     OMX_U32 nPortIndex;        /**< port that this structure applies to */
1133     OMX_BOOL bEnable;          /**< Enable/disable for bass control */
1134     OMX_S32 nBass;             /**< bass setting for the port, as a
1135                                     continuous value from -100 to 100
1136                                     (0 means no change in bass level)*/
1137 } OMX_AUDIO_CONFIG_BASSTYPE;
1138 
1139 
1140 /** Enable / Disable for treble, which controls high frequencies tones
1141  */
1142 typedef struct OMX_AUDIO_CONFIG_TREBLETYPE {
1143     OMX_U32 nSize;             /**< size of the structure in bytes */
1144     OMX_VERSIONTYPE nVersion;  /**< OMX specification version information */
1145     OMX_U32 nPortIndex;        /**< port that this structure applies to */
1146     OMX_BOOL bEnable;          /**< Enable/disable for treble control */
1147     OMX_S32  nTreble;          /**< treble setting for the port, as a
1148                                     continuous value from -100 to 100
1149                                     (0 means no change in treble level) */
1150 } OMX_AUDIO_CONFIG_TREBLETYPE;
1151 
1152 
1153 /** An equalizer is typically used for two reasons: to compensate for an
1154  *  sub-optimal frequency response of a system to make it sound more natural
1155  *  or to create intentionally some unnatural coloring to the sound to create
1156  *  an effect.
1157  *  @ingroup effects
1158  */
1159 typedef struct OMX_AUDIO_CONFIG_EQUALIZERTYPE {
1160     OMX_U32 nSize;             /**< size of the structure in bytes */
1161     OMX_VERSIONTYPE nVersion;  /**< OMX specification version information */
1162     OMX_U32 nPortIndex;        /**< port that this structure applies to */
1163     OMX_BOOL bEnable;          /**< Enable/disable for equalizer */
1164     OMX_BU32 sBandIndex;       /**< Band number to be set.  Upper Limit is
1165                                     N-1, where N is the number of bands, lower limit is 0 */
1166     OMX_BU32 sCenterFreq;      /**< Center frequecies in Hz.  This is a
1167                                     read only element and is used to determine
1168                                     the lower, center and upper frequency of
1169                                     this band.  */
1170     OMX_BS32 sBandLevel;       /**< band level in millibels */
1171 } OMX_AUDIO_CONFIG_EQUALIZERTYPE;
1172 
1173 
1174 /** Stereo widening mode type
1175  * @ingroup effects
1176  */
1177 typedef enum OMX_AUDIO_STEREOWIDENINGTYPE {
1178     OMX_AUDIO_StereoWideningHeadphones,    /**< Stereo widening for loudspeakers */
1179     OMX_AUDIO_StereoWideningLoudspeakers,  /**< Stereo widening for closely spaced loudspeakers */
1180     OMX_AUDIO_StereoWideningKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
1181     OMX_AUDIO_StereoWideningVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
1182     OMX_AUDIO_StereoWideningMax = 0x7FFFFFFF
1183 } OMX_AUDIO_STEREOWIDENINGTYPE;
1184 
1185 
1186 /** Control for stereo widening, which is a special 2-channel
1187  *  case of the audio virtualizer effect. For example, for 5.1-channel
1188  *  output, it translates to virtual surround sound.
1189  * @ingroup effects
1190  */
1191 typedef struct OMX_AUDIO_CONFIG_STEREOWIDENINGTYPE {
1192     OMX_U32 nSize;             /**< size of the structure in bytes */
1193     OMX_VERSIONTYPE nVersion;  /**< OMX specification version information */
1194     OMX_U32 nPortIndex;        /**< port that this structure applies to */
1195     OMX_BOOL bEnable;          /**< Enable/disable for stereo widening control */
1196     OMX_AUDIO_STEREOWIDENINGTYPE eWideningType; /**< Stereo widening algorithm type */
1197     OMX_U32  nStereoWidening;  /**< stereo widening setting for the port,
1198                                     as a continuous value from 0 to 100  */
1199 } OMX_AUDIO_CONFIG_STEREOWIDENINGTYPE;
1200 
1201 
1202 /** The chorus effect (or ``choralizer'') is any signal processor which makes
1203  *  one sound source (such as a voice) sound like many such sources singing
1204  *  (or playing) in unison. Since performance in unison is never exact, chorus
1205  *  effects simulate this by making independently modified copies of the input
1206  *  signal. Modifications may include (1) delay, (2) frequency shift, and
1207  *  (3) amplitude modulation.
1208  * @ingroup effects
1209  */
1210 typedef struct OMX_AUDIO_CONFIG_CHORUSTYPE {
1211     OMX_U32 nSize;             /**< size of the structure in bytes */
1212     OMX_VERSIONTYPE nVersion;  /**< OMX specification version information */
1213     OMX_U32 nPortIndex;        /**< port that this structure applies to */
1214     OMX_BOOL bEnable;          /**< Enable/disable for chorus */
1215     OMX_BU32 sDelay;           /**< average delay in milliseconds */
1216     OMX_BU32 sModulationRate;  /**< rate of modulation in millihertz */
1217     OMX_U32 nModulationDepth;  /**< depth of modulation as a percentage of
1218                                     delay (i.e. 0 to 100) */
1219     OMX_BU32 nFeedback;        /**< Feedback from chorus output to input in percentage */
1220 } OMX_AUDIO_CONFIG_CHORUSTYPE;
1221 
1222 
1223 /** Reverberation is part of the reflected sound that follows the early
1224  *  reflections. In a typical room, this consists of a dense succession of
1225  *  echoes whose energy decays exponentially. The reverberation effect structure
1226  *  as defined here includes both (early) reflections as well as (late) reverberations.
1227  * @ingroup effects
1228  */
1229 typedef struct OMX_AUDIO_CONFIG_REVERBERATIONTYPE {
1230     OMX_U32 nSize;                /**< size of the structure in bytes */
1231     OMX_VERSIONTYPE nVersion;     /**< OMX specification version information */
1232     OMX_U32 nPortIndex;           /**< port that this structure applies to */
1233     OMX_BOOL bEnable;             /**< Enable/disable for reverberation control */
1234     OMX_BS32 sRoomLevel;          /**< Intensity level for the whole room effect
1235                                        (i.e. both early reflections and late
1236                                        reverberation) in millibels */
1237     OMX_BS32 sRoomHighFreqLevel;  /**< Attenuation at high frequencies
1238                                        relative to the intensity at low
1239                                        frequencies in millibels */
1240     OMX_BS32 sReflectionsLevel;   /**< Intensity level of early reflections
1241                                        (relative to room value), in millibels */
1242     OMX_BU32 sReflectionsDelay;   /**< Delay time of the first reflection relative
1243                                        to the direct path, in milliseconds */
1244     OMX_BS32 sReverbLevel;        /**< Intensity level of late reverberation
1245                                        relative to room level, in millibels */
1246     OMX_BU32 sReverbDelay;        /**< Time delay from the first early reflection
1247                                        to the beginning of the late reverberation
1248                                        section, in milliseconds */
1249     OMX_BU32 sDecayTime;          /**< Late reverberation decay time at low
1250                                        frequencies, in milliseconds */
1251     OMX_BU32 nDecayHighFreqRatio; /**< Ratio of high frequency decay time relative
1252                                        to low frequency decay time in percent  */
1253     OMX_U32 nDensity;             /**< Modal density in the late reverberation decay,
1254                                        in percent (i.e. 0 - 100) */
1255     OMX_U32 nDiffusion;           /**< Echo density in the late reverberation decay,
1256                                        in percent (i.e. 0 - 100) */
1257     OMX_BU32 sReferenceHighFreq;  /**< Reference high frequency in Hertz. This is
1258                                        the frequency used as the reference for all
1259                                        the high-frequency settings above */
1260 
1261 } OMX_AUDIO_CONFIG_REVERBERATIONTYPE;
1262 
1263 
1264 /** Possible settings for the Echo Cancelation structure to use
1265  * @ingroup effects
1266  */
1267 typedef enum OMX_AUDIO_ECHOCANTYPE {
1268    OMX_AUDIO_EchoCanOff = 0,    /**< Echo Cancellation is disabled */
1269    OMX_AUDIO_EchoCanNormal,     /**< Echo Cancellation normal operation -
1270                                      echo from plastics and face */
1271    OMX_AUDIO_EchoCanHFree,      /**< Echo Cancellation optimized for
1272                                      Hands Free operation */
1273    OMX_AUDIO_EchoCanCarKit,    /**< Echo Cancellation optimized for
1274                                      Car Kit (longer echo) */
1275    OMX_AUDIO_EchoCanKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
1276    OMX_AUDIO_EchoCanVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
1277    OMX_AUDIO_EchoCanMax = 0x7FFFFFFF
1278 } OMX_AUDIO_ECHOCANTYPE;
1279 
1280 
1281 /** Enable / Disable for echo cancelation, which removes undesired echo's
1282  *  from the audio
1283  * @ingroup effects
1284  */
1285 typedef struct OMX_AUDIO_CONFIG_ECHOCANCELATIONTYPE {
1286     OMX_U32 nSize;             /**< size of the structure in bytes */
1287     OMX_VERSIONTYPE nVersion;  /**< OMX specification version information */
1288     OMX_U32 nPortIndex;        /**< port that this structure applies to */
1289     OMX_AUDIO_ECHOCANTYPE eEchoCancelation; /**< Echo cancelation settings */
1290 } OMX_AUDIO_CONFIG_ECHOCANCELATIONTYPE;
1291 
1292 
1293 /** Enable / Disable for noise reduction, which undesired noise from
1294  * the audio
1295  * @ingroup effects
1296  */
1297 typedef struct OMX_AUDIO_CONFIG_NOISEREDUCTIONTYPE {
1298     OMX_U32 nSize;             /**< size of the structure in bytes */
1299     OMX_VERSIONTYPE nVersion;  /**< OMX specification version information */
1300     OMX_U32 nPortIndex;        /**< port that this structure applies to */
1301     OMX_BOOL bNoiseReduction;  /**< Enable/disable for noise reduction */
1302 } OMX_AUDIO_CONFIG_NOISEREDUCTIONTYPE;
1303 
1304 /** @} */
1305 
1306 #ifdef __cplusplus
1307 }
1308 #endif /* __cplusplus */
1309 
1310 #endif
1311 /* File EOF */
1312 
1313