1 /*-------------------------------------------------------------------------- 2 Copyright (c) 2009, 2011, 2015, 2017 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_CodingMax = 0x7FFFFFFF 102 }QOMX_AUDIO_CODINGTYPE; 103 104 105 /** 106 * AMR WB PLUS type 107 * 108 * STRUCT MEMBERS: 109 * nSize : Size of the structure in bytes 110 * nVersion : OMX specification version information 111 * nPortIndex : Port that this structure applies to 112 * nChannels : Number of channels 113 * nBitRate : Bit rate read only field 114 * nSampleRate : Sampling frequency for the clip(16/24/32/48KHz) 115 * eAMRBandMode : AMR Band Mode enumeration 116 * eAMRDTXMode : AMR DTX Mode enumeration 117 * eAMRFrameFormat : AMR frame format enumeration 118 */ 119 120 typedef struct QOMX_AUDIO_PARAM_AMRWBPLUSTYPE { 121 OMX_U32 nSize; 122 OMX_VERSIONTYPE nVersion; 123 OMX_U32 nPortIndex; 124 OMX_U32 nChannels; 125 OMX_U32 nBitRate; 126 OMX_U32 nSampleRate; 127 OMX_AUDIO_AMRBANDMODETYPE eAMRBandMode; 128 OMX_AUDIO_AMRDTXMODETYPE eAMRDTXMode; 129 OMX_AUDIO_AMRFRAMEFORMATTYPE eAMRFrameFormat; 130 } QOMX_AUDIO_PARAM_AMRWBPLUSTYPE; 131 132 typedef enum QOMX_AUDIO_WMAFORMATTYPE { 133 QOMX_AUDIO_WMAFormat10Pro = 0x7F000001, /**< Windows Media Audio format 10*/ 134 } QOMX_AUDIO_WMAFORMATTYPE; 135 136 /** 137 * WMA 10 PRO type 138 * 139 * STRUCT MEMBERS: 140 * nSize : Size of the structure in bytes 141 * nVersion : OMX specification version information 142 * nPortIndex : Port that this structure applies to 143 * nChannels : Number of channels 144 * nBitRate : Bit rate read only field 145 * eFormat : Version of WMA stream / data 146 * eProfile : Profile of WMA stream / data 147 * nSamplingRate : Sampling rate of the source data 148 * nBlockAlign : block alignment, or block size, in bytes of the audio codec 149 * nEncodeOptions : WMA Type-specific data 150 * nSuperBlockAlign : WMA Type-specific data 151 * validBitsPerSample : encoded stream (24-bit or 16-bit) 152 * formatTag : codec ID(0x162 or 0x166) 153 * advancedEncodeOpt : bit packed words indicating the features supported for LBR bitstream 154 * advancedEncodeOpt2 : bit packed words indicating the features supported for LBR bitstream 155 */ 156 typedef struct QOMX_AUDIO_PARAM_WMA10PROTYPE { 157 OMX_U32 nSize; 158 OMX_VERSIONTYPE nVersion; 159 OMX_U32 nPortIndex; 160 OMX_U16 nChannels; 161 OMX_U32 nBitRate; 162 QOMX_AUDIO_WMAFORMATTYPE eFormat; 163 OMX_AUDIO_WMAPROFILETYPE eProfile; 164 OMX_U32 nSamplingRate; 165 OMX_U16 nBlockAlign; 166 OMX_U16 nEncodeOptions; 167 OMX_U32 nSuperBlockAlign; 168 OMX_U32 validBitsPerSample; 169 OMX_U32 formatTag; 170 OMX_U32 advancedEncodeOpt; 171 OMX_U32 advancedEncodeOpt2; 172 OMX_U16 nVirtualPktSize; 173 } QOMX_AUDIO_PARAM_WMA10PROTYPE; 174 175 176 typedef enum OMX_AUDIO_AC3FORMATTYPE { 177 omx_audio_ac3 = 0x7f000001, /**< ac-3 */ 178 omx_audio_eac3 = 0x7f000002 /**< eac-3 */ 179 } OMX_AUDIO_AC3FORMATTYPE; 180 181 typedef enum OMX_AUDIO_AC3_CHANNEL_CONFIG 182 { 183 OMX_AUDIO_AC3_CHANNEL_CONFIG_RSVD = 0, 184 OMX_AUDIO_AC3_CHANNEL_CONFIG_1_0, 185 OMX_AUDIO_AC3_CHANNEL_CONFIG_2_0, 186 OMX_AUDIO_AC3_CHANNEL_CONFIG_3_0, 187 OMX_AUDIO_AC3_CHANNEL_CONFIG_2_1, 188 OMX_AUDIO_AC3_CHANNEL_CONFIG_3_1, 189 OMX_AUDIO_AC3_CHANNEL_CONFIG_2_2, 190 OMX_AUDIO_AC3_CHANNEL_CONFIG_3_2, 191 OMX_AUDIO_AC3_CHANNEL_CONFIG_3_0_1, 192 OMX_AUDIO_AC3_CHANNEL_CONFIG_2_2_1, 193 OMX_AUDIO_AC3_CHANNEL_CONFIG_3_2_1, 194 OMX_AUDIO_AC3_CHANNEL_CONFIG_3_0_2, 195 OMX_AUDIO_AC3_CHANNEL_CONFIG_2_2_2, 196 OMX_AUDIO_AC3_CHANNEL_CONFIG_3_2_2, 197 OMX_AUDIO_AC3_CHANNEL_CONFIG_DEFAULT = 0xFFFF 198 } OMX_AUDIO_AC3_CHANNEL_CONFIG; 199 200 /** 201 * AC-3 type 202 * 203 * STRUCT MEMBERS: 204 * nSize : Size of the structure in bytes 205 * nVersion : OMX specification version information 206 * nPortIndex : Port that this structure applies to 207 * nChannels : Number of channels 208 * nBitRate : Bitrate 209 * nSamplingRate : Sampling rate, 32K, 44.1K, 48K only supported 210 * eFormat : AC-3 or EAC-3 211 * eChannelConfig : Channel configuration 212 * nProgramID : Indication of ProgramID, 0-7 213 * bCompressionOn : Flag to enable Compression 214 * bLfeOn : Flag for LFE on/off 215 * bDelaySurroundChannels : Flag to put delay on surround channels 216 * 217 */ 218 typedef struct QOMX_AUDIO_PARAM_AC3TYPE { 219 OMX_U32 nSize; 220 OMX_VERSIONTYPE nVersion; 221 OMX_U32 nPortIndex; 222 OMX_U16 nChannels; 223 OMX_U32 nBitRate; 224 OMX_U32 nSamplingRate; 225 OMX_AUDIO_AC3FORMATTYPE eFormat; 226 OMX_AUDIO_AC3_CHANNEL_CONFIG eChannelConfig; 227 OMX_U8 nProgramID; 228 OMX_BOOL bCompressionOn; 229 OMX_BOOL bLfeOn; 230 OMX_BOOL bDelaySurroundChannels; 231 } QOMX_AUDIO_PARAM_AC3TYPE; 232 233 typedef struct OMX_AUDIO_PARAM_ANDROID_PROFILETYPE { 234 OMX_U32 nSize; 235 OMX_VERSIONTYPE nVersion; 236 OMX_U32 nPortIndex; 237 OMX_U32 eProfile; /**< type is OMX_AUDIO_AACPROFILETYPE or OMX_AUDIO_WMAPROFILETYPE 238 depending on context */ 239 OMX_U32 nProfileIndex; /**< Used to query for individual profile support information */ 240 } OMX_AUDIO_PARAM_ANDROID_PROFILETYPE; 241 242 typedef enum OMX_AUDIO_AC3_CHANNEL_ROUTING 243 { 244 OMX_AUDIO_AC3_CHANNEL_LEFT, 245 OMX_AUDIO_AC3_CHANNEL_CENTER, 246 OMX_AUDIO_AC3_CHANNEL_RIGHT, 247 OMX_AUDIO_AC3_CHANNEL_LEFT_SURROUND, 248 OMX_AUDIO_AC3_CHANNEL_RIGHT_SURROUND, 249 OMX_AUDIO_AC3_CHANNEL_SURROUND, 250 OMX_AUDIO_AC3_CHANNEL_EXTENSION_1, 251 OMX_AUDIO_AC3_CHANNEL_EXTENSION_2, 252 OMX_AUDIO_AC3_CHANNEL_DEFAULT = 0xFFFF 253 } OMX_AUDIO_AC3_CHANNEL_ROUTING; 254 255 typedef enum OMX_AUDIO_AC3_COMPRESSION_MODE 256 { 257 OMX_AUDIO_AC3_COMPRESSION_MODE_ANALOG_DIALNORM, 258 OMX_AUDIO_AC3_COMPRESSION_MODE_DIGITAL_DIALNORM, 259 OMX_AUDIO_AC3_COMPRESSION_MODE_LINE_OUT, 260 OMX_AUDIO_AC3_COMPRESSION_MODE_RF_REMOD 261 } OMX_AUDIO_AC3_COMPRESSION_MODE; 262 263 typedef enum OMX_AUDIO_AC3_STEREO_MODE 264 { 265 OMX_AUDIO_AC3_STEREO_MODE_AUTO_DETECT, 266 OMX_AUDIO_AC3_STEREO_MODE_LT_RT, 267 OMX_AUDIO_AC3_STEREO_MODE_LO_RO, 268 OMX_AUDIO_AC3_STEREO_MODE_DEFAULT = 0xFFFF 269 } OMX_AUDIO_AC3_STEREO_MODE; 270 271 typedef enum OMX_AUDIO_AC3_DUAL_MONO_MODE 272 { 273 OMX_AUDIO_AC3_DUAL_MONO_MODE_STEREO, 274 OMX_AUDIO_AC3_DUAL_MONO_MODE_LEFT_MONO, 275 OMX_AUDIO_AC3_DUAL_MONO_MODE_RIGHT_MONO, 276 OMX_AUDIO_AC3_DUAL_MONO_MODE_MIXED_MONO, 277 OMX_AUDIO_AC3_DUAL_MONO_MODE_DEFAULT = 0xFFFF 278 } OMX_AUDIO_AC3_DUAL_MONO_MODE; 279 280 typedef enum OMX_AUDIO_AC3_KARAOKE_MODE 281 { 282 OMX_AUDIO_AC3_KARAOKE_MODE_NO_VOCAL, 283 OMX_AUDIO_AC3_KARAOKE_MODE_LEFT_VOCAL, 284 OMX_AUDIO_AC3_KARAOKE_MODE_RIGHT_VOCAL, 285 OMX_AUDIO_AC3_KARAOKE_MODE_BOTH_VOCAL, 286 OMX_AUDIO_AC3_KARAOKE_MODE_DEFAULT = 0xFFFF 287 } OMX_AUDIO_AC3_KARAOKE_MODE; 288 289 290 typedef struct QOMX_AUDIO_PARAM_AC3PP 291 { 292 OMX_U32 nSize; 293 OMX_VERSIONTYPE nVersion; 294 OMX_U32 nPortIndex; 295 OMX_AUDIO_AC3_CHANNEL_ROUTING eChannelRouting[8]; 296 OMX_AUDIO_AC3_COMPRESSION_MODE eCompressionMode; 297 OMX_AUDIO_AC3_STEREO_MODE eStereoMode; 298 OMX_AUDIO_AC3_DUAL_MONO_MODE eDualMonoMode; 299 OMX_U32 usPcmScale; 300 OMX_U32 usDynamicScaleBoost; 301 OMX_U32 usDynamicScaleCut; 302 OMX_AUDIO_AC3_KARAOKE_MODE eKaraokeMode; 303 } QOMX_AUDIO_PARAM_AC3PP; 304 305 306 /** 307 * Stream info data 308 * 309 * STRUCT MEMBERS: 310 * sessionId : session Id for alsa to route data 311 */ 312 typedef struct QOMX_AUDIO_STREAM_INFO_DATA { 313 OMX_U8 sessionId; 314 } QOMX_AUDIO_STREAM_INFO_DATA; 315 316 317 /** 318 * Record Path 319 * 320 * STRUCT MEMBERS: 321 * recPath : Record Path for encoding 322 */ 323 typedef enum{ 324 325 QOMX_AUDIO_VOICE_TX, 326 QOMX_AUDIO_VOICE_RX, 327 QOMX_AUDIO_VOICE_MIXED, 328 329 } QOMX_AUDIO_VOICERECORDMODETYPE; 330 typedef struct QOMX_AUDIO_CONFIG_VOICERECORDTYPE { 331 332 OMX_U32 nSize; 333 OMX_VERSIONTYPE nVersion; 334 QOMX_AUDIO_VOICERECORDMODETYPE eVoiceRecordMode; 335 } QOMX_AUDIO_CONFIG_VOICERECORDTYPE; 336 337 /* Enum for mapping dual-mono contents to left and right channels */ 338 typedef enum OMX_AUDIO_DUAL_MONO_CHANNEL_CONFIG { 339 OMX_AUDIO_DUAL_MONO_MODE_FL_FR,/* 1st SCE to left & right */ 340 OMX_AUDIO_DUAL_MONO_MODE_SL_SR,/* 2nd SCE to left & right */ 341 OMX_AUDIO_DUAL_MONO_MODE_SL_FR,/* 2nd SCE to left, 1st SCE to right */ 342 OMX_AUDIO_DUAL_MONO_MODE_FL_SR,/* 1st SCE to left, 2nd SCE to right default */ 343 OMX_AUDIO_DUAL_MONO_MODE_DEFAULT = OMX_AUDIO_DUAL_MONO_MODE_FL_SR, 344 OMX_AUDIO_DUAL_MONO_MODE_INVALID = -1 345 } OMX_AUDIO_DUAL_MONO_CHANNEL_CONFIG; 346 347 /************************************/ 348 /* DAK */ 349 /*************************************/ 350 351 /** this is the list of custom vendor index */ 352 typedef enum OMX_INDEX_DAK_TYPE { 353 OMX_IndexConfigDAK_BUNDLE = OMX_IndexVendorStartUnused /*0x7F000000*/, /**< reference: OMX_DAK_CONFIG_BUNDLETYPE */ 354 OMX_IndexConfigDAK_M2S, /**< reference: OMX_DAK_CONFIG_M2STYPE */ 355 OMX_IndexConfigDAK_SSE, /**< reference: OMX_DAK_CONFIG_SSETYPE */ 356 OMX_IndexConfigDAK_SLC, /**< reference: OMX_DAK_CONFIG_SLCTYPE */ 357 OMX_IndexConfigDAK_VOL, /**< reference: OMX_DAK_CONFIG_VOLTYPE */ 358 OMX_IndexConfigDAK_NB, /**< reference: OMX_DAK_CONFIG_NBTYPE */ 359 OMX_IndexConfigDAK_GEQ, /**< reference: OMX_DAK_CONFIG_GEQTYPE */ 360 OMX_IndexConfigDAK_MSR, /**< reference: OMX_DAK_CONFIG_MSRTYPE */ 361 OMX_IndexConfigDAK_HFE, /**< reference: OMX_DAK_CONFIG_HFETYPE */ 362 OMX_IndexConfigDAK_FADE, /**< reference: OMX_DAK_CONFIG_FADETYPE */ 363 OMX_IndexConfigDAK_SEQ, /**< reference: OMX_DAK_CONFIG_SEQTYPE */ 364 365 } OMX_INDEX_DAK_TYPE; 366 367 368 /** Dolby Audio Kernel TDAS bundle */ 369 typedef struct OMX_DAK_CONFIG_BUNDLETYPE { 370 OMX_U32 nSize; /**< size of the structure in bytes */ 371 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ 372 OMX_U32 nDAK_Version; /**< Dolby Audio Kernel version information */ 373 OMX_U32 nDAK_Revision; /**< Dolby Audio Kernel revision information */ 374 OMX_U8 nLfeMixLevel; /**< level at which the LFE channel is mixed into the output audio */ 375 OMX_U8 nSampleRateIndex; /**< Output sample rate */ 376 OMX_U8 nInChans; /**< Channel format of input audio */ 377 OMX_U8 nInMatrix; /**< L/R mixing specification for stereo audio input */ 378 OMX_U8 nBypass; /**< Audio Processing bypass */ 379 OMX_U8 nRateMultipier; /**< Sample-rate multiplier (output with respect to input) */ 380 OMX_U8 nInChanFormat; /**< Input/Output channel format */ 381 OMX_U8 nMsrMaxProfile; /**< Maximum number of virtual rendering channels in Mobile Surround */ 382 OMX_BOOL bPortablemodeEnable; /**< Enable or disable Pulse Portable Mode */ 383 OMX_S16 nPotablemodeGain; /**< Send the Portable Mode gain value from the Pulse decoder */ 384 OMX_U8 nORL; /**< Device specific target signal level (output reference level) */ 385 OMX_BOOL bPulsedownmixEnable; /**< Enable the Pulse Downmix compensation */ 386 OMX_S8 nPulsedownmixAtten; /**< Attenuation value that Pulse is currently applying */ 387 OMX_U8 nOutChans; /**< Channel format of output audio */ 388 389 } OMX_DAK_CONFIG_BUNDLETYPE; 390 391 /** Dolby Audio Kernel Mono-to-Stereo Creator */ 392 typedef struct OMX_DAK_CONFIG_M2STYPE { 393 OMX_U32 nSize; /**< size of the structure in bytes */ 394 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ 395 OMX_BOOL bEnable; /**< Mono-to-Stereo Creator enable */ 396 OMX_BOOL bDetector; /**< Stereo detector status */ 397 } OMX_DAK_CONFIG_M2STYPE; 398 399 /** Dolby Audio Kernel Sound Space Expander */ 400 typedef struct OMX_DAK_CONFIG_SSETYPE { 401 OMX_U32 nSize; /**< size of the structure in bytes */ 402 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ 403 OMX_BOOL bEnable; /**< Sound Space Expander enable */ 404 OMX_U8 nWidth; /**< Width of expansion effect */ 405 OMX_U8 nSpkMode; /**< Speaker Mode */ 406 } OMX_DAK_CONFIG_SSETYPE; 407 408 /** Dolby Audio Kernel Sound Level Controller */ 409 typedef struct OMX_DAK_CONFIG_SLCTYPE { 410 OMX_U32 nSize; /**< size of the structure in bytes */ 411 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ 412 OMX_BOOL bEnable; /**< Sound Level Controller enable */ 413 OMX_U8 nLevel; /**< Source audio RMS level */ 414 OMX_U8 nDepth; /**< Depth of effect */ 415 } OMX_DAK_CONFIG_SLCTYPE; 416 417 /** Dolby Audio Kernel Volume */ 418 typedef struct OMX_DAK_CONFIG_VOLTYPE { 419 OMX_U32 nSize; /**< size of the structure in bytes */ 420 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ 421 OMX_BOOL bEnable; /**< Volume enable */ 422 OMX_U8 nGainType; /**< Linear/Logarithmic audio scaling */ 423 OMX_U8 nInternalGain; /**< Audio volume scale */ 424 OMX_U8 nExternalGain; /**< Audio volume scale applied by external volume control */ 425 OMX_S8 nBalance; /**< L/R panning for output audio */ 426 OMX_BOOL bMute; /**< Audio Mute */ 427 } OMX_DAK_CONFIG_VOLTYPE; 428 429 /** Dolby Audio Kernel Natural Bass */ 430 typedef struct OMX_DAK_CONFIG_NBTYPE { 431 OMX_U32 nSize; /**< size of the structure in bytes */ 432 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ 433 OMX_BOOL bEnable; /**< Natural Bass enable */ 434 OMX_U8 nCutoff; /**< Speakers/headphones lower cutoff frequency */ 435 OMX_U8 nBoost; /**< Strength of effect */ 436 OMX_U8 nLevel; /**< Maximum output level capability of speakers/headphones */ 437 } OMX_DAK_CONFIG_NBTYPE; 438 439 /** Dolby Audio Kernel Graphic EQ */ 440 typedef struct OMX_DAK_CONFIG_GEQTYPE { 441 OMX_U32 nSize; /**< size of the structure in bytes */ 442 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ 443 OMX_BOOL bEnable; /**< Graphic EQ enable */ 444 OMX_U8 nNbands; /**< Number of frequency bands */ 445 OMX_S8 nPreamp; /**< Global attenuation to apply prior to band level adjustment */ 446 OMX_U8 nMaxboost; /**< Maximum absolute boost with respect to the source audio */ 447 OMX_S8 nBand1; /**< Boost/cut for 1st frequency band */ 448 OMX_S8 nBand2; /**< Boost/cut for 2nd frequency band */ 449 OMX_S8 nBand3; /**< Boost/cut for 3rd frequency band */ 450 OMX_S8 nBand4; /**< Boost/cut for 4th frequency band */ 451 OMX_S8 nBand5; /**< Boost/cut for 5th frequency band */ 452 OMX_S8 nBand6; /**< Boost/cut for 6th frequency band */ 453 OMX_S8 nBand7; /**< Boost/cut for 7th frequency band */ 454 } OMX_DAK_CONFIG_GEQTYPE; 455 456 /** Dolby Audio Kernel, Mobile Surround and Surround Upmixer */ 457 typedef struct OMX_DAK_CONFIG_MSRTYPE { 458 OMX_U32 nSize; /**< size of the structure in bytes */ 459 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ 460 OMX_BOOL bMsrEnable; /**< Mobile Surround enable */ 461 OMX_U8 nMsrRoom; /**< Room Size control */ 462 OMX_U8 nMsrBright; /**< Brightness control */ 463 OMX_BOOL bMupEnable; /**< Mobile Surround Upmixer enable */ 464 } OMX_DAK_CONFIG_MSRTYPE; 465 466 /** Dolby Audio Kernel High Frequency Enhancer */ 467 typedef struct OMX_DAK_CONFIG_HFETYPE { 468 OMX_U32 nSize; /**< size of the structure in bytes */ 469 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ 470 OMX_BOOL bEnable; /**< High Frequency Enhancer enable */ 471 OMX_U8 nDepth; /**< Strength of effect */ 472 } OMX_DAK_CONFIG_HFETYPE; 473 474 /** Dolby Audio Kernel Fade */ 475 typedef struct OMX_DAK_CONFIG_FADETYPE { 476 OMX_U32 nSize; /**< size of the structure in bytes */ 477 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ 478 OMX_BOOL bEnable; /**< Fade enable */ 479 OMX_U8 nTarget; /**< Target fade level */ 480 OMX_U16 nTime; /**< Fade time interval */ 481 } OMX_DAK_CONFIG_FADETYPE; 482 483 /** Dolby Audio Kernel Speaker EQ */ 484 typedef struct OMX_DAK_CONFIG_SEQTYPE { 485 OMX_U32 nSize; /**< size of the structure in bytes */ 486 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ 487 OMX_BOOL bEnable; /**< Speaker EQ enable */ 488 OMX_S8 nLeftGainDB; /**< Additional gain for Left channel */ 489 OMX_S8 nRightGainDB; /**< Additional gain for Right channel */ 490 OMX_U8 nCoef48000Size; /**< Length of the block of coefficients for 48KHz Sampling Rate case */ 491 OMX_PTR pCoef48000; /**< Pointer to the block of coefficients for the 48KHz case */ 492 OMX_U8 nCoef44100Size; /**< Length of the block of coefficients for 44.1KHz Sampling Rate case */ 493 OMX_PTR pCoef44100; /**< Pointer to the block of coefficients for the 44.1KHz case */ 494 OMX_U8 nCoef32000Size; /**< Length of the block of coefficients for 32KHz Sampling Rate case */ 495 OMX_PTR pCoef32000; /**< Pointer to the block of coefficients for the 32KHz case */ 496 OMX_U8 nCoef24000Size; /**< Length of the block of coefficients for 24KHz Sampling Rate case */ 497 OMX_PTR pCoef24000; /**< Pointer to the block of coefficients for the 24KHz case */ 498 499 } OMX_DAK_CONFIG_SEQTYPE; 500 501 502 typedef enum OMX_AUDIO_CHANNELTYPE_EXTENSION { 503 OMX_AUDIO_ChannelTS = OMX_AUDIO_ChannelVendorStartUnused, /**< Top Surround */ 504 OMX_AUDIO_ChannelCVH /**< Central Vertical Height */ 505 } OMX_AUDIO_CHANNELTYPE_EXTENSION; 506 507 /** 508 * DUAL-MONO type 509 * 510 * STRUCT MEMBERS: 511 * nSize : Size of the structure in bytes 512 * nVersion : OMX specification version information 513 * nPortIndex : Port that this structure applies to 514 * eChannelConfig : Enum for channel config 515 * 516 */ 517 typedef struct QOMX_AUDIO_CONFIG_DUALMONOTYPE { 518 OMX_U32 nSize; 519 OMX_VERSIONTYPE nVersion; 520 OMX_U32 nPortIndex; 521 OMX_AUDIO_DUAL_MONO_CHANNEL_CONFIG eChannelConfig; 522 } QOMX_AUDIO_CONFIG_DUALMONOTYPE; 523 524 typedef struct QOMX_AUDIO_PARAM_ALACTYPE { 525 OMX_U32 nSize; /* Size of the structure in bytes */ 526 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ 527 OMX_U32 nPortIndex; /* Port that this structure applies to */ 528 OMX_BOOL bBytesStreamMode; /*enable byte stream mode*/ 529 OMX_U32 nFrameLength; /* Frames per packet when no explicit frames per packet setting is present in the packet header */ 530 OMX_U8 nCompatibleVersion; /* Indicates the compatible version */ 531 OMX_U8 nBitDepth; /* Bit depth of the source PCM data */ 532 OMX_U8 nPb; /* Tuning Parameter; currently not used */ 533 OMX_U8 nMb; /* Tuning Parameter; currently not used */ 534 OMX_U8 nKb; /* Tuning Parameter; currently not used */ 535 OMX_U8 nChannels; /* Number of channels for multichannel decoding */ 536 OMX_U16 nMaxRun; /* Currently not used */ 537 OMX_U32 nMaxFrameBytes; /* Max size of an Apple Lossless packet within the encoded stream */ 538 OMX_U32 nAvgBitRate; /* Average bit rate in bits per second of the Apple Lossless stream */ 539 OMX_U32 nSampleRate; /* Number of samples per second in Hertz */ 540 OMX_U32 nChannelLayoutTag; /*Indicates whether channel layout information is present in the bitstream */ 541 } QOMX_AUDIO_PARAM_ALACTYPE; 542 543 typedef struct QOMX_AUDIO_PARAM_APETYPE { 544 OMX_U32 nSize; /* Size of the structure in bytes */ 545 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ 546 OMX_U32 nPortIndex; /* Port that this structure applies to */ 547 OMX_BOOL bBytesStreamMode; /*enable byte stream mode*/ 548 OMX_U16 nCompatibleVersion; /* Indicates the compatible version */ 549 OMX_U16 nCompressionLevel; /* The compression level present in the encoded packet */ 550 OMX_U32 nFormatFlags; /* Reserved parameter for future use */ 551 OMX_U32 nBlocksPerFrame; /* Indicates the number of audio blocks in one frame present in the encoded packet header */ 552 OMX_U32 nFinalFrameBlocks; /* Indicates the number of audio blocks in the final frame present in the encoded packet header */ 553 OMX_U32 nTotalFrames; /* Indicates the total number of frames */ 554 OMX_U16 nBitsPerSample; /* Bit depth of the source PCM data */ 555 OMX_U16 nChannels; /* Number of channels for decoding */ 556 OMX_U32 nSampleRate; /* Samples per second in Hertz */ 557 OMX_U32 nSeekTablePresent; /* Flag to indicate if seek table is present or not */ 558 } QOMX_AUDIO_PARAM_APETYPE; 559 560 typedef struct QOMX_AUDIO_PARAM_FLAC_DEC_TYPE { 561 OMX_U32 nSize; 562 OMX_VERSIONTYPE nVersion; 563 OMX_U32 nPortIndex; 564 OMX_U32 nChannels; 565 OMX_U32 nSampleRate; 566 OMX_U32 nBitsPerSample; 567 OMX_U32 nMinBlkSize; 568 OMX_U32 nMaxBlkSize; 569 OMX_U32 nMinFrmSize; 570 OMX_U32 nMaxFrmSize; 571 } QOMX_AUDIO_PARAM_FLAC_DEC_TYPE; 572 573 typedef struct QOMX_AUDIO_PARAM_DSD_TYPE { 574 OMX_U32 nSize; 575 OMX_VERSIONTYPE nVersion; 576 OMX_U32 nPortIndex; 577 OMX_BOOL bBytesStreamMode; /*enable byte stream mode*/ 578 OMX_U32 nSampleRate; 579 OMX_U32 nOutSamplePerCh; 580 OMX_U32 nChannels; 581 OMX_U32 nBitsPerSample; 582 } QOMX_AUDIO_PARAM_DSD_TYPE; 583 584 enum { 585 kKeyIndexAlacFrameLength = 0, 586 kKeyIndexAlacCompatibleVersion = 4, 587 kKeyIndexAlacBitDepth = 5, 588 kKeyIndexAlacPb = 6, 589 kKeyIndexAlacMb = 7, 590 kKeyIndexAlacKb = 8, 591 kKeyIndexAlacNumChannels = 9, 592 kKeyIndexAlacMaxRun = 10, 593 kKeyIndexAlacMaxFrameBytes = 12, 594 kKeyIndexAlacAvgBitRate = 16, 595 kKeyIndexAlacSamplingRate = 20, 596 kKeyIndexAlacChannelLayoutTag = 24, 597 kKeyIndexAlacMax = kKeyIndexAlacChannelLayoutTag, 598 }; 599 600 enum { 601 kKeyIndexApeCompatibleVersion = 0, 602 kKeyIndexApeCompressionLevel = 2, 603 kKeyIndexApeFormatFlags = 4, 604 kKeyIndexApeBlocksPerFrame = 8, 605 kKeyIndexApeFinalFrameBlocks = 12, 606 kKeyIndexApeTotalFrames = 16, 607 kKeyIndexApeBitsPerSample = 20, 608 kKeyIndexApeNumChannels = 22, 609 kKeyIndexApeSampleRate = 24, 610 kKeyIndexApeSeekTablePresent = 28, 611 kKeyIndexApeMax = kKeyIndexApeSeekTablePresent, 612 }; 613 614 enum { 615 APE_COMPRESSION_LEVEL_FAST = 1000, 616 APE_COMPRESSION_LEVEL_NORMAL = 2000, 617 APE_COMPRESSION_LEVEL_HIGH = 3000, 618 APE_COMPRESSION_LEVEL_EXTRA_HIGH = 4000, 619 APE_COMPRESSION_LEVEL_INSANE = 5000, 620 }; 621 622 #if defined( __cplusplus ) 623 } 624 #endif /* end of macro __cplusplus */ 625 626 #endif /* end of macro __H_QOMX_AUDIOEXTENSIONS_H__ */ 627