OMX_Audio.h 75 KB

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