1 /*-------------------------------------------------------------------------- 2 Copyright (c) 2009, 2011, 2015, 2017-2018 The Linux Foundation. All rights reserved. 3 4 Redistribution and use in source and binary forms, with or without 5 modification, are permitted provided that the following conditions are met: 6 * Redistributions of source code must retain the above copyright 7 notice, this list of conditions and the following disclaimer. 8 * Redistributions in binary form must reproduce the above copyright 9 notice, this list of conditions and the following disclaimer in the 10 documentation and/or other materials provided with the distribution. 11 * Neither the name of The Linux Foundation nor 12 the names of its contributors may be used to endorse or promote 13 products derived from this software without specific prior written 14 permission. 15 16 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 17 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18 IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 19 NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 20 CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 21 EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 22 PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 23 OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 25 OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 26 ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 --------------------------------------------------------------------------*/ 28 /*============================================================================ 29 O p e n M A X w r a p p e r s 30 O p e n M A X C o r e 31 32 *//** @file QOMX_AudioExtensions.h 33 This module contains the extensions for Audio 34 35 *//*========================================================================*/ 36 37 #ifndef __H_QOMX_AUDIOEXTENSIONS_H__ 38 #define __H_QOMX_AUDIOEXTENSIONS_H__ 39 40 /*======================================================================== 41 42 INCLUDE FILES FOR MODULE 43 44 ========================================================================== */ 45 #include <OMX_Audio.h> 46 47 /*======================================================================== 48 49 DEFINITIONS AND DECLARATIONS 50 51 ========================================================================== */ 52 53 #if defined( __cplusplus ) 54 extern "C" 55 { 56 #endif /* end of macro __cplusplus */ 57 58 /* Audio extension strings */ 59 #define OMX_QCOM_INDEX_PARAM_AMRWBPLUS "OMX.Qualcomm.index.audio.amrwbplus" 60 #define OMX_QCOM_INDEX_PARAM_WMA10PRO "OMX.Qualcomm.index.audio.wma10pro" 61 #define OMX_QCOM_INDEX_PARAM_SESSIONID "OMX.Qualcomm.index.audio.sessionId" 62 #define OMX_QCOM_INDEX_PARAM_VOICERECORDTYPE "OMX.Qualcomm.index.audio.VoiceRecord" 63 #define OMX_QCOM_INDEX_PARAM_AC3TYPE "OMX.Qualcomm.index.audio.ac3" 64 #define OMX_QCOM_INDEX_PARAM_AC3PP "OMX.Qualcomm.index.audio.postproc.ac3" 65 #define OMX_QCOM_INDEX_PARAM_DAK_BUNDLE "OMX.Qualcomm.index.audio.dakbundle" 66 #define OMX_QCOM_INDEX_PARAM_DAK_M2S "OMX.Qualcomm.index.audio.dak_m2s" 67 #define OMX_QCOM_INDEX_PARAM_DAK_SSE "OMX.Qualcomm.index.audio.dak_sse" 68 #define OMX_QCOM_INDEX_PARAM_DAK_SLC "OMX.Qualcomm.index.audio.dak_slc" 69 #define OMX_QCOM_INDEX_PARAM_DAK_VOL "OMX.Qualcomm.index.audio.dak_vol" 70 #define OMX_QCOM_INDEX_PARAM_DAK_NB "OMX.Qualcomm.index.audio.dak_nb" 71 #define OMX_QCOM_INDEX_PARAM_DAK_GEQ "OMX.Qualcomm.index.audio.dak_geq" 72 #define OMX_QCOM_INDEX_PARAM_DAK_MSR "OMX.Qualcomm.index.audio.dak_msr" 73 #define OMX_QCOM_INDEX_PARAM_DAK_HFE "OMX.Qualcomm.index.audio.dak_hfe" 74 #define OMX_QCOM_INDEX_PARAM_DAK_FADE "OMX.Qualcomm.index.audio.dak_fade" 75 #define OMX_QCOM_INDEX_PARAM_DAK_SEQ "OMX.Qualcomm.index.audio.dak_seq" 76 #define OMX_QCOM_INDEX_CONFIG_DUALMONO "OMX.Qualcomm.index.audio.dualmono" 77 #define OMX_QCOM_INDEX_CONFIG_AAC_SEL_MIX_COEF "OMX.Qualcomm.index.audio.aac_sel_mix_coef" 78 #define OMX_QCOM_INDEX_PARAM_ALAC "OMX.Qualcomm.index.audio.alac" 79 #define OMX_QCOM_INDEX_PARAM_APE "OMX.Qualcomm.index.audio.ape" 80 #define OMX_QCOM_INDEX_PARAM_DSD "OMX.Qualcomm.index.audio.dsd" 81 #define OMX_QCOM_INDEX_PARAM_FLAC_DEC "OMX.Qualcomm.index.audio.flacdec" 82 83 #define ALAC_CSD_SIZE 24 84 #define APE_CSD_SIZE 32 85 86 typedef enum QOMX_AUDIO_AMRBANDMODETYPE { 87 QOMX_AUDIO_AMRBandModeWB9 = 0x7F000001,/**< AMRWB Mode 9 = SID*/ 88 QOMX_AUDIO_AMRBandModeWB10 = 0x7F000002,/**< AMRWB Mode 10 = 13600 bps */ 89 QOMX_AUDIO_AMRBandModeWB11 = 0x7F000003,/**< AMRWB Mode 11 = 18000 bps */ 90 QOMX_AUDIO_AMRBandModeWB12 = 0x7F000004,/**< AMRWB Mode 12 = 24000 bps */ 91 QOMX_AUDIO_AMRBandModeWB13 = 0x7F000005,/**< AMRWB Mode 13 = 24000 bps */ 92 QOMX_AUDIO_AMRBandModeWB14 = 0x7F000006,/**< AMRWB Mode 14 = FRAME_ERASE*/ 93 QOMX_AUDIO_AMRBandModeWB15 = 0x7F000007,/**< AMRWB Mode 15 = NO_DATA */ 94 }QOMX_AUDIO_AMRBANDMODETYPE; 95 96 typedef enum QOMX_AUDIO_CODINGTYPE { 97 QOMX_AUDIO_CodingVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ 98 QOMX_AUDIO_CodingEVRCB = 0x7F000001, 99 QOMX_AUDIO_CodingEVRCWB = 0x7F000002, 100 QOMX_AUDIO_CodingFLAC = 0x7F000003, 101 QOMX_AUDIO_CodingMPEGH = 0x7F000004, 102 QOMX_AUDIO_CodingMax = 0x7FFFFFFF 103 }QOMX_AUDIO_CODINGTYPE; 104 105 106 /** 107 * AMR WB PLUS type 108 * 109 * STRUCT MEMBERS: 110 * nSize : Size of the structure in bytes 111 * nVersion : OMX specification version information 112 * nPortIndex : Port that this structure applies to 113 * nChannels : Number of channels 114 * nBitRate : Bit rate read only field 115 * nSampleRate : Sampling frequency for the clip(16/24/32/48KHz) 116 * eAMRBandMode : AMR Band Mode enumeration 117 * eAMRDTXMode : AMR DTX Mode enumeration 118 * eAMRFrameFormat : AMR frame format enumeration 119 */ 120 121 typedef struct QOMX_AUDIO_PARAM_AMRWBPLUSTYPE { 122 OMX_U32 nSize; 123 OMX_VERSIONTYPE nVersion; 124 OMX_U32 nPortIndex; 125 OMX_U32 nChannels; 126 OMX_U32 nBitRate; 127 OMX_U32 nSampleRate; 128 OMX_AUDIO_AMRBANDMODETYPE eAMRBandMode; 129 OMX_AUDIO_AMRDTXMODETYPE eAMRDTXMode; 130 OMX_AUDIO_AMRFRAMEFORMATTYPE eAMRFrameFormat; 131 } QOMX_AUDIO_PARAM_AMRWBPLUSTYPE; 132 133 typedef enum QOMX_AUDIO_WMAFORMATTYPE { 134 QOMX_AUDIO_WMAFormat10Pro = 0x7F000001, /**< Windows Media Audio format 10*/ 135 } QOMX_AUDIO_WMAFORMATTYPE; 136 137 /** 138 * WMA 10 PRO type 139 * 140 * STRUCT MEMBERS: 141 * nSize : Size of the structure in bytes 142 * nVersion : OMX specification version information 143 * nPortIndex : Port that this structure applies to 144 * nChannels : Number of channels 145 * nBitRate : Bit rate read only field 146 * eFormat : Version of WMA stream / data 147 * eProfile : Profile of WMA stream / data 148 * nSamplingRate : Sampling rate of the source data 149 * nBlockAlign : block alignment, or block size, in bytes of the audio codec 150 * nEncodeOptions : WMA Type-specific data 151 * nSuperBlockAlign : WMA Type-specific data 152 * validBitsPerSample : encoded stream (24-bit or 16-bit) 153 * formatTag : codec ID(0x162 or 0x166) 154 * advancedEncodeOpt : bit packed words indicating the features supported for LBR bitstream 155 * advancedEncodeOpt2 : bit packed words indicating the features supported for LBR bitstream 156 */ 157 typedef struct QOMX_AUDIO_PARAM_WMA10PROTYPE { 158 OMX_U32 nSize; 159 OMX_VERSIONTYPE nVersion; 160 OMX_U32 nPortIndex; 161 OMX_U16 nChannels; 162 OMX_U32 nBitRate; 163 QOMX_AUDIO_WMAFORMATTYPE eFormat; 164 OMX_AUDIO_WMAPROFILETYPE eProfile; 165 OMX_U32 nSamplingRate; 166 OMX_U16 nBlockAlign; 167 OMX_U16 nEncodeOptions; 168 OMX_U32 nSuperBlockAlign; 169 OMX_U32 validBitsPerSample; 170 OMX_U32 formatTag; 171 OMX_U32 advancedEncodeOpt; 172 OMX_U32 advancedEncodeOpt2; 173 OMX_U16 nVirtualPktSize; 174 } QOMX_AUDIO_PARAM_WMA10PROTYPE; 175 176 177 typedef enum OMX_AUDIO_AC3FORMATTYPE { 178 omx_audio_ac3 = 0x7f000001, /**< ac-3 */ 179 omx_audio_eac3 = 0x7f000002 /**< eac-3 */ 180 } OMX_AUDIO_AC3FORMATTYPE; 181 182 typedef enum OMX_AUDIO_AC3_CHANNEL_CONFIG 183 { 184 OMX_AUDIO_AC3_CHANNEL_CONFIG_RSVD = 0, 185 OMX_AUDIO_AC3_CHANNEL_CONFIG_1_0, 186 OMX_AUDIO_AC3_CHANNEL_CONFIG_2_0, 187 OMX_AUDIO_AC3_CHANNEL_CONFIG_3_0, 188 OMX_AUDIO_AC3_CHANNEL_CONFIG_2_1, 189 OMX_AUDIO_AC3_CHANNEL_CONFIG_3_1, 190 OMX_AUDIO_AC3_CHANNEL_CONFIG_2_2, 191 OMX_AUDIO_AC3_CHANNEL_CONFIG_3_2, 192 OMX_AUDIO_AC3_CHANNEL_CONFIG_3_0_1, 193 OMX_AUDIO_AC3_CHANNEL_CONFIG_2_2_1, 194 OMX_AUDIO_AC3_CHANNEL_CONFIG_3_2_1, 195 OMX_AUDIO_AC3_CHANNEL_CONFIG_3_0_2, 196 OMX_AUDIO_AC3_CHANNEL_CONFIG_2_2_2, 197 OMX_AUDIO_AC3_CHANNEL_CONFIG_3_2_2, 198 OMX_AUDIO_AC3_CHANNEL_CONFIG_DEFAULT = 0xFFFF 199 } OMX_AUDIO_AC3_CHANNEL_CONFIG; 200 201 /** 202 * AC-3 type 203 * 204 * STRUCT MEMBERS: 205 * nSize : Size of the structure in bytes 206 * nVersion : OMX specification version information 207 * nPortIndex : Port that this structure applies to 208 * nChannels : Number of channels 209 * nBitRate : Bitrate 210 * nSamplingRate : Sampling rate, 32K, 44.1K, 48K only supported 211 * eFormat : AC-3 or EAC-3 212 * eChannelConfig : Channel configuration 213 * nProgramID : Indication of ProgramID, 0-7 214 * bCompressionOn : Flag to enable Compression 215 * bLfeOn : Flag for LFE on/off 216 * bDelaySurroundChannels : Flag to put delay on surround channels 217 * 218 */ 219 typedef struct QOMX_AUDIO_PARAM_AC3TYPE { 220 OMX_U32 nSize; 221 OMX_VERSIONTYPE nVersion; 222 OMX_U32 nPortIndex; 223 OMX_U16 nChannels; 224 OMX_U32 nBitRate; 225 OMX_U32 nSamplingRate; 226 OMX_AUDIO_AC3FORMATTYPE eFormat; 227 OMX_AUDIO_AC3_CHANNEL_CONFIG eChannelConfig; 228 OMX_U8 nProgramID; 229 OMX_BOOL bCompressionOn; 230 OMX_BOOL bLfeOn; 231 OMX_BOOL bDelaySurroundChannels; 232 } QOMX_AUDIO_PARAM_AC3TYPE; 233 234 typedef struct OMX_AUDIO_PARAM_ANDROID_PROFILETYPE { 235 OMX_U32 nSize; 236 OMX_VERSIONTYPE nVersion; 237 OMX_U32 nPortIndex; 238 OMX_U32 eProfile; /**< type is OMX_AUDIO_AACPROFILETYPE or OMX_AUDIO_WMAPROFILETYPE 239 depending on context */ 240 OMX_U32 nProfileIndex; /**< Used to query for individual profile support information */ 241 } OMX_AUDIO_PARAM_ANDROID_PROFILETYPE; 242 243 typedef enum OMX_AUDIO_AC3_CHANNEL_ROUTING 244 { 245 OMX_AUDIO_AC3_CHANNEL_LEFT, 246 OMX_AUDIO_AC3_CHANNEL_CENTER, 247 OMX_AUDIO_AC3_CHANNEL_RIGHT, 248 OMX_AUDIO_AC3_CHANNEL_LEFT_SURROUND, 249 OMX_AUDIO_AC3_CHANNEL_RIGHT_SURROUND, 250 OMX_AUDIO_AC3_CHANNEL_SURROUND, 251 OMX_AUDIO_AC3_CHANNEL_EXTENSION_1, 252 OMX_AUDIO_AC3_CHANNEL_EXTENSION_2, 253 OMX_AUDIO_AC3_CHANNEL_DEFAULT = 0xFFFF 254 } OMX_AUDIO_AC3_CHANNEL_ROUTING; 255 256 typedef enum OMX_AUDIO_AC3_COMPRESSION_MODE 257 { 258 OMX_AUDIO_AC3_COMPRESSION_MODE_ANALOG_DIALNORM, 259 OMX_AUDIO_AC3_COMPRESSION_MODE_DIGITAL_DIALNORM, 260 OMX_AUDIO_AC3_COMPRESSION_MODE_LINE_OUT, 261 OMX_AUDIO_AC3_COMPRESSION_MODE_RF_REMOD 262 } OMX_AUDIO_AC3_COMPRESSION_MODE; 263 264 typedef enum OMX_AUDIO_AC3_STEREO_MODE 265 { 266 OMX_AUDIO_AC3_STEREO_MODE_AUTO_DETECT, 267 OMX_AUDIO_AC3_STEREO_MODE_LT_RT, 268 OMX_AUDIO_AC3_STEREO_MODE_LO_RO, 269 OMX_AUDIO_AC3_STEREO_MODE_DEFAULT = 0xFFFF 270 } OMX_AUDIO_AC3_STEREO_MODE; 271 272 typedef enum OMX_AUDIO_AC3_DUAL_MONO_MODE 273 { 274 OMX_AUDIO_AC3_DUAL_MONO_MODE_STEREO, 275 OMX_AUDIO_AC3_DUAL_MONO_MODE_LEFT_MONO, 276 OMX_AUDIO_AC3_DUAL_MONO_MODE_RIGHT_MONO, 277 OMX_AUDIO_AC3_DUAL_MONO_MODE_MIXED_MONO, 278 OMX_AUDIO_AC3_DUAL_MONO_MODE_DEFAULT = 0xFFFF 279 } OMX_AUDIO_AC3_DUAL_MONO_MODE; 280 281 typedef enum OMX_AUDIO_AC3_KARAOKE_MODE 282 { 283 OMX_AUDIO_AC3_KARAOKE_MODE_NO_VOCAL, 284 OMX_AUDIO_AC3_KARAOKE_MODE_LEFT_VOCAL, 285 OMX_AUDIO_AC3_KARAOKE_MODE_RIGHT_VOCAL, 286 OMX_AUDIO_AC3_KARAOKE_MODE_BOTH_VOCAL, 287 OMX_AUDIO_AC3_KARAOKE_MODE_DEFAULT = 0xFFFF 288 } OMX_AUDIO_AC3_KARAOKE_MODE; 289 290 291 typedef struct QOMX_AUDIO_PARAM_AC3PP 292 { 293 OMX_U32 nSize; 294 OMX_VERSIONTYPE nVersion; 295 OMX_U32 nPortIndex; 296 OMX_AUDIO_AC3_CHANNEL_ROUTING eChannelRouting[8]; 297 OMX_AUDIO_AC3_COMPRESSION_MODE eCompressionMode; 298 OMX_AUDIO_AC3_STEREO_MODE eStereoMode; 299 OMX_AUDIO_AC3_DUAL_MONO_MODE eDualMonoMode; 300 OMX_U32 usPcmScale; 301 OMX_U32 usDynamicScaleBoost; 302 OMX_U32 usDynamicScaleCut; 303 OMX_AUDIO_AC3_KARAOKE_MODE eKaraokeMode; 304 } QOMX_AUDIO_PARAM_AC3PP; 305 306 307 /** 308 * Stream info data 309 * 310 * STRUCT MEMBERS: 311 * sessionId : session Id for alsa to route data 312 */ 313 typedef struct QOMX_AUDIO_STREAM_INFO_DATA { 314 OMX_U8 sessionId; 315 } QOMX_AUDIO_STREAM_INFO_DATA; 316 317 318 /** 319 * Record Path 320 * 321 * STRUCT MEMBERS: 322 * recPath : Record Path for encoding 323 */ 324 typedef enum{ 325 326 QOMX_AUDIO_VOICE_TX, 327 QOMX_AUDIO_VOICE_RX, 328 QOMX_AUDIO_VOICE_MIXED, 329 330 } QOMX_AUDIO_VOICERECORDMODETYPE; 331 typedef struct QOMX_AUDIO_CONFIG_VOICERECORDTYPE { 332 333 OMX_U32 nSize; 334 OMX_VERSIONTYPE nVersion; 335 QOMX_AUDIO_VOICERECORDMODETYPE eVoiceRecordMode; 336 } QOMX_AUDIO_CONFIG_VOICERECORDTYPE; 337 338 /* Enum for mapping dual-mono contents to left and right channels */ 339 typedef enum OMX_AUDIO_DUAL_MONO_CHANNEL_CONFIG { 340 OMX_AUDIO_DUAL_MONO_MODE_FL_FR,/* 1st SCE to left & right */ 341 OMX_AUDIO_DUAL_MONO_MODE_SL_SR,/* 2nd SCE to left & right */ 342 OMX_AUDIO_DUAL_MONO_MODE_SL_FR,/* 2nd SCE to left, 1st SCE to right */ 343 OMX_AUDIO_DUAL_MONO_MODE_FL_SR,/* 1st SCE to left, 2nd SCE to right default */ 344 OMX_AUDIO_DUAL_MONO_MODE_DEFAULT = OMX_AUDIO_DUAL_MONO_MODE_FL_SR, 345 OMX_AUDIO_DUAL_MONO_MODE_INVALID = -1 346 } OMX_AUDIO_DUAL_MONO_CHANNEL_CONFIG; 347 348 /************************************/ 349 /* DAK */ 350 /*************************************/ 351 352 /** this is the list of custom vendor index */ 353 typedef enum OMX_INDEX_DAK_TYPE { 354 OMX_IndexConfigDAK_BUNDLE = OMX_IndexVendorStartUnused /*0x7F000000*/, /**< reference: OMX_DAK_CONFIG_BUNDLETYPE */ 355 OMX_IndexConfigDAK_M2S, /**< reference: OMX_DAK_CONFIG_M2STYPE */ 356 OMX_IndexConfigDAK_SSE, /**< reference: OMX_DAK_CONFIG_SSETYPE */ 357 OMX_IndexConfigDAK_SLC, /**< reference: OMX_DAK_CONFIG_SLCTYPE */ 358 OMX_IndexConfigDAK_VOL, /**< reference: OMX_DAK_CONFIG_VOLTYPE */ 359 OMX_IndexConfigDAK_NB, /**< reference: OMX_DAK_CONFIG_NBTYPE */ 360 OMX_IndexConfigDAK_GEQ, /**< reference: OMX_DAK_CONFIG_GEQTYPE */ 361 OMX_IndexConfigDAK_MSR, /**< reference: OMX_DAK_CONFIG_MSRTYPE */ 362 OMX_IndexConfigDAK_HFE, /**< reference: OMX_DAK_CONFIG_HFETYPE */ 363 OMX_IndexConfigDAK_FADE, /**< reference: OMX_DAK_CONFIG_FADETYPE */ 364 OMX_IndexConfigDAK_SEQ, /**< reference: OMX_DAK_CONFIG_SEQTYPE */ 365 366 } OMX_INDEX_DAK_TYPE; 367 368 369 /** Dolby Audio Kernel TDAS bundle */ 370 typedef struct OMX_DAK_CONFIG_BUNDLETYPE { 371 OMX_U32 nSize; /**< size of the structure in bytes */ 372 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ 373 OMX_U32 nDAK_Version; /**< Dolby Audio Kernel version information */ 374 OMX_U32 nDAK_Revision; /**< Dolby Audio Kernel revision information */ 375 OMX_U8 nLfeMixLevel; /**< level at which the LFE channel is mixed into the output audio */ 376 OMX_U8 nSampleRateIndex; /**< Output sample rate */ 377 OMX_U8 nInChans; /**< Channel format of input audio */ 378 OMX_U8 nInMatrix; /**< L/R mixing specification for stereo audio input */ 379 OMX_U8 nBypass; /**< Audio Processing bypass */ 380 OMX_U8 nRateMultipier; /**< Sample-rate multiplier (output with respect to input) */ 381 OMX_U8 nInChanFormat; /**< Input/Output channel format */ 382 OMX_U8 nMsrMaxProfile; /**< Maximum number of virtual rendering channels in Mobile Surround */ 383 OMX_BOOL bPortablemodeEnable; /**< Enable or disable Pulse Portable Mode */ 384 OMX_S16 nPotablemodeGain; /**< Send the Portable Mode gain value from the Pulse decoder */ 385 OMX_U8 nORL; /**< Device specific target signal level (output reference level) */ 386 OMX_BOOL bPulsedownmixEnable; /**< Enable the Pulse Downmix compensation */ 387 OMX_S8 nPulsedownmixAtten; /**< Attenuation value that Pulse is currently applying */ 388 OMX_U8 nOutChans; /**< Channel format of output audio */ 389 390 } OMX_DAK_CONFIG_BUNDLETYPE; 391 392 /** Dolby Audio Kernel Mono-to-Stereo Creator */ 393 typedef struct OMX_DAK_CONFIG_M2STYPE { 394 OMX_U32 nSize; /**< size of the structure in bytes */ 395 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ 396 OMX_BOOL bEnable; /**< Mono-to-Stereo Creator enable */ 397 OMX_BOOL bDetector; /**< Stereo detector status */ 398 } OMX_DAK_CONFIG_M2STYPE; 399 400 /** Dolby Audio Kernel Sound Space Expander */ 401 typedef struct OMX_DAK_CONFIG_SSETYPE { 402 OMX_U32 nSize; /**< size of the structure in bytes */ 403 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ 404 OMX_BOOL bEnable; /**< Sound Space Expander enable */ 405 OMX_U8 nWidth; /**< Width of expansion effect */ 406 OMX_U8 nSpkMode; /**< Speaker Mode */ 407 } OMX_DAK_CONFIG_SSETYPE; 408 409 /** Dolby Audio Kernel Sound Level Controller */ 410 typedef struct OMX_DAK_CONFIG_SLCTYPE { 411 OMX_U32 nSize; /**< size of the structure in bytes */ 412 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ 413 OMX_BOOL bEnable; /**< Sound Level Controller enable */ 414 OMX_U8 nLevel; /**< Source audio RMS level */ 415 OMX_U8 nDepth; /**< Depth of effect */ 416 } OMX_DAK_CONFIG_SLCTYPE; 417 418 /** Dolby Audio Kernel Volume */ 419 typedef struct OMX_DAK_CONFIG_VOLTYPE { 420 OMX_U32 nSize; /**< size of the structure in bytes */ 421 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ 422 OMX_BOOL bEnable; /**< Volume enable */ 423 OMX_U8 nGainType; /**< Linear/Logarithmic audio scaling */ 424 OMX_U8 nInternalGain; /**< Audio volume scale */ 425 OMX_U8 nExternalGain; /**< Audio volume scale applied by external volume control */ 426 OMX_S8 nBalance; /**< L/R panning for output audio */ 427 OMX_BOOL bMute; /**< Audio Mute */ 428 } OMX_DAK_CONFIG_VOLTYPE; 429 430 /** Dolby Audio Kernel Natural Bass */ 431 typedef struct OMX_DAK_CONFIG_NBTYPE { 432 OMX_U32 nSize; /**< size of the structure in bytes */ 433 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ 434 OMX_BOOL bEnable; /**< Natural Bass enable */ 435 OMX_U8 nCutoff; /**< Speakers/headphones lower cutoff frequency */ 436 OMX_U8 nBoost; /**< Strength of effect */ 437 OMX_U8 nLevel; /**< Maximum output level capability of speakers/headphones */ 438 } OMX_DAK_CONFIG_NBTYPE; 439 440 /** Dolby Audio Kernel Graphic EQ */ 441 typedef struct OMX_DAK_CONFIG_GEQTYPE { 442 OMX_U32 nSize; /**< size of the structure in bytes */ 443 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ 444 OMX_BOOL bEnable; /**< Graphic EQ enable */ 445 OMX_U8 nNbands; /**< Number of frequency bands */ 446 OMX_S8 nPreamp; /**< Global attenuation to apply prior to band level adjustment */ 447 OMX_U8 nMaxboost; /**< Maximum absolute boost with respect to the source audio */ 448 OMX_S8 nBand1; /**< Boost/cut for 1st frequency band */ 449 OMX_S8 nBand2; /**< Boost/cut for 2nd frequency band */ 450 OMX_S8 nBand3; /**< Boost/cut for 3rd frequency band */ 451 OMX_S8 nBand4; /**< Boost/cut for 4th frequency band */ 452 OMX_S8 nBand5; /**< Boost/cut for 5th frequency band */ 453 OMX_S8 nBand6; /**< Boost/cut for 6th frequency band */ 454 OMX_S8 nBand7; /**< Boost/cut for 7th frequency band */ 455 } OMX_DAK_CONFIG_GEQTYPE; 456 457 /** Dolby Audio Kernel, Mobile Surround and Surround Upmixer */ 458 typedef struct OMX_DAK_CONFIG_MSRTYPE { 459 OMX_U32 nSize; /**< size of the structure in bytes */ 460 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ 461 OMX_BOOL bMsrEnable; /**< Mobile Surround enable */ 462 OMX_U8 nMsrRoom; /**< Room Size control */ 463 OMX_U8 nMsrBright; /**< Brightness control */ 464 OMX_BOOL bMupEnable; /**< Mobile Surround Upmixer enable */ 465 } OMX_DAK_CONFIG_MSRTYPE; 466 467 /** Dolby Audio Kernel High Frequency Enhancer */ 468 typedef struct OMX_DAK_CONFIG_HFETYPE { 469 OMX_U32 nSize; /**< size of the structure in bytes */ 470 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ 471 OMX_BOOL bEnable; /**< High Frequency Enhancer enable */ 472 OMX_U8 nDepth; /**< Strength of effect */ 473 } OMX_DAK_CONFIG_HFETYPE; 474 475 /** Dolby Audio Kernel Fade */ 476 typedef struct OMX_DAK_CONFIG_FADETYPE { 477 OMX_U32 nSize; /**< size of the structure in bytes */ 478 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ 479 OMX_BOOL bEnable; /**< Fade enable */ 480 OMX_U8 nTarget; /**< Target fade level */ 481 OMX_U16 nTime; /**< Fade time interval */ 482 } OMX_DAK_CONFIG_FADETYPE; 483 484 /** Dolby Audio Kernel Speaker EQ */ 485 typedef struct OMX_DAK_CONFIG_SEQTYPE { 486 OMX_U32 nSize; /**< size of the structure in bytes */ 487 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ 488 OMX_BOOL bEnable; /**< Speaker EQ enable */ 489 OMX_S8 nLeftGainDB; /**< Additional gain for Left channel */ 490 OMX_S8 nRightGainDB; /**< Additional gain for Right channel */ 491 OMX_U8 nCoef48000Size; /**< Length of the block of coefficients for 48KHz Sampling Rate case */ 492 OMX_PTR pCoef48000; /**< Pointer to the block of coefficients for the 48KHz case */ 493 OMX_U8 nCoef44100Size; /**< Length of the block of coefficients for 44.1KHz Sampling Rate case */ 494 OMX_PTR pCoef44100; /**< Pointer to the block of coefficients for the 44.1KHz case */ 495 OMX_U8 nCoef32000Size; /**< Length of the block of coefficients for 32KHz Sampling Rate case */ 496 OMX_PTR pCoef32000; /**< Pointer to the block of coefficients for the 32KHz case */ 497 OMX_U8 nCoef24000Size; /**< Length of the block of coefficients for 24KHz Sampling Rate case */ 498 OMX_PTR pCoef24000; /**< Pointer to the block of coefficients for the 24KHz case */ 499 500 } OMX_DAK_CONFIG_SEQTYPE; 501 502 503 typedef enum OMX_AUDIO_CHANNELTYPE_EXTENSION { 504 OMX_AUDIO_ChannelTS = OMX_AUDIO_ChannelVendorStartUnused, /**< Top Surround */ 505 OMX_AUDIO_ChannelCVH /**< Central Vertical Height */ 506 } OMX_AUDIO_CHANNELTYPE_EXTENSION; 507 508 /** 509 * DUAL-MONO type 510 * 511 * STRUCT MEMBERS: 512 * nSize : Size of the structure in bytes 513 * nVersion : OMX specification version information 514 * nPortIndex : Port that this structure applies to 515 * eChannelConfig : Enum for channel config 516 * 517 */ 518 typedef struct QOMX_AUDIO_CONFIG_DUALMONOTYPE { 519 OMX_U32 nSize; 520 OMX_VERSIONTYPE nVersion; 521 OMX_U32 nPortIndex; 522 OMX_AUDIO_DUAL_MONO_CHANNEL_CONFIG eChannelConfig; 523 } QOMX_AUDIO_CONFIG_DUALMONOTYPE; 524 525 typedef struct QOMX_AUDIO_PARAM_ALACTYPE { 526 OMX_U32 nSize; /* Size of the structure in bytes */ 527 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ 528 OMX_U32 nPortIndex; /* Port that this structure applies to */ 529 OMX_BOOL bBytesStreamMode; /*enable byte stream mode*/ 530 OMX_U32 nFrameLength; /* Frames per packet when no explicit frames per packet setting is present in the packet header */ 531 OMX_U8 nCompatibleVersion; /* Indicates the compatible version */ 532 OMX_U8 nBitDepth; /* Bit depth of the source PCM data */ 533 OMX_U8 nPb; /* Tuning Parameter; currently not used */ 534 OMX_U8 nMb; /* Tuning Parameter; currently not used */ 535 OMX_U8 nKb; /* Tuning Parameter; currently not used */ 536 OMX_U8 nChannels; /* Number of channels for multichannel decoding */ 537 OMX_U16 nMaxRun; /* Currently not used */ 538 OMX_U32 nMaxFrameBytes; /* Max size of an Apple Lossless packet within the encoded stream */ 539 OMX_U32 nAvgBitRate; /* Average bit rate in bits per second of the Apple Lossless stream */ 540 OMX_U32 nSampleRate; /* Number of samples per second in Hertz */ 541 OMX_U32 nChannelLayoutTag; /*Indicates whether channel layout information is present in the bitstream */ 542 } QOMX_AUDIO_PARAM_ALACTYPE; 543 544 typedef struct QOMX_AUDIO_PARAM_APETYPE { 545 OMX_U32 nSize; /* Size of the structure in bytes */ 546 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ 547 OMX_U32 nPortIndex; /* Port that this structure applies to */ 548 OMX_BOOL bBytesStreamMode; /*enable byte stream mode*/ 549 OMX_U16 nCompatibleVersion; /* Indicates the compatible version */ 550 OMX_U16 nCompressionLevel; /* The compression level present in the encoded packet */ 551 OMX_U32 nFormatFlags; /* Reserved parameter for future use */ 552 OMX_U32 nBlocksPerFrame; /* Indicates the number of audio blocks in one frame present in the encoded packet header */ 553 OMX_U32 nFinalFrameBlocks; /* Indicates the number of audio blocks in the final frame present in the encoded packet header */ 554 OMX_U32 nTotalFrames; /* Indicates the total number of frames */ 555 OMX_U16 nBitsPerSample; /* Bit depth of the source PCM data */ 556 OMX_U16 nChannels; /* Number of channels for decoding */ 557 OMX_U32 nSampleRate; /* Samples per second in Hertz */ 558 OMX_U32 nSeekTablePresent; /* Flag to indicate if seek table is present or not */ 559 } QOMX_AUDIO_PARAM_APETYPE; 560 561 typedef struct QOMX_AUDIO_PARAM_FLAC_DEC_TYPE { 562 OMX_U32 nSize; 563 OMX_VERSIONTYPE nVersion; 564 OMX_U32 nPortIndex; 565 OMX_U32 nChannels; 566 OMX_U32 nSampleRate; 567 OMX_U32 nBitsPerSample; 568 OMX_U32 nMinBlkSize; 569 OMX_U32 nMaxBlkSize; 570 OMX_U32 nMinFrmSize; 571 OMX_U32 nMaxFrmSize; 572 } QOMX_AUDIO_PARAM_FLAC_DEC_TYPE; 573 574 typedef struct QOMX_AUDIO_PARAM_DSD_TYPE { 575 OMX_U32 nSize; 576 OMX_VERSIONTYPE nVersion; 577 OMX_U32 nPortIndex; 578 OMX_BOOL bBytesStreamMode; /*enable byte stream mode*/ 579 OMX_U32 nSampleRate; 580 OMX_U32 nOutSamplePerCh; 581 OMX_U32 nChannels; 582 OMX_U32 nBitsPerSample; 583 } QOMX_AUDIO_PARAM_DSD_TYPE; 584 585 typedef struct QOMX_AUDIO_PARAM_MPEGH_TYPE { 586 OMX_U32 nSize; 587 OMX_VERSIONTYPE nVersion; 588 OMX_U32 nPortIndex; 589 OMX_U32 nSampleRate; /** Sent In-Band as well and can be redundant For Decoder, **/ 590 OMX_U32 nBitRate; /** Sent In-Band as well and can be redundant For Decoder, **/ 591 OMX_U32 nSamplesPerFrame; /** Sent In-Band as well and can be redundant For Decoder, **/ 592 OMX_U32 nDFrames; /** No of Dependent Frames; if 10;every 11 frame is seekable 593 - Specific to Encoder; Redundant for Decoder **/ 594 OMX_U32 nHOAOrder; /** HOA Order - Specific to Encoder; May be redundant for 595 Decoder **/ 596 } QOMX_AUDIO_PARAM_MPEGH_TYPE; 597 598 typedef struct QOMX_AUDIO_PARAM_MPEGH_HEADER_TYPE { 599 OMX_U32 nSize; 600 OMX_VERSIONTYPE nVersion; 601 OMX_U32 nPortIndex; 602 OMX_U64 pConfig; 603 OMX_U64 pSceneInfo; 604 OMX_U64 pDRC; 605 OMX_U64 pGroup; 606 OMX_U64 pSwitchGroup; 607 OMX_U64 pPreset; 608 OMX_U64 pTextLabel; 609 } QOMX_AUDIO_PARAM_MPEGH_HEADER_TYPE; 610 611 typedef struct QOMX_AUDIO_PARAM_CHANNEL_CONFIG_TYPE { 612 OMX_U32 nSize; 613 OMX_VERSIONTYPE nVersion; 614 OMX_U32 nPortIndex; 615 OMX_U32 nChannelMask; /* Masked defined in Android audio-base.h */ 616 } QOMX_AUDIO_PARAM_CHANNEL_CONFIG_TYPE; 617 618 typedef enum QOMX_BINAURAL_MODE { 619 QOMX_BINAURAL_MODE_OFF, 620 QOMX_BINAURAL_MODE_ON 621 } QOMX_BINAURAL_MODE; 622 623 typedef struct QOMX_AUDIO_PARAM_BINAURAL_TYPE { 624 OMX_U32 nSize; 625 OMX_VERSIONTYPE nVersion; 626 OMX_U32 nPortIndex; 627 QOMX_BINAURAL_MODE eBinauralMode; 628 } QOMX_AUDIO_PARAM_BINAURAL_TYPE; 629 630 typedef struct QOMX_AUDIO_PARAM_ROTATION_TYPE { 631 OMX_U32 nSize; 632 OMX_VERSIONTYPE nVersion; 633 OMX_U32 nPortIndex; 634 OMX_S32 nQX; /* x vector component of quaternion */ 635 OMX_S32 nQY; /* y vector component of quaternion */ 636 OMX_S32 nQZ; /* z vector component of quaternion */ 637 OMX_S32 nQW; /* Scalar component of quaternion */ 638 } QOMX_AUDIO_PARAM_ROTATION_TYPE; 639 640 enum { 641 kKeyIndexAlacFrameLength = 0, 642 kKeyIndexAlacCompatibleVersion = 4, 643 kKeyIndexAlacBitDepth = 5, 644 kKeyIndexAlacPb = 6, 645 kKeyIndexAlacMb = 7, 646 kKeyIndexAlacKb = 8, 647 kKeyIndexAlacNumChannels = 9, 648 kKeyIndexAlacMaxRun = 10, 649 kKeyIndexAlacMaxFrameBytes = 12, 650 kKeyIndexAlacAvgBitRate = 16, 651 kKeyIndexAlacSamplingRate = 20, 652 kKeyIndexAlacChannelLayoutTag = 24, 653 kKeyIndexAlacMax = kKeyIndexAlacChannelLayoutTag, 654 }; 655 656 enum { 657 kKeyIndexApeCompatibleVersion = 0, 658 kKeyIndexApeCompressionLevel = 2, 659 kKeyIndexApeFormatFlags = 4, 660 kKeyIndexApeBlocksPerFrame = 8, 661 kKeyIndexApeFinalFrameBlocks = 12, 662 kKeyIndexApeTotalFrames = 16, 663 kKeyIndexApeBitsPerSample = 20, 664 kKeyIndexApeNumChannels = 22, 665 kKeyIndexApeSampleRate = 24, 666 kKeyIndexApeSeekTablePresent = 28, 667 kKeyIndexApeMax = kKeyIndexApeSeekTablePresent, 668 }; 669 670 enum { 671 APE_COMPRESSION_LEVEL_FAST = 1000, 672 APE_COMPRESSION_LEVEL_NORMAL = 2000, 673 APE_COMPRESSION_LEVEL_HIGH = 3000, 674 APE_COMPRESSION_LEVEL_EXTRA_HIGH = 4000, 675 APE_COMPRESSION_LEVEL_INSANE = 5000, 676 }; 677 678 #if defined( __cplusplus ) 679 } 680 #endif /* end of macro __cplusplus */ 681 682 #endif /* end of macro __H_QOMX_AUDIOEXTENSIONS_H__ */ 683