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