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