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