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