1 /*--------------------------------------------------------------------------
2 Copyright (c) 2009, 2011, 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 
79 typedef enum QOMX_AUDIO_AMRBANDMODETYPE {
80     QOMX_AUDIO_AMRBandModeWB9              = 0x7F000001,/**< AMRWB Mode 9 = SID*/
81     QOMX_AUDIO_AMRBandModeWB10             = 0x7F000002,/**< AMRWB Mode 10 = 13600 bps */
82     QOMX_AUDIO_AMRBandModeWB11             = 0x7F000003,/**< AMRWB Mode 11 = 18000 bps */
83     QOMX_AUDIO_AMRBandModeWB12             = 0x7F000004,/**< AMRWB Mode 12 = 24000 bps */
84     QOMX_AUDIO_AMRBandModeWB13             = 0x7F000005,/**< AMRWB Mode 13 = 24000 bps */
85     QOMX_AUDIO_AMRBandModeWB14             = 0x7F000006,/**< AMRWB Mode 14 = FRAME_ERASE*/
86     QOMX_AUDIO_AMRBandModeWB15             = 0x7F000007,/**< AMRWB Mode 15 = NO_DATA */
87 }QOMX_AUDIO_AMRBANDMODETYPE;
88 
89 typedef enum QOMX_AUDIO_CODINGTYPE {
90    QOMX_AUDIO_CodingVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
91    QOMX_AUDIO_CodingEVRCB  = 0x7F000001,
92    QOMX_AUDIO_CodingEVRCWB = 0x7F000002,
93    QOMX_AUDIO_CodingFLAC   = 0x7F000003,
94    QOMX_AUDIO_CodingMax = 0x7FFFFFFF
95 }QOMX_AUDIO_CODINGTYPE;
96 
97 
98 /**
99  * AMR WB PLUS type
100  *
101  *  STRUCT MEMBERS:
102  *  nSize           : Size of the structure in bytes
103  *  nVersion        : OMX specification version information
104  *  nPortIndex      : Port that this structure applies to
105  *  nChannels       : Number of channels
106  *  nBitRate        : Bit rate read only field
107  *  nSampleRate     : Sampling frequency for the clip(16/24/32/48KHz)
108  *  eAMRBandMode    : AMR Band Mode enumeration
109  *  eAMRDTXMode     : AMR DTX Mode enumeration
110  *  eAMRFrameFormat : AMR frame format enumeration
111  */
112 
113 typedef struct QOMX_AUDIO_PARAM_AMRWBPLUSTYPE {
114     OMX_U32 nSize;
115     OMX_VERSIONTYPE nVersion;
116     OMX_U32 nPortIndex;
117     OMX_U32 nChannels;
118     OMX_U32 nBitRate;
119     OMX_U32 nSampleRate;
120     OMX_AUDIO_AMRBANDMODETYPE   eAMRBandMode;
121     OMX_AUDIO_AMRDTXMODETYPE     eAMRDTXMode;
122     OMX_AUDIO_AMRFRAMEFORMATTYPE eAMRFrameFormat;
123 } QOMX_AUDIO_PARAM_AMRWBPLUSTYPE;
124 
125 typedef enum QOMX_AUDIO_WMAFORMATTYPE {
126     QOMX_AUDIO_WMAFormat10Pro = 0x7F000001, /**< Windows Media Audio format 10*/
127 } QOMX_AUDIO_WMAFORMATTYPE;
128 
129 /**
130  * WMA 10 PRO type
131  *
132  *  STRUCT MEMBERS:
133  *  nSize              : Size of the structure in bytes
134  *  nVersion           : OMX specification version information
135  *  nPortIndex         : Port that this structure applies to
136  *  nChannels          : Number of channels
137  *  nBitRate           : Bit rate read only field
138  *  eFormat            : Version of WMA stream / data
139  *  eProfile           : Profile of WMA stream / data
140  *  nSamplingRate      : Sampling rate of the source data
141  *  nBlockAlign        : block alignment, or block size, in bytes of the audio codec
142  *  nEncodeOptions     : WMA Type-specific data
143  *  nSuperBlockAlign   : WMA Type-specific data
144  *  validBitsPerSample : encoded stream (24-bit or 16-bit)
145  *  formatTag          : codec ID(0x162 or 0x166)
146  *  advancedEncodeOpt  : bit packed words indicating the features supported for LBR bitstream
147  *  advancedEncodeOpt2 : bit packed words indicating the features supported for LBR bitstream
148  */
149 typedef struct QOMX_AUDIO_PARAM_WMA10PROTYPE {
150     OMX_U32 nSize;
151     OMX_VERSIONTYPE nVersion;
152     OMX_U32 nPortIndex;
153     OMX_U16 nChannels;
154     OMX_U32 nBitRate;
155     QOMX_AUDIO_WMAFORMATTYPE eFormat;
156     OMX_AUDIO_WMAPROFILETYPE eProfile;
157     OMX_U32 nSamplingRate;
158     OMX_U16 nBlockAlign;
159     OMX_U16 nEncodeOptions;
160     OMX_U32 nSuperBlockAlign;
161     OMX_U32 validBitsPerSample;
162     OMX_U32 formatTag;
163     OMX_U32 advancedEncodeOpt;
164     OMX_U32 advancedEncodeOpt2;
165     OMX_U16 nVirtualPktSize;
166 } QOMX_AUDIO_PARAM_WMA10PROTYPE;
167 
168 
169 typedef enum OMX_AUDIO_AC3FORMATTYPE {
170    omx_audio_ac3       = 0x7f000001, /**< ac-3 */
171    omx_audio_eac3      = 0x7f000002  /**< eac-3 */
172 } OMX_AUDIO_AC3FORMATTYPE;
173 
174 typedef enum OMX_AUDIO_AC3_CHANNEL_CONFIG
175 {
176    OMX_AUDIO_AC3_CHANNEL_CONFIG_RSVD = 0,
177    OMX_AUDIO_AC3_CHANNEL_CONFIG_1_0,
178    OMX_AUDIO_AC3_CHANNEL_CONFIG_2_0,
179    OMX_AUDIO_AC3_CHANNEL_CONFIG_3_0,
180    OMX_AUDIO_AC3_CHANNEL_CONFIG_2_1,
181    OMX_AUDIO_AC3_CHANNEL_CONFIG_3_1,
182    OMX_AUDIO_AC3_CHANNEL_CONFIG_2_2,
183    OMX_AUDIO_AC3_CHANNEL_CONFIG_3_2,
184    OMX_AUDIO_AC3_CHANNEL_CONFIG_3_0_1,
185    OMX_AUDIO_AC3_CHANNEL_CONFIG_2_2_1,
186    OMX_AUDIO_AC3_CHANNEL_CONFIG_3_2_1,
187    OMX_AUDIO_AC3_CHANNEL_CONFIG_3_0_2,
188    OMX_AUDIO_AC3_CHANNEL_CONFIG_2_2_2,
189    OMX_AUDIO_AC3_CHANNEL_CONFIG_3_2_2,
190    OMX_AUDIO_AC3_CHANNEL_CONFIG_DEFAULT = 0xFFFF
191 } OMX_AUDIO_AC3_CHANNEL_CONFIG;
192 
193 /**
194  * AC-3 type
195  *
196  *  STRUCT MEMBERS:
197  *  nSize               : Size of the structure in bytes
198  *  nVersion            : OMX specification version information
199  *  nPortIndex          : Port that this structure applies to
200  *  nChannels           : Number of channels
201  *  nBitRate            : Bitrate
202  *  nSamplingRate       : Sampling rate, 32K, 44.1K, 48K only supported
203  *  eFormat             : AC-3 or EAC-3
204  *  eChannelConfig      : Channel configuration
205  *  nProgramID          : Indication of ProgramID, 0-7
206  *  bCompressionOn      : Flag to enable Compression
207  *  bLfeOn              : Flag for LFE on/off
208  *  bDelaySurroundChannels : Flag to put delay on surround channels
209  *
210  */
211 typedef struct QOMX_AUDIO_PARAM_AC3TYPE {
212    OMX_U32 nSize;
213    OMX_VERSIONTYPE nVersion;
214    OMX_U32 nPortIndex;
215    OMX_U16 nChannels;
216    OMX_U32 nBitRate;
217    OMX_U32 nSamplingRate;
218    OMX_AUDIO_AC3FORMATTYPE eFormat;
219    OMX_AUDIO_AC3_CHANNEL_CONFIG eChannelConfig;
220    OMX_U8 nProgramID;
221    OMX_BOOL bCompressionOn;
222    OMX_BOOL bLfeOn;
223    OMX_BOOL bDelaySurroundChannels;
224 } QOMX_AUDIO_PARAM_AC3TYPE;
225 
226 typedef enum OMX_AUDIO_AC3_CHANNEL_ROUTING
227 {
228    OMX_AUDIO_AC3_CHANNEL_LEFT,
229    OMX_AUDIO_AC3_CHANNEL_CENTER,
230    OMX_AUDIO_AC3_CHANNEL_RIGHT,
231    OMX_AUDIO_AC3_CHANNEL_LEFT_SURROUND,
232    OMX_AUDIO_AC3_CHANNEL_RIGHT_SURROUND,
233    OMX_AUDIO_AC3_CHANNEL_SURROUND,
234    OMX_AUDIO_AC3_CHANNEL_EXTENSION_1,
235    OMX_AUDIO_AC3_CHANNEL_EXTENSION_2,
236    OMX_AUDIO_AC3_CHANNEL_DEFAULT = 0xFFFF
237 } OMX_AUDIO_AC3_CHANNEL_ROUTING;
238 
239 typedef enum OMX_AUDIO_AC3_COMPRESSION_MODE
240 {
241    OMX_AUDIO_AC3_COMPRESSION_MODE_ANALOG_DIALNORM,
242    OMX_AUDIO_AC3_COMPRESSION_MODE_DIGITAL_DIALNORM,
243    OMX_AUDIO_AC3_COMPRESSION_MODE_LINE_OUT,
244    OMX_AUDIO_AC3_COMPRESSION_MODE_RF_REMOD
245 } OMX_AUDIO_AC3_COMPRESSION_MODE;
246 
247 typedef enum OMX_AUDIO_AC3_STEREO_MODE
248 {
249    OMX_AUDIO_AC3_STEREO_MODE_AUTO_DETECT,
250    OMX_AUDIO_AC3_STEREO_MODE_LT_RT,
251    OMX_AUDIO_AC3_STEREO_MODE_LO_RO,
252    OMX_AUDIO_AC3_STEREO_MODE_DEFAULT = 0xFFFF
253 } OMX_AUDIO_AC3_STEREO_MODE;
254 
255 typedef enum OMX_AUDIO_AC3_DUAL_MONO_MODE
256 {
257    OMX_AUDIO_AC3_DUAL_MONO_MODE_STEREO,
258    OMX_AUDIO_AC3_DUAL_MONO_MODE_LEFT_MONO,
259    OMX_AUDIO_AC3_DUAL_MONO_MODE_RIGHT_MONO,
260    OMX_AUDIO_AC3_DUAL_MONO_MODE_MIXED_MONO,
261    OMX_AUDIO_AC3_DUAL_MONO_MODE_DEFAULT = 0xFFFF
262 } OMX_AUDIO_AC3_DUAL_MONO_MODE;
263 
264 typedef enum OMX_AUDIO_AC3_KARAOKE_MODE
265 {
266    OMX_AUDIO_AC3_KARAOKE_MODE_NO_VOCAL,
267    OMX_AUDIO_AC3_KARAOKE_MODE_LEFT_VOCAL,
268    OMX_AUDIO_AC3_KARAOKE_MODE_RIGHT_VOCAL,
269    OMX_AUDIO_AC3_KARAOKE_MODE_BOTH_VOCAL,
270    OMX_AUDIO_AC3_KARAOKE_MODE_DEFAULT = 0xFFFF
271 } OMX_AUDIO_AC3_KARAOKE_MODE;
272 
273 
274 typedef struct QOMX_AUDIO_PARAM_AC3PP
275 {
276    OMX_U32 nSize;
277    OMX_VERSIONTYPE nVersion;
278    OMX_U32 nPortIndex;
279    OMX_AUDIO_AC3_CHANNEL_ROUTING eChannelRouting[8];
280    OMX_AUDIO_AC3_COMPRESSION_MODE eCompressionMode;
281    OMX_AUDIO_AC3_STEREO_MODE eStereoMode;
282    OMX_AUDIO_AC3_DUAL_MONO_MODE eDualMonoMode;
283    OMX_U32 usPcmScale;
284    OMX_U32 usDynamicScaleBoost;
285    OMX_U32 usDynamicScaleCut;
286    OMX_AUDIO_AC3_KARAOKE_MODE eKaraokeMode;
287 } QOMX_AUDIO_PARAM_AC3PP;
288 
289 
290 /**
291  * Stream info data
292  *
293  *  STRUCT MEMBERS:
294  *  sessionId :  session Id for alsa to route data
295  */
296 typedef struct QOMX_AUDIO_STREAM_INFO_DATA {
297     OMX_U8  sessionId;
298 } QOMX_AUDIO_STREAM_INFO_DATA;
299 
300 
301 /**
302  * Record Path
303  *
304  * STRUCT MEMBERS:
305  * recPath : Record Path for encoding
306  */
307 typedef enum{
308 
309 QOMX_AUDIO_VOICE_TX,
310 QOMX_AUDIO_VOICE_RX,
311 QOMX_AUDIO_VOICE_MIXED,
312 
313 } QOMX_AUDIO_VOICERECORDMODETYPE;
314 typedef struct QOMX_AUDIO_CONFIG_VOICERECORDTYPE {
315 
316 OMX_U32                            nSize;
317 OMX_VERSIONTYPE                    nVersion;
318 QOMX_AUDIO_VOICERECORDMODETYPE     eVoiceRecordMode;
319 }  QOMX_AUDIO_CONFIG_VOICERECORDTYPE;
320 
321 /* Enum for mapping dual-mono contents to left and right channels */
322 typedef enum OMX_AUDIO_DUAL_MONO_CHANNEL_CONFIG {
323  OMX_AUDIO_DUAL_MONO_MODE_FL_FR,/* 1st SCE to left & right */
324  OMX_AUDIO_DUAL_MONO_MODE_SL_SR,/* 2nd SCE to left & right */
325  OMX_AUDIO_DUAL_MONO_MODE_SL_FR,/* 2nd SCE to left, 1st SCE to right */
326  OMX_AUDIO_DUAL_MONO_MODE_FL_SR,/* 1st SCE to left, 2nd SCE to right default */
327  OMX_AUDIO_DUAL_MONO_MODE_DEFAULT = OMX_AUDIO_DUAL_MONO_MODE_FL_SR,
328  OMX_AUDIO_DUAL_MONO_MODE_INVALID = -1
329 } OMX_AUDIO_DUAL_MONO_CHANNEL_CONFIG;
330 
331 /************************************/
332 /* DAK */
333 /*************************************/
334 
335 /** this is the list of custom vendor index */
336 typedef enum OMX_INDEX_DAK_TYPE {
337 	OMX_IndexConfigDAK_BUNDLE = OMX_IndexVendorStartUnused /*0x7F000000*/,	/**< reference: OMX_DAK_CONFIG_BUNDLETYPE */
338 	OMX_IndexConfigDAK_M2S,	/**< reference: OMX_DAK_CONFIG_M2STYPE */
339 	OMX_IndexConfigDAK_SSE,	/**< reference: OMX_DAK_CONFIG_SSETYPE */
340 	OMX_IndexConfigDAK_SLC,	/**< reference: OMX_DAK_CONFIG_SLCTYPE */
341 	OMX_IndexConfigDAK_VOL,	/**< reference: OMX_DAK_CONFIG_VOLTYPE */
342 	OMX_IndexConfigDAK_NB,	/**< reference: OMX_DAK_CONFIG_NBTYPE */
343 	OMX_IndexConfigDAK_GEQ,	/**< reference: OMX_DAK_CONFIG_GEQTYPE */
344 	OMX_IndexConfigDAK_MSR, /**< reference: OMX_DAK_CONFIG_MSRTYPE */
345 	OMX_IndexConfigDAK_HFE,	/**< reference: OMX_DAK_CONFIG_HFETYPE */
346 	OMX_IndexConfigDAK_FADE,/**< reference: OMX_DAK_CONFIG_FADETYPE */
347 	OMX_IndexConfigDAK_SEQ,	/**< reference: OMX_DAK_CONFIG_SEQTYPE */
348 
349 } OMX_INDEX_DAK_TYPE;
350 
351 
352 /** Dolby Audio Kernel TDAS bundle */
353 typedef struct OMX_DAK_CONFIG_BUNDLETYPE {
354     	OMX_U32 nSize;              	/**< size of the structure in bytes */
355 	OMX_VERSIONTYPE nVersion;	/**< OMX specification version information */
356 	OMX_U32 nDAK_Version;		/**< Dolby Audio Kernel version information */
357 	OMX_U32 nDAK_Revision;		/**< Dolby Audio Kernel revision information */
358 	OMX_U8 nLfeMixLevel;		/**< level at which the LFE channel is mixed into the output audio */
359 	OMX_U8 nSampleRateIndex;	/**< Output sample rate */
360 	OMX_U8 nInChans;		/**< Channel format of input audio */
361 	OMX_U8 nInMatrix;		/**< L/R mixing specification for stereo audio input */
362 	OMX_U8 nBypass;			/**< Audio Processing bypass */
363 	OMX_U8 nRateMultipier;		/**< Sample-rate multiplier (output with respect to input) */
364 	OMX_U8 nInChanFormat;		/**< Input/Output channel format */
365 	OMX_U8 nMsrMaxProfile;		/**< Maximum number of virtual rendering channels in Mobile Surround */
366 	OMX_BOOL bPortablemodeEnable;	/**< Enable or disable Pulse Portable Mode */
367 	OMX_S16 nPotablemodeGain;	/**< Send the Portable Mode gain value from the Pulse decoder */
368 	OMX_U8 nORL;			/**< Device specific target signal level (output reference level) */
369 	OMX_BOOL bPulsedownmixEnable;	/**< Enable the Pulse Downmix compensation */
370 	OMX_S8 nPulsedownmixAtten;	/**< Attenuation value that Pulse is currently applying */
371 	OMX_U8 nOutChans;		/**< Channel format of output audio */
372 
373 } OMX_DAK_CONFIG_BUNDLETYPE;
374 
375 /** Dolby Audio Kernel Mono-to-Stereo Creator */
376 typedef struct OMX_DAK_CONFIG_M2STYPE {
377 	OMX_U32 nSize;			/**< size of the structure in bytes */
378 	OMX_VERSIONTYPE nVersion;	/**< OMX specification version information */
379 	OMX_BOOL bEnable;		/**< Mono-to-Stereo Creator enable */
380 	OMX_BOOL bDetector;		/**< Stereo detector status */
381 } OMX_DAK_CONFIG_M2STYPE;
382 
383 /** Dolby Audio Kernel Sound Space Expander */
384 typedef struct OMX_DAK_CONFIG_SSETYPE {
385 	OMX_U32 nSize;			/**< size of the structure in bytes */
386 	OMX_VERSIONTYPE nVersion;	/**< OMX specification version information */
387 	OMX_BOOL bEnable;		/**< Sound Space Expander enable */
388 	OMX_U8 nWidth;			/**< Width of expansion effect */
389 	OMX_U8 nSpkMode;		/**< Speaker Mode */
390 } OMX_DAK_CONFIG_SSETYPE;
391 
392 /** Dolby Audio Kernel Sound Level Controller */
393 typedef struct OMX_DAK_CONFIG_SLCTYPE {
394 	OMX_U32 nSize;			/**< size of the structure in bytes */
395 	OMX_VERSIONTYPE nVersion;	/**< OMX specification version information */
396 	OMX_BOOL bEnable;		/**< Sound Level Controller enable */
397 	OMX_U8 nLevel;			/**< Source audio RMS level */
398 	OMX_U8 nDepth;			/**< Depth of effect */
399 } OMX_DAK_CONFIG_SLCTYPE;
400 
401 /** Dolby Audio Kernel Volume */
402 typedef struct OMX_DAK_CONFIG_VOLTYPE {
403 	OMX_U32 nSize;			/**< size of the structure in bytes */
404 	OMX_VERSIONTYPE nVersion;	/**< OMX specification version information */
405 	OMX_BOOL bEnable;		/**< Volume enable */
406 	OMX_U8 nGainType;		/**< Linear/Logarithmic audio scaling */
407 	OMX_U8 nInternalGain;		/**< Audio volume scale */
408 	OMX_U8 nExternalGain;		/**< Audio volume scale applied by external volume control */
409 	OMX_S8 nBalance;		/**< L/R panning for output audio */
410 	OMX_BOOL bMute;			/**< Audio Mute */
411 } OMX_DAK_CONFIG_VOLTYPE;
412 
413 /** Dolby Audio Kernel Natural Bass */
414 typedef struct OMX_DAK_CONFIG_NBTYPE {
415 	OMX_U32 nSize;			/**< size of the structure in bytes */
416 	OMX_VERSIONTYPE nVersion;	/**< OMX specification version information */
417 	OMX_BOOL bEnable;		/**< Natural Bass enable */
418 	OMX_U8 nCutoff;			/**< Speakers/headphones lower cutoff frequency */
419 	OMX_U8 nBoost;			/**< Strength of effect */
420 	OMX_U8 nLevel;			/**< Maximum output level capability of speakers/headphones */
421 } OMX_DAK_CONFIG_NBTYPE;
422 
423 /** Dolby Audio Kernel Graphic EQ */
424 typedef struct OMX_DAK_CONFIG_GEQTYPE {
425 	OMX_U32 nSize;			/**< size of the structure in bytes */
426 	OMX_VERSIONTYPE nVersion;	/**< OMX specification version information */
427 	OMX_BOOL bEnable;		/**< Graphic EQ enable */
428 	OMX_U8 nNbands;			/**< Number of frequency bands */
429 	OMX_S8 nPreamp;			/**< Global attenuation to apply prior to band level adjustment */
430 	OMX_U8 nMaxboost;		/**< Maximum absolute boost with respect to the source audio */
431 	OMX_S8 nBand1;			/**< Boost/cut for 1st frequency band */
432 	OMX_S8 nBand2;			/**< Boost/cut for 2nd frequency band */
433 	OMX_S8 nBand3;			/**< Boost/cut for 3rd frequency band */
434 	OMX_S8 nBand4;			/**< Boost/cut for 4th frequency band */
435 	OMX_S8 nBand5;			/**< Boost/cut for 5th frequency band */
436 	OMX_S8 nBand6;			/**< Boost/cut for 6th frequency band */
437 	OMX_S8 nBand7;			/**< Boost/cut for 7th frequency band */
438 } OMX_DAK_CONFIG_GEQTYPE;
439 
440 /** Dolby Audio Kernel, Mobile Surround and Surround Upmixer */
441 typedef struct OMX_DAK_CONFIG_MSRTYPE {
442 	OMX_U32 nSize;			/**< size of the structure in bytes */
443 	OMX_VERSIONTYPE nVersion;	/**< OMX specification version information */
444 	OMX_BOOL bMsrEnable;		/**< Mobile Surround enable */
445 	OMX_U8 nMsrRoom;		/**< Room Size control */
446 	OMX_U8 nMsrBright;		/**< Brightness control */
447 	OMX_BOOL bMupEnable;		/**< Mobile Surround Upmixer enable */
448 } OMX_DAK_CONFIG_MSRTYPE;
449 
450 /** Dolby Audio Kernel High Frequency Enhancer */
451 typedef struct OMX_DAK_CONFIG_HFETYPE {
452 	OMX_U32 nSize;			/**< size of the structure in bytes */
453 	OMX_VERSIONTYPE nVersion;	/**< OMX specification version information */
454 	OMX_BOOL bEnable;		/**< High Frequency Enhancer enable */
455 	OMX_U8 nDepth;			/**< Strength of effect */
456 } OMX_DAK_CONFIG_HFETYPE;
457 
458 /** Dolby Audio Kernel Fade */
459 typedef struct OMX_DAK_CONFIG_FADETYPE {
460 	OMX_U32 nSize;			/**< size of the structure in bytes */
461 	OMX_VERSIONTYPE nVersion;	/**< OMX specification version information */
462 	OMX_BOOL bEnable;		/**< Fade enable */
463 	OMX_U8 nTarget;			/**< Target fade level */
464 	OMX_U16 nTime;			/**< Fade time interval */
465 } OMX_DAK_CONFIG_FADETYPE;
466 
467 /** Dolby Audio Kernel Speaker EQ */
468 typedef struct OMX_DAK_CONFIG_SEQTYPE {
469 	OMX_U32 nSize;			/**< size of the structure in bytes */
470 	OMX_VERSIONTYPE nVersion;	/**< OMX specification version information */
471 	OMX_BOOL bEnable;		/**< Speaker EQ enable */
472 	OMX_S8 nLeftGainDB;		/**< Additional gain for Left channel */
473 	OMX_S8 nRightGainDB;		/**< Additional gain for Right channel */
474 	OMX_U8 nCoef48000Size;		/**< Length of the block of coefficients for 48KHz Sampling Rate case */
475 	OMX_PTR pCoef48000;		/**< Pointer to the block of coefficients for the 48KHz case */
476 	OMX_U8 nCoef44100Size;		/**< Length of the block of coefficients for 44.1KHz Sampling Rate case */
477 	OMX_PTR pCoef44100;		/**< Pointer to the block of coefficients for the 44.1KHz case */
478 	OMX_U8 nCoef32000Size;		/**< Length of the block of coefficients for 32KHz Sampling Rate case */
479 	OMX_PTR pCoef32000;		/**< Pointer to the block of coefficients for the 32KHz case */
480 	OMX_U8 nCoef24000Size;		/**< Length of the block of coefficients for 24KHz Sampling Rate case */
481 	OMX_PTR pCoef24000;		/**< Pointer to the block of coefficients for the 24KHz case */
482 
483 } OMX_DAK_CONFIG_SEQTYPE;
484 
485 
486 typedef enum OMX_AUDIO_CHANNELTYPE_EXTENSION {
487     OMX_AUDIO_ChannelTS = OMX_AUDIO_ChannelVendorStartUnused,    /**< Top Surround */
488     OMX_AUDIO_ChannelCVH    /**< Central Vertical Height */
489 } OMX_AUDIO_CHANNELTYPE_EXTENSION;
490 
491 /**
492  * DUAL-MONO type
493  *
494  *  STRUCT MEMBERS:
495  *  nSize               : Size of the structure in bytes
496  *  nVersion            : OMX specification version information
497  *  nPortIndex          : Port that this structure applies to
498  *  eChannelConfig      : Enum for channel config
499  *
500  */
501 typedef struct QOMX_AUDIO_CONFIG_DUALMONOTYPE {
502    OMX_U32 nSize;
503    OMX_VERSIONTYPE nVersion;
504    OMX_U32 nPortIndex;
505    OMX_AUDIO_DUAL_MONO_CHANNEL_CONFIG eChannelConfig;
506 } QOMX_AUDIO_CONFIG_DUALMONOTYPE;
507 
508 #if defined( __cplusplus )
509 }
510 #endif /* end of macro __cplusplus */
511 
512 #endif /* end of macro __H_QOMX_AUDIOEXTENSIONS_H__ */
513