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