blob: 9c0296bf55538bc3b1dc3de219ac312874d0994d [file] [log] [blame]
James Dong334de522012-03-12 12:47:14 -07001/* ------------------------------------------------------------------
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/*
Lajos Molnara1ae5a42014-11-06 17:05:46 -080019 * Copyright (c) 2008 The Khronos Group Inc.
20 *
James Dong334de522012-03-12 12:47:14 -070021 * 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
Lajos Molnara1ae5a42014-11-06 17:05:46 -080027 * to the following conditions:
James Dong334de522012-03-12 12:47:14 -070028 * The above copyright notice and this permission notice shall be included
Lajos Molnara1ae5a42014-11-06 17:05:46 -080029 * in all copies or substantial portions of the Software.
30 *
James Dong334de522012-03-12 12:47:14 -070031 * 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
Lajos Molnara1ae5a42014-11-06 17:05:46 -080037 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
James Dong334de522012-03-12 12:47:14 -070038 *
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
James Dong334de522012-03-12 12:47:14 -070053/* Each OMX header must include all required header files to allow the
54 * header to compile without errors. The includes below are required
Lajos Molnara1ae5a42014-11-06 17:05:46 -080055 * for this header file to compile successfully
James Dong334de522012-03-12 12:47:14 -070056 */
57
58#include <OMX_Core.h>
59
60/** @defgroup midi MIDI
61 * @ingroup audio
62 */
Lajos Molnara1ae5a42014-11-06 17:05:46 -080063
James Dong334de522012-03-12 12:47:14 -070064/** @defgroup effects Audio effects
65 * @ingroup audio
66 */
67
68/** @defgroup audio OpenMAX IL Audio Domain
69 * Structures for OpenMAX IL Audio domain
70 * @{
71 */
72
Lajos Molnara1ae5a42014-11-06 17:05:46 -080073/** Enumeration used to define the possible audio codings.
74 * If "OMX_AUDIO_CodingUnused" is selected, the coding selection must
75 * be done in a vendor specific way. Since this is for an audio
76 * processing element this enum is relevant. However, for another
James Dong334de522012-03-12 12:47:14 -070077 * type of component other enums would be in this area.
78 */
79typedef enum OMX_AUDIO_CODINGTYPE {
80 OMX_AUDIO_CodingUnused = 0, /**< Placeholder value when coding is N/A */
81 OMX_AUDIO_CodingAutoDetect, /**< auto detection of audio format */
82 OMX_AUDIO_CodingPCM, /**< Any variant of PCM coding */
83 OMX_AUDIO_CodingADPCM, /**< Any variant of ADPCM encoded data */
84 OMX_AUDIO_CodingAMR, /**< Any variant of AMR encoded data */
85 OMX_AUDIO_CodingGSMFR, /**< Any variant of GSM fullrate (i.e. GSM610) */
86 OMX_AUDIO_CodingGSMEFR, /**< Any variant of GSM Enhanced Fullrate encoded data*/
87 OMX_AUDIO_CodingGSMHR, /**< Any variant of GSM Halfrate encoded data */
88 OMX_AUDIO_CodingPDCFR, /**< Any variant of PDC Fullrate encoded data */
89 OMX_AUDIO_CodingPDCEFR, /**< Any variant of PDC Enhanced Fullrate encoded data */
90 OMX_AUDIO_CodingPDCHR, /**< Any variant of PDC Halfrate encoded data */
91 OMX_AUDIO_CodingTDMAFR, /**< Any variant of TDMA Fullrate encoded data (TIA/EIA-136-420) */
92 OMX_AUDIO_CodingTDMAEFR, /**< Any variant of TDMA Enhanced Fullrate encoded data (TIA/EIA-136-410) */
93 OMX_AUDIO_CodingQCELP8, /**< Any variant of QCELP 8kbps encoded data */
94 OMX_AUDIO_CodingQCELP13, /**< Any variant of QCELP 13kbps encoded data */
95 OMX_AUDIO_CodingEVRC, /**< Any variant of EVRC encoded data */
96 OMX_AUDIO_CodingSMV, /**< Any variant of SMV encoded data */
97 OMX_AUDIO_CodingG711, /**< Any variant of G.711 encoded data */
98 OMX_AUDIO_CodingG723, /**< Any variant of G.723 dot 1 encoded data */
99 OMX_AUDIO_CodingG726, /**< Any variant of G.726 encoded data */
100 OMX_AUDIO_CodingG729, /**< Any variant of G.729 encoded data */
101 OMX_AUDIO_CodingAAC, /**< Any variant of AAC encoded data */
102 OMX_AUDIO_CodingMP3, /**< Any variant of MP3 encoded data */
103 OMX_AUDIO_CodingSBC, /**< Any variant of SBC encoded data */
104 OMX_AUDIO_CodingVORBIS, /**< Any variant of VORBIS encoded data */
105 OMX_AUDIO_CodingWMA, /**< Any variant of WMA encoded data */
106 OMX_AUDIO_CodingRA, /**< Any variant of RA encoded data */
107 OMX_AUDIO_CodingMIDI, /**< Any variant of MIDI encoded data */
Jean-Michel Trivi224c7842012-04-30 10:27:25 -0700108 OMX_AUDIO_CodingFLAC, /**< Any variant of FLAC encoded data */
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800109 OMX_AUDIO_CodingKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
James Dong334de522012-03-12 12:47:14 -0700110 OMX_AUDIO_CodingVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
111 OMX_AUDIO_CodingMax = 0x7FFFFFFF
112} OMX_AUDIO_CODINGTYPE;
113
114
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800115/** 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
James Dong334de522012-03-12 12:47:14 -0700117 * 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
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800124 for an output device,
James Dong334de522012-03-12 12:47:14 -0700125 otherwise this field is 0 */
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800126 OMX_BOOL bFlagErrorConcealment; /**< Turns on error concealment if it is
James Dong334de522012-03-12 12:47:14 -0700127 supported by the OMX component */
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800128 OMX_AUDIO_CODINGTYPE eEncoding; /**< Type of data expected for this
James Dong334de522012-03-12 12:47:14 -0700129 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
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800145/** 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 */
James Dong334de522012-03-12 12:47:14 -0700151 OMX_AUDIO_PCMModeVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800152 OMX_AUDIO_PCMModeMax = 0x7FFFFFFF
153} OMX_AUDIO_PCMMODETYPE;
James Dong334de522012-03-12 12:47:14 -0700154
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. */
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800167 OMX_AUDIO_ChannelKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
James Dong334de522012-03-12 12:47:14 -0700168 OMX_AUDIO_ChannelVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800169 OMX_AUDIO_ChannelMax = 0x7FFFFFFF
James Dong334de522012-03-12 12:47:14 -0700170} 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
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800175/** 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) */
Lajos Molnar18cff142016-03-17 19:09:21 -0700181 OMX_NUMERICALDATATYPE eNumData; /**< indicates PCM data as signed, unsigned or floating pt. */
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800182 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 */
James Dong334de522012-03-12 12:47:14 -0700189 OMX_AUDIO_CHANNELTYPE eChannelMapping[OMX_AUDIO_MAXCHANNELS]; /**< Slot i contains channel defined by eChannelMap[i] */
190
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800191} OMX_AUDIO_PARAM_PCMMODETYPE;
James Dong334de522012-03-12 12:47:14 -0700192
193
194/** Audio channel mode. This is used by both AAC and MP3, although the names are more appropriate
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800195 * for the MP3. For example, JointStereo for MP3 is CouplingChannels for AAC.
James Dong334de522012-03-12 12:47:14 -0700196 */
197typedef enum OMX_AUDIO_CHANNELMODETYPE {
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800198 OMX_AUDIO_ChannelModeStereo = 0, /**< 2 channels, the bitrate allocation between those
James Dong334de522012-03-12 12:47:14 -0700199 two channels changes accordingly to each channel information */
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800200 OMX_AUDIO_ChannelModeJointStereo, /**< mode that takes advantage of what is common between
James Dong334de522012-03-12 12:47:14 -0700201 2 channels for higher compression gain */
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800202 OMX_AUDIO_ChannelModeDual, /**< 2 mono-channels, each channel is encoded with half
James Dong334de522012-03-12 12:47:14 -0700203 the bitrate of the overall bitrate */
204 OMX_AUDIO_ChannelModeMono, /**< Mono channel mode */
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800205 OMX_AUDIO_ChannelModeKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
James Dong334de522012-03-12 12:47:14 -0700206 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 */
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800215 OMX_AUDIO_MP3StreamFormatKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
James Dong334de522012-03-12 12:47:14 -0700216 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 */
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800245 OMX_AUDIO_AACStreamFormatKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
James Dong334de522012-03-12 12:47:14 -0700246 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) */
Jean-Michel Trivia1adfb72016-06-08 15:21:37 -0700262 OMX_AUDIO_AACObjectER_Scalable = 20, /**< ER AAC scalable object */
James Dong334de522012-03-12 12:47:14 -0700263 OMX_AUDIO_AACObjectLD = 23, /**< AAC Low Delay object (Error Resilient) */
264 OMX_AUDIO_AACObjectHE_PS = 29, /**< AAC High Efficiency with Parametric Stereo coding (HE-AAC v2, object type PS) */
Dave Burke8e846fd2012-04-24 16:06:50 -0700265 OMX_AUDIO_AACObjectELD = 39, /** AAC Enhanced Low Delay. NOTE: Pending Khronos standardization **/
266 OMX_AUDIO_AACObjectKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
James Dong334de522012-03-12 12:47:14 -0700267 OMX_AUDIO_AACObjectVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
268 OMX_AUDIO_AACObjectMax = 0x7FFFFFFF
269} OMX_AUDIO_AACPROFILETYPE;
270
271
272/** AAC tool usage (for nAACtools in OMX_AUDIO_PARAM_AACPROFILETYPE).
273 * Required for encoder configuration and optional as decoder info output.
274 * For MP3, OMX_AUDIO_CHANNELMODETYPE is sufficient. */
275#define OMX_AUDIO_AACToolNone 0x00000000 /**< no AAC tools allowed (encoder config) or active (decoder info output) */
276#define OMX_AUDIO_AACToolMS 0x00000001 /**< MS: Mid/side joint coding tool allowed or active */
277#define OMX_AUDIO_AACToolIS 0x00000002 /**< IS: Intensity stereo tool allowed or active */
278#define OMX_AUDIO_AACToolTNS 0x00000004 /**< TNS: Temporal Noise Shaping tool allowed or active */
279#define OMX_AUDIO_AACToolPNS 0x00000008 /**< PNS: MPEG-4 Perceptual Noise substitution tool allowed or active */
280#define OMX_AUDIO_AACToolLTP 0x00000010 /**< LTP: MPEG-4 Long Term Prediction tool allowed or active */
Jean-Michel Trivie91cd212014-08-01 22:20:17 -0700281#define OMX_AUDIO_AACToolVendor 0x00010000 /**< NOT A KHRONOS VALUE, offset for vendor-specific additions */
James Dong334de522012-03-12 12:47:14 -0700282#define OMX_AUDIO_AACToolAll 0x7FFFFFFF /**< all AAC tools allowed or active (*/
283
284/** MPEG-4 AAC error resilience (ER) tool usage (for nAACERtools in OMX_AUDIO_PARAM_AACPROFILETYPE).
285 * Required for ER encoder configuration and optional as decoder info output */
286#define OMX_AUDIO_AACERNone 0x00000000 /**< no AAC ER tools allowed/used */
287#define OMX_AUDIO_AACERVCB11 0x00000001 /**< VCB11: Virtual Code Books for AAC section data */
288#define OMX_AUDIO_AACERRVLC 0x00000002 /**< RVLC: Reversible Variable Length Coding */
289#define OMX_AUDIO_AACERHCR 0x00000004 /**< HCR: Huffman Codeword Reordering */
290#define OMX_AUDIO_AACERAll 0x7FFFFFFF /**< all AAC ER tools allowed/used */
291
292
293/** AAC params */
294typedef struct OMX_AUDIO_PARAM_AACPROFILETYPE {
295 OMX_U32 nSize; /**< Size of this structure, in Bytes */
296 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */
297 OMX_U32 nPortIndex; /**< Port that this structure applies to */
298 OMX_U32 nChannels; /**< Number of channels */
299 OMX_U32 nSampleRate; /**< Sampling rate of the source data. Use 0 for
300 variable or unknown sampling rate. */
301 OMX_U32 nBitRate; /**< Bit rate of the input data. Use 0 for variable
302 rate or unknown bit rates */
303 OMX_U32 nAudioBandWidth; /**< Audio band width (in Hz) to which an encoder should
304 limit the audio signal. Use 0 to let encoder decide */
305 OMX_U32 nFrameLength; /**< Frame length (in audio samples per channel) of the codec.
306 Can be 1024 or 960 (AAC-LC), 2048 (HE-AAC), 480 or 512 (AAC-LD).
307 Use 0 to let encoder decide */
308 OMX_U32 nAACtools; /**< AAC tool usage */
309 OMX_U32 nAACERtools; /**< MPEG-4 AAC error resilience tool usage */
310 OMX_AUDIO_AACPROFILETYPE eAACProfile; /**< AAC profile enumeration */
311 OMX_AUDIO_AACSTREAMFORMATTYPE eAACStreamFormat; /**< AAC stream format enumeration */
312 OMX_AUDIO_CHANNELMODETYPE eChannelMode; /**< Channel mode enumeration */
313} OMX_AUDIO_PARAM_AACPROFILETYPE;
314
315
316/** VORBIS params */
317typedef struct OMX_AUDIO_PARAM_VORBISTYPE {
318 OMX_U32 nSize; /**< size of the structure in bytes */
319 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */
320 OMX_U32 nPortIndex; /**< port that this structure applies to */
321 OMX_U32 nChannels; /**< Number of channels */
322 OMX_U32 nBitRate; /**< Bit rate of the encoded data data. Use 0 for variable
323 rate or unknown bit rates. Encoding is set to the
324 bitrate closest to specified value (in bps) */
325 OMX_U32 nMinBitRate; /**< Sets minimum bitrate (in bps). */
326 OMX_U32 nMaxBitRate; /**< Sets maximum bitrate (in bps). */
327
328 OMX_U32 nSampleRate; /**< Sampling rate of the source data. Use 0 for
329 variable or unknown sampling rate. */
330 OMX_U32 nAudioBandWidth; /**< Audio band width (in Hz) to which an encoder should
331 limit the audio signal. Use 0 to let encoder decide */
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800332 OMX_S32 nQuality; /**< Sets encoding quality to n, between -1 (low) and 10 (high).
James Dong334de522012-03-12 12:47:14 -0700333 In the default mode of operation, teh quality level is 3.
334 Normal quality range is 0 - 10. */
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800335 OMX_BOOL bManaged; /**< Set bitrate management mode. This turns off the
James Dong334de522012-03-12 12:47:14 -0700336 normal VBR encoding, but allows hard or soft bitrate
337 constraints to be enforced by the encoder. This mode can
338 be slower, and may also be lower quality. It is
339 primarily useful for streaming. */
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800340 OMX_BOOL bDownmix; /**< Downmix input from stereo to mono (has no effect on
341 non-stereo streams). Useful for lower-bitrate encoding. */
James Dong334de522012-03-12 12:47:14 -0700342} OMX_AUDIO_PARAM_VORBISTYPE;
343
344
Jean-Michel Trivi224c7842012-04-30 10:27:25 -0700345/** FLAC params */
346typedef struct OMX_AUDIO_PARAM_FLACTYPE {
347 OMX_U32 nSize; /**< size of the structure in bytes */
348 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */
349 OMX_U32 nPortIndex; /**< port that this structure applies to */
350 OMX_U32 nChannels; /**< Number of channels */
351 OMX_U32 nSampleRate; /**< Sampling rate of the source data. Use 0 for
352 unknown sampling rate. */
353 OMX_U32 nCompressionLevel;/**< FLAC compression level, from 0 (fastest compression)
354 to 8 (highest compression */
355} OMX_AUDIO_PARAM_FLACTYPE;
356
357
James Dong334de522012-03-12 12:47:14 -0700358/** WMA Version */
359typedef enum OMX_AUDIO_WMAFORMATTYPE {
360 OMX_AUDIO_WMAFormatUnused = 0, /**< format unused or unknown */
361 OMX_AUDIO_WMAFormat7, /**< Windows Media Audio format 7 */
362 OMX_AUDIO_WMAFormat8, /**< Windows Media Audio format 8 */
363 OMX_AUDIO_WMAFormat9, /**< Windows Media Audio format 9 */
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800364 OMX_AUDIO_WMAFormatKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
James Dong334de522012-03-12 12:47:14 -0700365 OMX_AUDIO_WMAFormatVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
366 OMX_AUDIO_WMAFormatMax = 0x7FFFFFFF
367} OMX_AUDIO_WMAFORMATTYPE;
368
369
370/** WMA Profile */
371typedef enum OMX_AUDIO_WMAPROFILETYPE {
372 OMX_AUDIO_WMAProfileUnused = 0, /**< profile unused or unknown */
373 OMX_AUDIO_WMAProfileL1, /**< Windows Media audio version 9 profile L1 */
374 OMX_AUDIO_WMAProfileL2, /**< Windows Media audio version 9 profile L2 */
375 OMX_AUDIO_WMAProfileL3, /**< Windows Media audio version 9 profile L3 */
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800376 OMX_AUDIO_WMAProfileKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
James Dong334de522012-03-12 12:47:14 -0700377 OMX_AUDIO_WMAProfileVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
378 OMX_AUDIO_WMAProfileMax = 0x7FFFFFFF
379} OMX_AUDIO_WMAPROFILETYPE;
380
381
382/** WMA params */
383typedef struct OMX_AUDIO_PARAM_WMATYPE {
384 OMX_U32 nSize; /**< size of the structure in bytes */
385 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */
386 OMX_U32 nPortIndex; /**< port that this structure applies to */
387 OMX_U16 nChannels; /**< Number of channels */
388 OMX_U32 nBitRate; /**< Bit rate of the input data. Use 0 for variable
389 rate or unknown bit rates */
390 OMX_AUDIO_WMAFORMATTYPE eFormat; /**< Version of WMA stream / data */
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800391 OMX_AUDIO_WMAPROFILETYPE eProfile; /**< Profile of WMA stream / data */
James Dong334de522012-03-12 12:47:14 -0700392 OMX_U32 nSamplingRate; /**< Sampling rate of the source data */
393 OMX_U16 nBlockAlign; /**< is the block alignment, or block size, in bytes of the audio codec */
394 OMX_U16 nEncodeOptions; /**< WMA Type-specific data */
395 OMX_U32 nSuperBlockAlign; /**< WMA Type-specific data */
396} OMX_AUDIO_PARAM_WMATYPE;
397
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800398/**
James Dong334de522012-03-12 12:47:14 -0700399 * RealAudio format
400 */
401typedef enum OMX_AUDIO_RAFORMATTYPE {
402 OMX_AUDIO_RAFormatUnused = 0, /**< Format unused or unknown */
403 OMX_AUDIO_RA8, /**< RealAudio 8 codec */
404 OMX_AUDIO_RA9, /**< RealAudio 9 codec */
405 OMX_AUDIO_RA10_AAC, /**< MPEG-4 AAC codec for bitrates of more than 128kbps */
406 OMX_AUDIO_RA10_CODEC, /**< RealAudio codec for bitrates less than 128 kbps */
407 OMX_AUDIO_RA10_LOSSLESS, /**< RealAudio Lossless */
408 OMX_AUDIO_RA10_MULTICHANNEL, /**< RealAudio Multichannel */
409 OMX_AUDIO_RA10_VOICE, /**< RealAudio Voice for bitrates below 15 kbps */
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800410 OMX_AUDIO_RAFormatKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
James Dong334de522012-03-12 12:47:14 -0700411 OMX_AUDIO_RAFormatVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
412 OMX_VIDEO_RAFormatMax = 0x7FFFFFFF
413} OMX_AUDIO_RAFORMATTYPE;
414
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800415/** RA (Real Audio) params */
416typedef struct OMX_AUDIO_PARAM_RATYPE {
417 OMX_U32 nSize; /**< Size of this structure, in Bytes */
418 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */
419 OMX_U32 nPortIndex; /**< Port that this structure applies to */
420 OMX_U32 nChannels; /**< Number of channels */
421 OMX_U32 nSamplingRate; /**< is the sampling rate of the source data */
422 OMX_U32 nBitsPerFrame; /**< is the value for bits per frame */
423 OMX_U32 nSamplePerFrame; /**< is the value for samples per frame */
424 OMX_U32 nCouplingQuantBits; /**< is the number of coupling quantization bits in the stream */
425 OMX_U32 nCouplingStartRegion; /**< is the coupling start region in the stream */
426 OMX_U32 nNumRegions; /**< is the number of regions value */
James Dong334de522012-03-12 12:47:14 -0700427 OMX_AUDIO_RAFORMATTYPE eFormat; /**< is the RealAudio audio format */
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800428} OMX_AUDIO_PARAM_RATYPE;
James Dong334de522012-03-12 12:47:14 -0700429
430
431/** SBC Allocation Method Type */
432typedef enum OMX_AUDIO_SBCALLOCMETHODTYPE {
433 OMX_AUDIO_SBCAllocMethodLoudness, /**< Loudness allocation method */
434 OMX_AUDIO_SBCAllocMethodSNR, /**< SNR allocation method */
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800435 OMX_AUDIO_SBCAllocMethodKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
James Dong334de522012-03-12 12:47:14 -0700436 OMX_AUDIO_SBCAllocMethodVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
437 OMX_AUDIO_SBCAllocMethodMax = 0x7FFFFFFF
438} OMX_AUDIO_SBCALLOCMETHODTYPE;
439
440
441/** SBC params */
442typedef struct OMX_AUDIO_PARAM_SBCTYPE {
443 OMX_U32 nSize; /**< size of the structure in bytes */
444 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */
445 OMX_U32 nPortIndex; /**< port that this structure applies to */
446 OMX_U32 nChannels; /**< Number of channels */
447 OMX_U32 nBitRate; /**< Bit rate of the input data. Use 0 for variable
448 rate or unknown bit rates */
449 OMX_U32 nSampleRate; /**< Sampling rate of the source data. Use 0 for
450 variable or unknown sampling rate. */
451 OMX_U32 nBlocks; /**< Number of blocks */
452 OMX_U32 nSubbands; /**< Number of subbands */
453 OMX_U32 nBitPool; /**< Bitpool value */
454 OMX_BOOL bEnableBitrate; /**< Use bitrate value instead of bitpool */
455 OMX_AUDIO_CHANNELMODETYPE eChannelMode; /**< Channel mode enumeration */
456 OMX_AUDIO_SBCALLOCMETHODTYPE eSBCAllocType; /**< SBC Allocation method type */
457} OMX_AUDIO_PARAM_SBCTYPE;
458
459
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800460/** ADPCM stream format parameters */
461typedef struct OMX_AUDIO_PARAM_ADPCMTYPE {
462 OMX_U32 nSize; /**< size of the structure in bytes */
463 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */
464 OMX_U32 nPortIndex; /**< port that this structure applies to */
465 OMX_U32 nChannels; /**< Number of channels in the data stream (not
466 necessarily the same as the number of channels
467 to be rendered. */
468 OMX_U32 nBitsPerSample; /**< Number of bits in each sample */
469 OMX_U32 nSampleRate; /**< Sampling rate of the source data. Use 0 for
470 variable or unknown sampling rate. */
471} OMX_AUDIO_PARAM_ADPCMTYPE;
James Dong334de522012-03-12 12:47:14 -0700472
473
474/** G723 rate */
475typedef enum OMX_AUDIO_G723RATE {
476 OMX_AUDIO_G723ModeUnused = 0, /**< AMRNB Mode unused / unknown */
477 OMX_AUDIO_G723ModeLow, /**< 5300 bps */
478 OMX_AUDIO_G723ModeHigh, /**< 6300 bps */
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800479 OMX_AUDIO_G723ModeKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
James Dong334de522012-03-12 12:47:14 -0700480 OMX_AUDIO_G723ModeVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
481 OMX_AUDIO_G723ModeMax = 0x7FFFFFFF
482} OMX_AUDIO_G723RATE;
483
484
485/** G723 - Sample rate must be 8 KHz */
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800486typedef struct OMX_AUDIO_PARAM_G723TYPE {
487 OMX_U32 nSize; /**< size of the structure in bytes */
488 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */
489 OMX_U32 nPortIndex; /**< port that this structure applies to */
490 OMX_U32 nChannels; /**< Number of channels in the data stream (not
491 necessarily the same as the number of channels
492 to be rendered. */
493 OMX_BOOL bDTX; /**< Enable Discontinuous Transmisssion */
James Dong334de522012-03-12 12:47:14 -0700494 OMX_AUDIO_G723RATE eBitRate; /**< todo: Should this be moved to a config? */
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800495 OMX_BOOL bHiPassFilter; /**< Enable High Pass Filter */
496 OMX_BOOL bPostFilter; /**< Enable Post Filter */
497} OMX_AUDIO_PARAM_G723TYPE;
James Dong334de522012-03-12 12:47:14 -0700498
499
500/** ITU G726 (ADPCM) rate */
501typedef enum OMX_AUDIO_G726MODE {
502 OMX_AUDIO_G726ModeUnused = 0, /**< G726 Mode unused / unknown */
503 OMX_AUDIO_G726Mode16, /**< 16 kbps */
504 OMX_AUDIO_G726Mode24, /**< 24 kbps */
505 OMX_AUDIO_G726Mode32, /**< 32 kbps, most common rate, also G721 */
506 OMX_AUDIO_G726Mode40, /**< 40 kbps */
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800507 OMX_AUDIO_G726ModeKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
James Dong334de522012-03-12 12:47:14 -0700508 OMX_AUDIO_G726ModeVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
509 OMX_AUDIO_G726ModeMax = 0x7FFFFFFF
510} OMX_AUDIO_G726MODE;
511
512
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800513/** G.726 stream format parameters - must be at 8KHz */
514typedef struct OMX_AUDIO_PARAM_G726TYPE {
515 OMX_U32 nSize; /**< size of the structure in bytes */
516 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */
517 OMX_U32 nPortIndex; /**< port that this structure applies to */
518 OMX_U32 nChannels; /**< Number of channels in the data stream (not
519 necessarily the same as the number of channels
520 to be rendered. */
James Dong334de522012-03-12 12:47:14 -0700521 OMX_AUDIO_G726MODE eG726Mode;
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800522} OMX_AUDIO_PARAM_G726TYPE;
James Dong334de522012-03-12 12:47:14 -0700523
524
525/** G729 coder type */
526typedef enum OMX_AUDIO_G729TYPE {
527 OMX_AUDIO_G729 = 0, /**< ITU G.729 encoded data */
528 OMX_AUDIO_G729A, /**< ITU G.729 annex A encoded data */
529 OMX_AUDIO_G729B, /**< ITU G.729 with annex B encoded data */
530 OMX_AUDIO_G729AB, /**< ITU G.729 annexes A and B encoded data */
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800531 OMX_AUDIO_G729KhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
James Dong334de522012-03-12 12:47:14 -0700532 OMX_AUDIO_G729VendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
533 OMX_AUDIO_G729Max = 0x7FFFFFFF
534} OMX_AUDIO_G729TYPE;
535
536
537/** G729 stream format parameters - fixed 6KHz sample rate */
538typedef struct OMX_AUDIO_PARAM_G729TYPE {
539 OMX_U32 nSize; /**< size of the structure in bytes */
540 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */
541 OMX_U32 nPortIndex; /**< port that this structure applies to */
542 OMX_U32 nChannels; /**< Number of channels in the data stream (not
543 necessarily the same as the number of channels
544 to be rendered. */
545 OMX_BOOL bDTX; /**< Enable Discontinuous Transmisssion */
546 OMX_AUDIO_G729TYPE eBitType;
547} OMX_AUDIO_PARAM_G729TYPE;
548
549
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800550/** AMR Frame format */
551typedef enum OMX_AUDIO_AMRFRAMEFORMATTYPE {
552 OMX_AUDIO_AMRFrameFormatConformance = 0, /**< Frame Format is AMR Conformance
553 (Standard) Format */
554 OMX_AUDIO_AMRFrameFormatIF1, /**< Frame Format is AMR Interface
555 Format 1 */
556 OMX_AUDIO_AMRFrameFormatIF2, /**< Frame Format is AMR Interface
557 Format 2*/
558 OMX_AUDIO_AMRFrameFormatFSF, /**< Frame Format is AMR File Storage
559 Format */
560 OMX_AUDIO_AMRFrameFormatRTPPayload, /**< Frame Format is AMR Real-Time
561 Transport Protocol Payload Format */
562 OMX_AUDIO_AMRFrameFormatITU, /**< Frame Format is ITU Format (added at Motorola request) */
563 OMX_AUDIO_AMRFrameFormatKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
James Dong334de522012-03-12 12:47:14 -0700564 OMX_AUDIO_AMRFrameFormatVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800565 OMX_AUDIO_AMRFrameFormatMax = 0x7FFFFFFF
566} OMX_AUDIO_AMRFRAMEFORMATTYPE;
James Dong334de522012-03-12 12:47:14 -0700567
568
569/** AMR band mode */
570typedef enum OMX_AUDIO_AMRBANDMODETYPE {
571 OMX_AUDIO_AMRBandModeUnused = 0, /**< AMRNB Mode unused / unknown */
572 OMX_AUDIO_AMRBandModeNB0, /**< AMRNB Mode 0 = 4750 bps */
573 OMX_AUDIO_AMRBandModeNB1, /**< AMRNB Mode 1 = 5150 bps */
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800574 OMX_AUDIO_AMRBandModeNB2, /**< AMRNB Mode 2 = 5900 bps */
James Dong334de522012-03-12 12:47:14 -0700575 OMX_AUDIO_AMRBandModeNB3, /**< AMRNB Mode 3 = 6700 bps */
576 OMX_AUDIO_AMRBandModeNB4, /**< AMRNB Mode 4 = 7400 bps */
577 OMX_AUDIO_AMRBandModeNB5, /**< AMRNB Mode 5 = 7950 bps */
578 OMX_AUDIO_AMRBandModeNB6, /**< AMRNB Mode 6 = 10200 bps */
579 OMX_AUDIO_AMRBandModeNB7, /**< AMRNB Mode 7 = 12200 bps */
580 OMX_AUDIO_AMRBandModeWB0, /**< AMRWB Mode 0 = 6600 bps */
581 OMX_AUDIO_AMRBandModeWB1, /**< AMRWB Mode 1 = 8850 bps */
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800582 OMX_AUDIO_AMRBandModeWB2, /**< AMRWB Mode 2 = 12650 bps */
583 OMX_AUDIO_AMRBandModeWB3, /**< AMRWB Mode 3 = 14250 bps */
James Dong334de522012-03-12 12:47:14 -0700584 OMX_AUDIO_AMRBandModeWB4, /**< AMRWB Mode 4 = 15850 bps */
585 OMX_AUDIO_AMRBandModeWB5, /**< AMRWB Mode 5 = 18250 bps */
586 OMX_AUDIO_AMRBandModeWB6, /**< AMRWB Mode 6 = 19850 bps */
587 OMX_AUDIO_AMRBandModeWB7, /**< AMRWB Mode 7 = 23050 bps */
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800588 OMX_AUDIO_AMRBandModeWB8, /**< AMRWB Mode 8 = 23850 bps */
589 OMX_AUDIO_AMRBandModeKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
James Dong334de522012-03-12 12:47:14 -0700590 OMX_AUDIO_AMRBandModeVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
591 OMX_AUDIO_AMRBandModeMax = 0x7FFFFFFF
592} OMX_AUDIO_AMRBANDMODETYPE;
James Dong334de522012-03-12 12:47:14 -0700593
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800594
595/** AMR Discontinuous Transmission mode */
596typedef enum OMX_AUDIO_AMRDTXMODETYPE {
597 OMX_AUDIO_AMRDTXModeOff = 0, /**< AMR Discontinuous Transmission Mode is disabled */
598 OMX_AUDIO_AMRDTXModeOnVAD1, /**< AMR Discontinuous Transmission Mode using
599 Voice Activity Detector 1 (VAD1) is enabled */
600 OMX_AUDIO_AMRDTXModeOnVAD2, /**< AMR Discontinuous Transmission Mode using
601 Voice Activity Detector 2 (VAD2) is enabled */
602 OMX_AUDIO_AMRDTXModeOnAuto, /**< The codec will automatically select between
603 Off, VAD1 or VAD2 modes */
James Dong334de522012-03-12 12:47:14 -0700604
605 OMX_AUDIO_AMRDTXasEFR, /**< DTX as EFR instead of AMR standard (3GPP 26.101, frame type =8,9,10) */
606
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800607 OMX_AUDIO_AMRDTXModeKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
James Dong334de522012-03-12 12:47:14 -0700608 OMX_AUDIO_AMRDTXModeVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800609 OMX_AUDIO_AMRDTXModeMax = 0x7FFFFFFF
610} OMX_AUDIO_AMRDTXMODETYPE;
611
James Dong334de522012-03-12 12:47:14 -0700612
613/** AMR params */
614typedef struct OMX_AUDIO_PARAM_AMRTYPE {
615 OMX_U32 nSize; /**< size of the structure in bytes */
616 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */
617 OMX_U32 nPortIndex; /**< port that this structure applies to */
618 OMX_U32 nChannels; /**< Number of channels */
619 OMX_U32 nBitRate; /**< Bit rate read only field */
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800620 OMX_AUDIO_AMRBANDMODETYPE eAMRBandMode; /**< AMR Band Mode enumeration */
James Dong334de522012-03-12 12:47:14 -0700621 OMX_AUDIO_AMRDTXMODETYPE eAMRDTXMode; /**< AMR DTX Mode enumeration */
622 OMX_AUDIO_AMRFRAMEFORMATTYPE eAMRFrameFormat; /**< AMR frame format enumeration */
623} OMX_AUDIO_PARAM_AMRTYPE;
624
625
626/** GSM_FR (ETSI 06.10, 3GPP 46.010) stream format parameters */
627typedef struct OMX_AUDIO_PARAM_GSMFRTYPE {
628 OMX_U32 nSize; /**< size of the structure in bytes */
629 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */
630 OMX_U32 nPortIndex; /**< port that this structure applies to */
631 OMX_BOOL bDTX; /**< Enable Discontinuous Transmisssion */
632 OMX_BOOL bHiPassFilter; /**< Enable High Pass Filter */
633} OMX_AUDIO_PARAM_GSMFRTYPE;
634
635
636/** GSM-HR (ETSI 06.20, 3GPP 46.020) stream format parameters */
637typedef struct OMX_AUDIO_PARAM_GSMHRTYPE {
638 OMX_U32 nSize; /**< size of the structure in bytes */
639 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */
640 OMX_U32 nPortIndex; /**< port that this structure applies to */
641 OMX_BOOL bDTX; /**< Enable Discontinuous Transmisssion */
642 OMX_BOOL bHiPassFilter; /**< Enable High Pass Filter */
643} OMX_AUDIO_PARAM_GSMHRTYPE;
644
645
646/** GSM-EFR (ETSI 06.60, 3GPP 46.060) stream format parameters */
647typedef struct OMX_AUDIO_PARAM_GSMEFRTYPE {
648 OMX_U32 nSize; /**< size of the structure in bytes */
649 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */
650 OMX_U32 nPortIndex; /**< port that this structure applies to */
651 OMX_BOOL bDTX; /**< Enable Discontinuous Transmisssion */
652 OMX_BOOL bHiPassFilter; /**< Enable High Pass Filter */
653} OMX_AUDIO_PARAM_GSMEFRTYPE;
654
655
656/** TDMA FR (TIA/EIA-136-420, VSELP 7.95kbps coder) stream format parameters */
657typedef struct OMX_AUDIO_PARAM_TDMAFRTYPE {
658 OMX_U32 nSize; /**< size of the structure in bytes */
659 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */
660 OMX_U32 nPortIndex; /**< port that this structure applies to */
661 OMX_U32 nChannels; /**< Number of channels in the data stream (not
662 necessarily the same as the number of channels
663 to be rendered. */
664 OMX_BOOL bDTX; /**< Enable Discontinuous Transmisssion */
665 OMX_BOOL bHiPassFilter; /**< Enable High Pass Filter */
666} OMX_AUDIO_PARAM_TDMAFRTYPE;
667
668
669/** TDMA EFR (TIA/EIA-136-410, ACELP 7.4kbps coder) stream format parameters */
670typedef struct OMX_AUDIO_PARAM_TDMAEFRTYPE {
671 OMX_U32 nSize; /**< size of the structure in bytes */
672 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */
673 OMX_U32 nPortIndex; /**< port that this structure applies to */
674 OMX_U32 nChannels; /**< Number of channels in the data stream (not
675 necessarily the same as the number of channels
676 to be rendered. */
677 OMX_BOOL bDTX; /**< Enable Discontinuous Transmisssion */
678 OMX_BOOL bHiPassFilter; /**< Enable High Pass Filter */
679} OMX_AUDIO_PARAM_TDMAEFRTYPE;
680
681
682/** PDC FR ( RCR-27, VSELP 6.7kbps coder) stream format parameters */
683typedef struct OMX_AUDIO_PARAM_PDCFRTYPE {
684 OMX_U32 nSize; /**< size of the structure in bytes */
685 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */
686 OMX_U32 nPortIndex; /**< port that this structure applies to */
687 OMX_U32 nChannels; /**< Number of channels in the data stream (not
688 necessarily the same as the number of channels
689 to be rendered. */
690 OMX_BOOL bDTX; /**< Enable Discontinuous Transmisssion */
691 OMX_BOOL bHiPassFilter; /**< Enable High Pass Filter */
692} OMX_AUDIO_PARAM_PDCFRTYPE;
693
694
695/** PDC EFR ( RCR-27, ACELP 6.7kbps coder) stream format parameters */
696typedef struct OMX_AUDIO_PARAM_PDCEFRTYPE {
697 OMX_U32 nSize; /**< size of the structure in bytes */
698 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */
699 OMX_U32 nPortIndex; /**< port that this structure applies to */
700 OMX_U32 nChannels; /**< Number of channels in the data stream (not
701 necessarily the same as the number of channels
702 to be rendered. */
703 OMX_BOOL bDTX; /**< Enable Discontinuous Transmisssion */
704 OMX_BOOL bHiPassFilter; /**< Enable High Pass Filter */
705} OMX_AUDIO_PARAM_PDCEFRTYPE;
706
707/** PDC HR ( RCR-27, PSI-CELP 3.45kbps coder) stream format parameters */
708typedef struct OMX_AUDIO_PARAM_PDCHRTYPE {
709 OMX_U32 nSize; /**< size of the structure in bytes */
710 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */
711 OMX_U32 nPortIndex; /**< port that this structure applies to */
712 OMX_U32 nChannels; /**< Number of channels in the data stream (not
713 necessarily the same as the number of channels
714 to be rendered. */
715 OMX_BOOL bDTX; /**< Enable Discontinuous Transmisssion */
716 OMX_BOOL bHiPassFilter; /**< Enable High Pass Filter */
717} OMX_AUDIO_PARAM_PDCHRTYPE;
718
719
720/** CDMA Rate types */
721typedef enum OMX_AUDIO_CDMARATETYPE {
722 OMX_AUDIO_CDMARateBlank = 0, /**< CDMA encoded frame is blank */
723 OMX_AUDIO_CDMARateFull, /**< CDMA encoded frame in full rate */
724 OMX_AUDIO_CDMARateHalf, /**< CDMA encoded frame in half rate */
725 OMX_AUDIO_CDMARateQuarter, /**< CDMA encoded frame in quarter rate */
726 OMX_AUDIO_CDMARateEighth, /**< CDMA encoded frame in eighth rate (DTX)*/
727 OMX_AUDIO_CDMARateErasure, /**< CDMA erasure frame */
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800728 OMX_AUDIO_CDMARateKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
James Dong334de522012-03-12 12:47:14 -0700729 OMX_AUDIO_CDMARateVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
730 OMX_AUDIO_CDMARateMax = 0x7FFFFFFF
731} OMX_AUDIO_CDMARATETYPE;
732
733
734/** QCELP8 (TIA/EIA-96, up to 8kbps coder) stream format parameters */
735typedef struct OMX_AUDIO_PARAM_QCELP8TYPE {
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_U32 nBitRate; /**< Bit rate of the input data. Use 0 for variable
743 rate or unknown bit rates */
744 OMX_AUDIO_CDMARATETYPE eCDMARate; /**< Frame rate */
745 OMX_U32 nMinBitRate; /**< minmal rate for the encoder = 1,2,3,4, default = 1 */
746 OMX_U32 nMaxBitRate; /**< maximal rate for the encoder = 1,2,3,4, default = 4 */
747} OMX_AUDIO_PARAM_QCELP8TYPE;
748
749
750/** QCELP13 ( CDMA, EIA/TIA-733, 13.3kbps coder) stream format parameters */
751typedef struct OMX_AUDIO_PARAM_QCELP13TYPE {
752 OMX_U32 nSize; /**< size of the structure in bytes */
753 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */
754 OMX_U32 nPortIndex; /**< port that this structure applies to */
755 OMX_U32 nChannels; /**< Number of channels in the data stream (not
756 necessarily the same as the number of channels
757 to be rendered. */
758 OMX_AUDIO_CDMARATETYPE eCDMARate; /**< Frame rate */
759 OMX_U32 nMinBitRate; /**< minmal rate for the encoder = 1,2,3,4, default = 1 */
760 OMX_U32 nMaxBitRate; /**< maximal rate for the encoder = 1,2,3,4, default = 4 */
761} OMX_AUDIO_PARAM_QCELP13TYPE;
762
763
764/** EVRC ( CDMA, EIA/TIA-127, RCELP up to 8.55kbps coder) stream format parameters */
765typedef struct OMX_AUDIO_PARAM_EVRCTYPE {
766 OMX_U32 nSize; /**< size of the structure in bytes */
767 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */
768 OMX_U32 nPortIndex; /**< port that this structure applies to */
769 OMX_U32 nChannels; /**< Number of channels in the data stream (not
770 necessarily the same as the number of channels
771 to be rendered. */
772 OMX_AUDIO_CDMARATETYPE eCDMARate; /**< actual Frame rate */
773 OMX_BOOL bRATE_REDUCon; /**< RATE_REDUCtion is requested for this frame */
774 OMX_U32 nMinBitRate; /**< minmal rate for the encoder = 1,2,3,4, default = 1 */
775 OMX_U32 nMaxBitRate; /**< maximal rate for the encoder = 1,2,3,4, default = 4 */
776 OMX_BOOL bHiPassFilter; /**< Enable encoder's High Pass Filter */
777 OMX_BOOL bNoiseSuppressor; /**< Enable encoder's noise suppressor pre-processing */
778 OMX_BOOL bPostFilter; /**< Enable decoder's post Filter */
779} OMX_AUDIO_PARAM_EVRCTYPE;
780
781
782/** SMV ( up to 8.55kbps coder) stream format parameters */
783typedef struct OMX_AUDIO_PARAM_SMVTYPE {
784 OMX_U32 nSize; /**< size of the structure in bytes */
785 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */
786 OMX_U32 nPortIndex; /**< port that this structure applies to */
787 OMX_U32 nChannels; /**< Number of channels in the data stream (not
788 necessarily the same as the number of channels
789 to be rendered. */
790 OMX_AUDIO_CDMARATETYPE eCDMARate; /**< Frame rate */
791 OMX_BOOL bRATE_REDUCon; /**< RATE_REDUCtion is requested for this frame */
792 OMX_U32 nMinBitRate; /**< minmal rate for the encoder = 1,2,3,4, default = 1 ??*/
793 OMX_U32 nMaxBitRate; /**< maximal rate for the encoder = 1,2,3,4, default = 4 ??*/
794 OMX_BOOL bHiPassFilter; /**< Enable encoder's High Pass Filter ??*/
795 OMX_BOOL bNoiseSuppressor; /**< Enable encoder's noise suppressor pre-processing */
796 OMX_BOOL bPostFilter; /**< Enable decoder's post Filter ??*/
797} OMX_AUDIO_PARAM_SMVTYPE;
798
799
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800800/** MIDI Format
James Dong334de522012-03-12 12:47:14 -0700801 * @ingroup midi
802 */
803typedef enum OMX_AUDIO_MIDIFORMATTYPE
804{
805 OMX_AUDIO_MIDIFormatUnknown = 0, /**< MIDI Format unknown or don't care */
806 OMX_AUDIO_MIDIFormatSMF0, /**< Standard MIDI File Type 0 */
807 OMX_AUDIO_MIDIFormatSMF1, /**< Standard MIDI File Type 1 */
808 OMX_AUDIO_MIDIFormatSMF2, /**< Standard MIDI File Type 2 */
809 OMX_AUDIO_MIDIFormatSPMIDI, /**< SP-MIDI */
810 OMX_AUDIO_MIDIFormatXMF0, /**< eXtensible Music Format type 0 */
811 OMX_AUDIO_MIDIFormatXMF1, /**< eXtensible Music Format type 1 */
812 OMX_AUDIO_MIDIFormatMobileXMF, /**< Mobile XMF (eXtensible Music Format type 2) */
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800813 OMX_AUDIO_MIDIFormatKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
James Dong334de522012-03-12 12:47:14 -0700814 OMX_AUDIO_MIDIFormatVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
815 OMX_AUDIO_MIDIFormatMax = 0x7FFFFFFF
816} OMX_AUDIO_MIDIFORMATTYPE;
817
818
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800819/** MIDI params
James Dong334de522012-03-12 12:47:14 -0700820 * @ingroup midi
821 */
822typedef struct OMX_AUDIO_PARAM_MIDITYPE {
823 OMX_U32 nSize; /**< size of the structure in bytes */
824 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */
825 OMX_U32 nPortIndex; /**< port that this structure applies to */
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800826 OMX_U32 nFileSize; /**< size of the MIDI file in bytes, where the entire
827 MIDI file passed in, otherwise if 0x0, the MIDI data
828 is merged and streamed (instead of passed as an
James Dong334de522012-03-12 12:47:14 -0700829 entire MIDI file) */
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800830 OMX_BU32 sMaxPolyphony; /**< Specifies the maximum simultaneous polyphonic
831 voices. A value of zero indicates that the default
832 polyphony of the device is used */
833 OMX_BOOL bLoadDefaultSound; /**< Whether to load default sound
James Dong334de522012-03-12 12:47:14 -0700834 bank at initialization */
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800835 OMX_AUDIO_MIDIFORMATTYPE eMidiFormat; /**< Version of the MIDI file */
James Dong334de522012-03-12 12:47:14 -0700836} OMX_AUDIO_PARAM_MIDITYPE;
837
838
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800839/** Type of the MIDI sound bank
James Dong334de522012-03-12 12:47:14 -0700840 * @ingroup midi
841 */
842typedef enum OMX_AUDIO_MIDISOUNDBANKTYPE {
843 OMX_AUDIO_MIDISoundBankUnused = 0, /**< unused/unknown soundbank type */
844 OMX_AUDIO_MIDISoundBankDLS1, /**< DLS version 1 */
845 OMX_AUDIO_MIDISoundBankDLS2, /**< DLS version 2 */
846 OMX_AUDIO_MIDISoundBankMobileDLSBase, /**< Mobile DLS, using the base functionality */
847 OMX_AUDIO_MIDISoundBankMobileDLSPlusOptions, /**< Mobile DLS, using the specification-defined optional feature set */
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800848 OMX_AUDIO_MIDISoundBankKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
James Dong334de522012-03-12 12:47:14 -0700849 OMX_AUDIO_MIDISoundBankVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
850 OMX_AUDIO_MIDISoundBankMax = 0x7FFFFFFF
851} OMX_AUDIO_MIDISOUNDBANKTYPE;
852
853
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800854/** Bank Layout describes how bank MSB & LSB are used in the DLS instrument definitions sound bank
James Dong334de522012-03-12 12:47:14 -0700855 * @ingroup midi
856 */
857typedef enum OMX_AUDIO_MIDISOUNDBANKLAYOUTTYPE {
858 OMX_AUDIO_MIDISoundBankLayoutUnused = 0, /**< unused/unknown soundbank type */
859 OMX_AUDIO_MIDISoundBankLayoutGM, /**< GS layout (based on bank MSB 0x00) */
860 OMX_AUDIO_MIDISoundBankLayoutGM2, /**< General MIDI 2 layout (using MSB 0x78/0x79, LSB 0x00) */
861 OMX_AUDIO_MIDISoundBankLayoutUser, /**< Does not conform to any bank numbering standards */
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800862 OMX_AUDIO_MIDISoundBankLayoutKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
James Dong334de522012-03-12 12:47:14 -0700863 OMX_AUDIO_MIDISoundBankLayoutVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
864 OMX_AUDIO_MIDISoundBankLayoutMax = 0x7FFFFFFF
865} OMX_AUDIO_MIDISOUNDBANKLAYOUTTYPE;
866
867
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800868/** MIDI params to load/unload user soundbank
James Dong334de522012-03-12 12:47:14 -0700869 * @ingroup midi
870 */
871typedef struct OMX_AUDIO_PARAM_MIDILOADUSERSOUNDTYPE {
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 nDLSIndex; /**< DLS file index to be loaded */
876 OMX_U32 nDLSSize; /**< Size in bytes */
877 OMX_PTR pDLSData; /**< Pointer to DLS file data */
878 OMX_AUDIO_MIDISOUNDBANKTYPE eMidiSoundBank; /**< Midi sound bank type enumeration */
879 OMX_AUDIO_MIDISOUNDBANKLAYOUTTYPE eMidiSoundBankLayout; /**< Midi sound bank layout enumeration */
880} OMX_AUDIO_PARAM_MIDILOADUSERSOUNDTYPE;
881
882
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800883/** Structure for Live MIDI events and MIP messages.
884 * (MIP = Maximum Instantaneous Polyphony; part of the SP-MIDI standard.)
James Dong334de522012-03-12 12:47:14 -0700885 * @ingroup midi
886 */
887typedef struct OMX_AUDIO_CONFIG_MIDIIMMEDIATEEVENTTYPE {
888 OMX_U32 nSize; /**< size of the structure in bytes */
889 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */
890 OMX_U32 nPortIndex; /**< Port that this structure applies to */
891 OMX_U32 nMidiEventSize; /**< Size of immediate MIDI events or MIP message in bytes */
892 OMX_U8 nMidiEvents[1]; /**< MIDI event array to be rendered immediately, or an
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800893 array for the MIP message buffer, where the size is
James Dong334de522012-03-12 12:47:14 -0700894 indicated by nMidiEventSize */
895} OMX_AUDIO_CONFIG_MIDIIMMEDIATEEVENTTYPE;
896
897
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800898/** MIDI sound bank/ program pair in a given channel
James Dong334de522012-03-12 12:47:14 -0700899 * @ingroup midi
900 */
901typedef struct OMX_AUDIO_CONFIG_MIDISOUNDBANKPROGRAMTYPE {
902 OMX_U32 nSize; /**< size of the structure in bytes */
903 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */
904 OMX_U32 nPortIndex; /**< Port that this structure applies to */
905 OMX_U32 nChannel; /**< Valid channel values range from 1 to 16 */
906 OMX_U16 nIDProgram; /**< Valid program ID range is 1 to 128 */
907 OMX_U16 nIDSoundBank; /**< Sound bank ID */
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800908 OMX_U32 nUserSoundBankIndex;/**< User soundbank index, easier to access soundbanks
James Dong334de522012-03-12 12:47:14 -0700909 by index if multiple banks are present */
910} OMX_AUDIO_CONFIG_MIDISOUNDBANKPROGRAMTYPE;
911
912
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800913/** MIDI control
James Dong334de522012-03-12 12:47:14 -0700914 * @ingroup midi
915 */
916typedef struct OMX_AUDIO_CONFIG_MIDICONTROLTYPE {
917 OMX_U32 nSize; /**< size of the structure in bytes */
918 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */
919 OMX_U32 nPortIndex; /**< port that this structure applies to */
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800920 OMX_BS32 sPitchTransposition; /**< Pitch transposition in semitones, stored as Q22.10
James Dong334de522012-03-12 12:47:14 -0700921 format based on JAVA MMAPI (JSR-135) requirement */
922 OMX_BU32 sPlayBackRate; /**< Relative playback rate, stored as Q14.17 fixed-point
923 number based on JSR-135 requirement */
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800924 OMX_BU32 sTempo ; /**< Tempo in beats per minute (BPM), stored as Q22.10
James Dong334de522012-03-12 12:47:14 -0700925 fixed-point number based on JSR-135 requirement */
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800926 OMX_U32 nMaxPolyphony; /**< Specifies the maximum simultaneous polyphonic
927 voices. A value of zero indicates that the default
James Dong334de522012-03-12 12:47:14 -0700928 polyphony of the device is used */
929 OMX_U32 nNumRepeat; /**< Number of times to repeat playback */
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800930 OMX_U32 nStopTime; /**< Time in milliseconds to indicate when playback
James Dong334de522012-03-12 12:47:14 -0700931 will stop automatically. Set to zero if not used */
932 OMX_U16 nChannelMuteMask; /**< 16 bit mask for channel mute status */
933 OMX_U16 nChannelSoloMask; /**< 16 bit mask for channel solo status */
934 OMX_U32 nTrack0031MuteMask; /**< 32 bit mask for track mute status. Note: This is for tracks 0-31 */
935 OMX_U32 nTrack3263MuteMask; /**< 32 bit mask for track mute status. Note: This is for tracks 32-63 */
936 OMX_U32 nTrack0031SoloMask; /**< 32 bit mask for track solo status. Note: This is for tracks 0-31 */
937 OMX_U32 nTrack3263SoloMask; /**< 32 bit mask for track solo status. Note: This is for tracks 32-63 */
938
939} OMX_AUDIO_CONFIG_MIDICONTROLTYPE;
940
941
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800942/** MIDI Playback States
James Dong334de522012-03-12 12:47:14 -0700943 * @ingroup midi
944 */
945typedef enum OMX_AUDIO_MIDIPLAYBACKSTATETYPE {
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800946 OMX_AUDIO_MIDIPlayBackStateUnknown = 0, /**< Unknown state or state does not map to
947 other defined states */
948 OMX_AUDIO_MIDIPlayBackStateClosedEngaged, /**< No MIDI resource is currently open.
949 The MIDI engine is currently processing
James Dong334de522012-03-12 12:47:14 -0700950 MIDI events. */
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800951 OMX_AUDIO_MIDIPlayBackStateParsing, /**< A MIDI resource is open and is being
952 primed. The MIDI engine is currently
James Dong334de522012-03-12 12:47:14 -0700953 processing MIDI events. */
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800954 OMX_AUDIO_MIDIPlayBackStateOpenEngaged, /**< A MIDI resource is open and primed but
James Dong334de522012-03-12 12:47:14 -0700955 not playing. The MIDI engine is currently
956 processing MIDI events. The transition to
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800957 this state is only possible from the
James Dong334de522012-03-12 12:47:14 -0700958 OMX_AUDIO_MIDIPlayBackStatePlaying state,
959 when the 'playback head' reaches the end
960 of media data or the playback stops due
961 to stop time set.*/
962 OMX_AUDIO_MIDIPlayBackStatePlaying, /**< A MIDI resource is open and currently
963 playing. The MIDI engine is currently
964 processing MIDI events.*/
965 OMX_AUDIO_MIDIPlayBackStatePlayingPartially, /**< Best-effort playback due to SP-MIDI/DLS
966 resource constraints */
967 OMX_AUDIO_MIDIPlayBackStatePlayingSilently, /**< Due to system resource constraints and
968 SP-MIDI content constraints, there is
969 no audible MIDI content during playback
970 currently. The situation may change if
971 resources are freed later.*/
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800972 OMX_AUDIO_MIDIPlayBackStateKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
James Dong334de522012-03-12 12:47:14 -0700973 OMX_AUDIO_MIDIPlayBackStateVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
974 OMX_AUDIO_MIDIPlayBackStateMax = 0x7FFFFFFF
975} OMX_AUDIO_MIDIPLAYBACKSTATETYPE;
976
977
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800978/** MIDI status
James Dong334de522012-03-12 12:47:14 -0700979 * @ingroup midi
980 */
981typedef struct OMX_AUDIO_CONFIG_MIDISTATUSTYPE {
982 OMX_U32 nSize; /**< size of the structure in bytes */
983 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */
984 OMX_U32 nPortIndex; /**< port that this structure applies to */
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800985 OMX_U16 nNumTracks; /**< Number of MIDI tracks in the file, read only field.
986 NOTE: May not return a meaningful value until the entire
James Dong334de522012-03-12 12:47:14 -0700987 file is parsed and buffered. */
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800988 OMX_U32 nDuration; /**< The length of the currently open MIDI resource
989 in milliseconds. NOTE: May not return a meaningful value
James Dong334de522012-03-12 12:47:14 -0700990 until the entire file is parsed and buffered. */
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800991 OMX_U32 nPosition; /**< Current Position of the MIDI resource being played
992 in milliseconds */
993 OMX_BOOL bVibra; /**< Does Vibra track exist? NOTE: May not return a meaningful
994 value until the entire file is parsed and buffered. */
995 OMX_U32 nNumMetaEvents; /**< Total number of MIDI Meta Events in the currently
996 open MIDI resource. NOTE: May not return a meaningful value
997 until the entire file is parsed and buffered. */
998 OMX_U32 nNumActiveVoices; /**< Number of active voices in the currently playing
999 MIDI resource. NOTE: May not return a meaningful value until
James Dong334de522012-03-12 12:47:14 -07001000 the entire file is parsed and buffered. */
1001 OMX_AUDIO_MIDIPLAYBACKSTATETYPE eMIDIPlayBackState; /**< MIDI playback state enumeration, read only field */
1002} OMX_AUDIO_CONFIG_MIDISTATUSTYPE;
1003
1004
1005/** MIDI Meta Event structure one per Meta Event.
Lajos Molnara1ae5a42014-11-06 17:05:46 -08001006 * MIDI Meta Events are like audio metadata, except that they are interspersed
1007 * with the MIDI content throughout the file and are not localized in the header.
1008 * As such, it is necessary to retrieve information about these Meta Events from
1009 * the engine, as it encounters these Meta Events within the MIDI content.
1010 * For example, SMF files can have up to 14 types of MIDI Meta Events (copyright,
1011 * author, default tempo, etc.) scattered throughout the file.
James Dong334de522012-03-12 12:47:14 -07001012 * @ingroup midi
1013 */
Lajos Molnara1ae5a42014-11-06 17:05:46 -08001014typedef struct OMX_AUDIO_CONFIG_MIDIMETAEVENTTYPE{
1015 OMX_U32 nSize; /**< size of the structure in bytes */
1016 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */
1017 OMX_U32 nPortIndex; /**< port that this structure applies to */
1018 OMX_U32 nIndex; /**< Index of Meta Event */
1019 OMX_U8 nMetaEventType; /**< Meta Event Type, 7bits (i.e. 0 - 127) */
1020 OMX_U32 nMetaEventSize; /**< size of the Meta Event in bytes */
James Dong334de522012-03-12 12:47:14 -07001021 OMX_U32 nTrack; /**< track number for the meta event */
1022 OMX_U32 nPosition; /**< Position of the meta-event in milliseconds */
Lajos Molnara1ae5a42014-11-06 17:05:46 -08001023} OMX_AUDIO_CONFIG_MIDIMETAEVENTTYPE;
James Dong334de522012-03-12 12:47:14 -07001024
1025
Lajos Molnara1ae5a42014-11-06 17:05:46 -08001026/** MIDI Meta Event Data structure - one per Meta Event.
James Dong334de522012-03-12 12:47:14 -07001027 * @ingroup midi
Lajos Molnara1ae5a42014-11-06 17:05:46 -08001028 */
1029typedef struct OMX_AUDIO_CONFIG_MIDIMETAEVENTDATATYPE{
1030 OMX_U32 nSize; /**< size of the structure in bytes */
1031 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */
1032 OMX_U32 nPortIndex; /**< port that this structure applies to */
1033 OMX_U32 nIndex; /**< Index of Meta Event */
1034 OMX_U32 nMetaEventSize; /**< size of the Meta Event in bytes */
1035 OMX_U8 nData[1]; /**< array of one or more bytes of meta data
1036 as indicated by the nMetaEventSize field */
1037} OMX_AUDIO_CONFIG__MIDIMETAEVENTDATATYPE;
James Dong334de522012-03-12 12:47:14 -07001038
1039
1040/** Audio Volume adjustment for a port */
1041typedef struct OMX_AUDIO_CONFIG_VOLUMETYPE {
1042 OMX_U32 nSize; /**< size of the structure in bytes */
1043 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */
Lajos Molnara1ae5a42014-11-06 17:05:46 -08001044 OMX_U32 nPortIndex; /**< Port index indicating which port to
1045 set. Select the input port to set
1046 just that port's volume. Select the
1047 output port to adjust the master
James Dong334de522012-03-12 12:47:14 -07001048 volume. */
Lajos Molnara1ae5a42014-11-06 17:05:46 -08001049 OMX_BOOL bLinear; /**< Is the volume to be set in linear (0.100)
James Dong334de522012-03-12 12:47:14 -07001050 or logarithmic scale (mB) */
1051 OMX_BS32 sVolume; /**< Volume linear setting in the 0..100 range, OR
1052 Volume logarithmic setting for this port. The values
1053 for volume are in mB (millibels = 1/100 dB) relative
Lajos Molnara1ae5a42014-11-06 17:05:46 -08001054 to a gain of 1 (e.g. the output is the same as the
1055 input level). Values are in mB from nMax
James Dong334de522012-03-12 12:47:14 -07001056 (maximum volume) to nMin mB (typically negative).
1057 Since the volume is "voltage"
1058 and not a "power", it takes a setting of
1059 -600 mB to decrease the volume by 1/2. If
Lajos Molnara1ae5a42014-11-06 17:05:46 -08001060 a component cannot accurately set the
James Dong334de522012-03-12 12:47:14 -07001061 volume to the requested value, it must
1062 set the volume to the closest value BELOW
1063 the requested value. When getting the
1064 volume setting, the current actual volume
1065 must be returned. */
1066} OMX_AUDIO_CONFIG_VOLUMETYPE;
1067
1068
1069/** Audio Volume adjustment for a channel */
1070typedef struct OMX_AUDIO_CONFIG_CHANNELVOLUMETYPE {
1071 OMX_U32 nSize; /**< size of the structure in bytes */
1072 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */
Lajos Molnara1ae5a42014-11-06 17:05:46 -08001073 OMX_U32 nPortIndex; /**< Port index indicating which port to
1074 set. Select the input port to set
1075 just that port's volume. Select the
1076 output port to adjust the master
James Dong334de522012-03-12 12:47:14 -07001077 volume. */
Lajos Molnara1ae5a42014-11-06 17:05:46 -08001078 OMX_U32 nChannel; /**< channel to select from 0 to N-1,
James Dong334de522012-03-12 12:47:14 -07001079 using OMX_ALL to apply volume settings
1080 to all channels */
Lajos Molnara1ae5a42014-11-06 17:05:46 -08001081 OMX_BOOL bLinear; /**< Is the volume to be set in linear (0.100) or
James Dong334de522012-03-12 12:47:14 -07001082 logarithmic scale (mB) */
1083 OMX_BS32 sVolume; /**< Volume linear setting in the 0..100 range, OR
Lajos Molnara1ae5a42014-11-06 17:05:46 -08001084 Volume logarithmic setting for this port.
1085 The values for volume are in mB
James Dong334de522012-03-12 12:47:14 -07001086 (millibels = 1/100 dB) relative to a gain
Lajos Molnara1ae5a42014-11-06 17:05:46 -08001087 of 1 (e.g. the output is the same as the
1088 input level). Values are in mB from nMax
1089 (maximum volume) to nMin mB (typically negative).
James Dong334de522012-03-12 12:47:14 -07001090 Since the volume is "voltage"
1091 and not a "power", it takes a setting of
1092 -600 mB to decrease the volume by 1/2. If
Lajos Molnara1ae5a42014-11-06 17:05:46 -08001093 a component cannot accurately set the
James Dong334de522012-03-12 12:47:14 -07001094 volume to the requested value, it must
1095 set the volume to the closest value BELOW
1096 the requested value. When getting the
1097 volume setting, the current actual volume
1098 must be returned. */
1099 OMX_BOOL bIsMIDI; /**< TRUE if nChannel refers to a MIDI channel,
1100 FALSE otherwise */
1101} OMX_AUDIO_CONFIG_CHANNELVOLUMETYPE;
1102
1103
1104/** Audio balance setting */
1105typedef struct OMX_AUDIO_CONFIG_BALANCETYPE {
1106 OMX_U32 nSize; /**< size of the structure in bytes */
1107 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */
Lajos Molnara1ae5a42014-11-06 17:05:46 -08001108 OMX_U32 nPortIndex; /**< Port index indicating which port to
1109 set. Select the input port to set
1110 just that port's balance. Select the
1111 output port to adjust the master
James Dong334de522012-03-12 12:47:14 -07001112 balance. */
Lajos Molnara1ae5a42014-11-06 17:05:46 -08001113 OMX_S32 nBalance; /**< balance setting for this port
James Dong334de522012-03-12 12:47:14 -07001114 (-100 to 100, where -100 indicates
1115 all left, and no right */
1116} OMX_AUDIO_CONFIG_BALANCETYPE;
1117
1118
1119/** Audio Port mute */
1120typedef struct OMX_AUDIO_CONFIG_MUTETYPE {
1121 OMX_U32 nSize; /**< size of the structure in bytes */
1122 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */
Lajos Molnara1ae5a42014-11-06 17:05:46 -08001123 OMX_U32 nPortIndex; /**< Port index indicating which port to
1124 set. Select the input port to set
1125 just that port's mute. Select the
1126 output port to adjust the master
James Dong334de522012-03-12 12:47:14 -07001127 mute. */
1128 OMX_BOOL bMute; /**< Mute setting for this port */
1129} OMX_AUDIO_CONFIG_MUTETYPE;
1130
1131
1132/** Audio Channel mute */
1133typedef struct OMX_AUDIO_CONFIG_CHANNELMUTETYPE {
1134 OMX_U32 nSize; /**< size of the structure in bytes */
1135 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */
1136 OMX_U32 nPortIndex; /**< port that this structure applies to */
Lajos Molnara1ae5a42014-11-06 17:05:46 -08001137 OMX_U32 nChannel; /**< channel to select from 0 to N-1,
James Dong334de522012-03-12 12:47:14 -07001138 using OMX_ALL to apply mute settings
1139 to all channels */
1140 OMX_BOOL bMute; /**< Mute setting for this channel */
1141 OMX_BOOL bIsMIDI; /**< TRUE if nChannel refers to a MIDI channel,
Lajos Molnara1ae5a42014-11-06 17:05:46 -08001142 FALSE otherwise */
James Dong334de522012-03-12 12:47:14 -07001143} OMX_AUDIO_CONFIG_CHANNELMUTETYPE;
1144
1145
1146
Lajos Molnara1ae5a42014-11-06 17:05:46 -08001147/** Enable / Disable for loudness control, which boosts bass and to a
James Dong334de522012-03-12 12:47:14 -07001148 * smaller extent high end frequencies to compensate for hearing
1149 * ability at the extreme ends of the audio spectrum
Lajos Molnara1ae5a42014-11-06 17:05:46 -08001150 */
James Dong334de522012-03-12 12:47:14 -07001151typedef struct OMX_AUDIO_CONFIG_LOUDNESSTYPE {
1152 OMX_U32 nSize; /**< size of the structure in bytes */
1153 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */
1154 OMX_U32 nPortIndex; /**< port that this structure applies to */
1155 OMX_BOOL bLoudness; /**< Enable/disable for loudness */
1156} OMX_AUDIO_CONFIG_LOUDNESSTYPE;
1157
1158
1159/** Enable / Disable for bass, which controls low frequencies
Lajos Molnara1ae5a42014-11-06 17:05:46 -08001160 */
James Dong334de522012-03-12 12:47:14 -07001161typedef struct OMX_AUDIO_CONFIG_BASSTYPE {
1162 OMX_U32 nSize; /**< size of the structure in bytes */
1163 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */
1164 OMX_U32 nPortIndex; /**< port that this structure applies to */
1165 OMX_BOOL bEnable; /**< Enable/disable for bass control */
Lajos Molnara1ae5a42014-11-06 17:05:46 -08001166 OMX_S32 nBass; /**< bass setting for the port, as a
1167 continuous value from -100 to 100
James Dong334de522012-03-12 12:47:14 -07001168 (0 means no change in bass level)*/
1169} OMX_AUDIO_CONFIG_BASSTYPE;
1170
1171
1172/** Enable / Disable for treble, which controls high frequencies tones
Lajos Molnara1ae5a42014-11-06 17:05:46 -08001173 */
James Dong334de522012-03-12 12:47:14 -07001174typedef struct OMX_AUDIO_CONFIG_TREBLETYPE {
1175 OMX_U32 nSize; /**< size of the structure in bytes */
1176 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */
1177 OMX_U32 nPortIndex; /**< port that this structure applies to */
1178 OMX_BOOL bEnable; /**< Enable/disable for treble control */
1179 OMX_S32 nTreble; /**< treble setting for the port, as a
Lajos Molnara1ae5a42014-11-06 17:05:46 -08001180 continuous value from -100 to 100
James Dong334de522012-03-12 12:47:14 -07001181 (0 means no change in treble level) */
1182} OMX_AUDIO_CONFIG_TREBLETYPE;
1183
1184
Lajos Molnara1ae5a42014-11-06 17:05:46 -08001185/** An equalizer is typically used for two reasons: to compensate for an
1186 * sub-optimal frequency response of a system to make it sound more natural
James Dong334de522012-03-12 12:47:14 -07001187 * or to create intentionally some unnatural coloring to the sound to create
1188 * an effect.
1189 * @ingroup effects
1190 */
1191typedef struct OMX_AUDIO_CONFIG_EQUALIZERTYPE {
1192 OMX_U32 nSize; /**< size of the structure in bytes */
1193 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */
1194 OMX_U32 nPortIndex; /**< port that this structure applies to */
1195 OMX_BOOL bEnable; /**< Enable/disable for equalizer */
Lajos Molnara1ae5a42014-11-06 17:05:46 -08001196 OMX_BU32 sBandIndex; /**< Band number to be set. Upper Limit is
James Dong334de522012-03-12 12:47:14 -07001197 N-1, where N is the number of bands, lower limit is 0 */
1198 OMX_BU32 sCenterFreq; /**< Center frequecies in Hz. This is a
Lajos Molnara1ae5a42014-11-06 17:05:46 -08001199 read only element and is used to determine
1200 the lower, center and upper frequency of
James Dong334de522012-03-12 12:47:14 -07001201 this band. */
1202 OMX_BS32 sBandLevel; /**< band level in millibels */
1203} OMX_AUDIO_CONFIG_EQUALIZERTYPE;
1204
1205
Lajos Molnara1ae5a42014-11-06 17:05:46 -08001206/** Stereo widening mode type
James Dong334de522012-03-12 12:47:14 -07001207 * @ingroup effects
Lajos Molnara1ae5a42014-11-06 17:05:46 -08001208 */
James Dong334de522012-03-12 12:47:14 -07001209typedef enum OMX_AUDIO_STEREOWIDENINGTYPE {
1210 OMX_AUDIO_StereoWideningHeadphones, /**< Stereo widening for loudspeakers */
1211 OMX_AUDIO_StereoWideningLoudspeakers, /**< Stereo widening for closely spaced loudspeakers */
Lajos Molnara1ae5a42014-11-06 17:05:46 -08001212 OMX_AUDIO_StereoWideningKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
James Dong334de522012-03-12 12:47:14 -07001213 OMX_AUDIO_StereoWideningVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
1214 OMX_AUDIO_StereoWideningMax = 0x7FFFFFFF
1215} OMX_AUDIO_STEREOWIDENINGTYPE;
1216
1217
1218/** Control for stereo widening, which is a special 2-channel
Lajos Molnara1ae5a42014-11-06 17:05:46 -08001219 * case of the audio virtualizer effect. For example, for 5.1-channel
1220 * output, it translates to virtual surround sound.
James Dong334de522012-03-12 12:47:14 -07001221 * @ingroup effects
Lajos Molnara1ae5a42014-11-06 17:05:46 -08001222 */
James Dong334de522012-03-12 12:47:14 -07001223typedef struct OMX_AUDIO_CONFIG_STEREOWIDENINGTYPE {
1224 OMX_U32 nSize; /**< size of the structure in bytes */
1225 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */
1226 OMX_U32 nPortIndex; /**< port that this structure applies to */
1227 OMX_BOOL bEnable; /**< Enable/disable for stereo widening control */
1228 OMX_AUDIO_STEREOWIDENINGTYPE eWideningType; /**< Stereo widening algorithm type */
1229 OMX_U32 nStereoWidening; /**< stereo widening setting for the port,
1230 as a continuous value from 0 to 100 */
1231} OMX_AUDIO_CONFIG_STEREOWIDENINGTYPE;
1232
1233
1234/** The chorus effect (or ``choralizer'') is any signal processor which makes
Lajos Molnara1ae5a42014-11-06 17:05:46 -08001235 * one sound source (such as a voice) sound like many such sources singing
1236 * (or playing) in unison. Since performance in unison is never exact, chorus
1237 * effects simulate this by making independently modified copies of the input
1238 * signal. Modifications may include (1) delay, (2) frequency shift, and
James Dong334de522012-03-12 12:47:14 -07001239 * (3) amplitude modulation.
1240 * @ingroup effects
1241 */
1242typedef struct OMX_AUDIO_CONFIG_CHORUSTYPE {
1243 OMX_U32 nSize; /**< size of the structure in bytes */
1244 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */
1245 OMX_U32 nPortIndex; /**< port that this structure applies to */
1246 OMX_BOOL bEnable; /**< Enable/disable for chorus */
1247 OMX_BU32 sDelay; /**< average delay in milliseconds */
1248 OMX_BU32 sModulationRate; /**< rate of modulation in millihertz */
Lajos Molnara1ae5a42014-11-06 17:05:46 -08001249 OMX_U32 nModulationDepth; /**< depth of modulation as a percentage of
James Dong334de522012-03-12 12:47:14 -07001250 delay (i.e. 0 to 100) */
1251 OMX_BU32 nFeedback; /**< Feedback from chorus output to input in percentage */
1252} OMX_AUDIO_CONFIG_CHORUSTYPE;
1253
1254
Lajos Molnara1ae5a42014-11-06 17:05:46 -08001255/** Reverberation is part of the reflected sound that follows the early
1256 * reflections. In a typical room, this consists of a dense succession of
1257 * echoes whose energy decays exponentially. The reverberation effect structure
1258 * as defined here includes both (early) reflections as well as (late) reverberations.
James Dong334de522012-03-12 12:47:14 -07001259 * @ingroup effects
1260 */
1261typedef struct OMX_AUDIO_CONFIG_REVERBERATIONTYPE {
1262 OMX_U32 nSize; /**< size of the structure in bytes */
1263 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */
1264 OMX_U32 nPortIndex; /**< port that this structure applies to */
1265 OMX_BOOL bEnable; /**< Enable/disable for reverberation control */
Lajos Molnara1ae5a42014-11-06 17:05:46 -08001266 OMX_BS32 sRoomLevel; /**< Intensity level for the whole room effect
1267 (i.e. both early reflections and late
James Dong334de522012-03-12 12:47:14 -07001268 reverberation) in millibels */
1269 OMX_BS32 sRoomHighFreqLevel; /**< Attenuation at high frequencies
1270 relative to the intensity at low
1271 frequencies in millibels */
1272 OMX_BS32 sReflectionsLevel; /**< Intensity level of early reflections
1273 (relative to room value), in millibels */
Lajos Molnara1ae5a42014-11-06 17:05:46 -08001274 OMX_BU32 sReflectionsDelay; /**< Delay time of the first reflection relative
James Dong334de522012-03-12 12:47:14 -07001275 to the direct path, in milliseconds */
1276 OMX_BS32 sReverbLevel; /**< Intensity level of late reverberation
1277 relative to room level, in millibels */
Lajos Molnara1ae5a42014-11-06 17:05:46 -08001278 OMX_BU32 sReverbDelay; /**< Time delay from the first early reflection
1279 to the beginning of the late reverberation
James Dong334de522012-03-12 12:47:14 -07001280 section, in milliseconds */
1281 OMX_BU32 sDecayTime; /**< Late reverberation decay time at low
1282 frequencies, in milliseconds */
Lajos Molnara1ae5a42014-11-06 17:05:46 -08001283 OMX_BU32 nDecayHighFreqRatio; /**< Ratio of high frequency decay time relative
James Dong334de522012-03-12 12:47:14 -07001284 to low frequency decay time in percent */
1285 OMX_U32 nDensity; /**< Modal density in the late reverberation decay,
1286 in percent (i.e. 0 - 100) */
1287 OMX_U32 nDiffusion; /**< Echo density in the late reverberation decay,
1288 in percent (i.e. 0 - 100) */
Lajos Molnara1ae5a42014-11-06 17:05:46 -08001289 OMX_BU32 sReferenceHighFreq; /**< Reference high frequency in Hertz. This is
1290 the frequency used as the reference for all
James Dong334de522012-03-12 12:47:14 -07001291 the high-frequency settings above */
1292
1293} OMX_AUDIO_CONFIG_REVERBERATIONTYPE;
1294
1295
Lajos Molnara1ae5a42014-11-06 17:05:46 -08001296/** Possible settings for the Echo Cancelation structure to use
James Dong334de522012-03-12 12:47:14 -07001297 * @ingroup effects
1298 */
1299typedef enum OMX_AUDIO_ECHOCANTYPE {
1300 OMX_AUDIO_EchoCanOff = 0, /**< Echo Cancellation is disabled */
Lajos Molnara1ae5a42014-11-06 17:05:46 -08001301 OMX_AUDIO_EchoCanNormal, /**< Echo Cancellation normal operation -
James Dong334de522012-03-12 12:47:14 -07001302 echo from plastics and face */
Lajos Molnara1ae5a42014-11-06 17:05:46 -08001303 OMX_AUDIO_EchoCanHFree, /**< Echo Cancellation optimized for
James Dong334de522012-03-12 12:47:14 -07001304 Hands Free operation */
Lajos Molnara1ae5a42014-11-06 17:05:46 -08001305 OMX_AUDIO_EchoCanCarKit, /**< Echo Cancellation optimized for
James Dong334de522012-03-12 12:47:14 -07001306 Car Kit (longer echo) */
Lajos Molnara1ae5a42014-11-06 17:05:46 -08001307 OMX_AUDIO_EchoCanKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
James Dong334de522012-03-12 12:47:14 -07001308 OMX_AUDIO_EchoCanVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
1309 OMX_AUDIO_EchoCanMax = 0x7FFFFFFF
1310} OMX_AUDIO_ECHOCANTYPE;
1311
1312
1313/** Enable / Disable for echo cancelation, which removes undesired echo's
1314 * from the audio
1315 * @ingroup effects
Lajos Molnara1ae5a42014-11-06 17:05:46 -08001316 */
James Dong334de522012-03-12 12:47:14 -07001317typedef struct OMX_AUDIO_CONFIG_ECHOCANCELATIONTYPE {
1318 OMX_U32 nSize; /**< size of the structure in bytes */
1319 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */
1320 OMX_U32 nPortIndex; /**< port that this structure applies to */
1321 OMX_AUDIO_ECHOCANTYPE eEchoCancelation; /**< Echo cancelation settings */
1322} OMX_AUDIO_CONFIG_ECHOCANCELATIONTYPE;
1323
1324
1325/** Enable / Disable for noise reduction, which undesired noise from
1326 * the audio
1327 * @ingroup effects
Lajos Molnara1ae5a42014-11-06 17:05:46 -08001328 */
James Dong334de522012-03-12 12:47:14 -07001329typedef struct OMX_AUDIO_CONFIG_NOISEREDUCTIONTYPE {
1330 OMX_U32 nSize; /**< size of the structure in bytes */
1331 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */
1332 OMX_U32 nPortIndex; /**< port that this structure applies to */
1333 OMX_BOOL bNoiseReduction; /**< Enable/disable for noise reduction */
1334} OMX_AUDIO_CONFIG_NOISEREDUCTIONTYPE;
1335
1336/** @} */
1337
1338#ifdef __cplusplus
1339}
1340#endif /* __cplusplus */
1341
1342#endif
1343/* File EOF */