compress_params.h 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437
  1. /*
  2. * compress_params.h - codec types and parameters for compressed data
  3. * streaming interface
  4. *
  5. * Copyright (C) 2011 Intel Corporation
  6. * Authors: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
  7. * Vinod Koul <vinod.koul@linux.intel.com>
  8. *
  9. * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  10. *
  11. * This program is free software; you can redistribute it and/or modify
  12. * it under the terms of the GNU General Public License as published by
  13. * the Free Software Foundation; version 2 of the License.
  14. *
  15. * This program is distributed in the hope that it will be useful, but
  16. * WITHOUT ANY WARRANTY; without even the implied warranty of
  17. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  18. * General Public License for more details.
  19. *
  20. * You should have received a copy of the GNU General Public License along
  21. * with this program; if not, write to the Free Software Foundation, Inc.,
  22. * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
  23. *
  24. * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  25. *
  26. * The definitions in this file are derived from the OpenMAX AL version 1.1
  27. * and OpenMAX IL v 1.1.2 header files which contain the copyright notice below.
  28. *
  29. * Copyright (c) 2007-2010 The Khronos Group Inc.
  30. *
  31. * Permission is hereby granted, free of charge, to any person obtaining
  32. * a copy of this software and/or associated documentation files (the
  33. * "Materials "), to deal in the Materials without restriction, including
  34. * without limitation the rights to use, copy, modify, merge, publish,
  35. * distribute, sublicense, and/or sell copies of the Materials, and to
  36. * permit persons to whom the Materials are furnished to do so, subject to
  37. * the following conditions:
  38. *
  39. * The above copyright notice and this permission notice shall be included
  40. * in all copies or substantial portions of the Materials.
  41. *
  42. * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  43. * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  44. * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
  45. * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
  46. * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
  47. * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
  48. * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
  49. *
  50. */
  51. #ifndef __SND_COMPRESS_PARAMS_H
  52. #define __SND_COMPRESS_PARAMS_H
  53. /* AUDIO CODECS SUPPORTED */
  54. #define MAX_NUM_CODECS 32
  55. #define MAX_NUM_CODEC_DESCRIPTORS 32
  56. #define MAX_NUM_BITRATES 32
  57. /* compressed TX */
  58. #define MAX_NUM_FRAMES_PER_BUFFER 1
  59. #define COMPRESSED_META_DATA_MODE 0x10
  60. #define META_DATA_LEN_BYTES 36
  61. #define Q6_AC3_DECODER 0x00010BF6
  62. #define Q6_EAC3_DECODER 0x00010C3C
  63. #define Q6_DTS 0x00010D88
  64. #define Q6_DTS_LBR 0x00010DBB
  65. /* Codecs are listed linearly to allow for extensibility */
  66. #define SND_AUDIOCODEC_PCM ((__u32) 0x00000001)
  67. #define SND_AUDIOCODEC_MP3 ((__u32) 0x00000002)
  68. #define SND_AUDIOCODEC_AMR ((__u32) 0x00000003)
  69. #define SND_AUDIOCODEC_AMRWB ((__u32) 0x00000004)
  70. #define SND_AUDIOCODEC_AMRWBPLUS ((__u32) 0x00000005)
  71. #define SND_AUDIOCODEC_AAC ((__u32) 0x00000006)
  72. #define SND_AUDIOCODEC_WMA ((__u32) 0x00000007)
  73. #define SND_AUDIOCODEC_REAL ((__u32) 0x00000008)
  74. #define SND_AUDIOCODEC_VORBIS ((__u32) 0x00000009)
  75. #define SND_AUDIOCODEC_FLAC ((__u32) 0x0000000A)
  76. #define SND_AUDIOCODEC_IEC61937 ((__u32) 0x0000000B)
  77. #define SND_AUDIOCODEC_G723_1 ((__u32) 0x0000000C)
  78. #define SND_AUDIOCODEC_G729 ((__u32) 0x0000000D)
  79. #define SND_AUDIOCODEC_AC3 ((__u32) 0x0000000E)
  80. #define SND_AUDIOCODEC_DTS ((__u32) 0x0000000F)
  81. #define SND_AUDIOCODEC_AC3_PASS_THROUGH ((__u32) 0x00000010)
  82. #define SND_AUDIOCODEC_WMA_PRO ((__u32) 0x00000011)
  83. #define SND_AUDIOCODEC_DTS_PASS_THROUGH ((__u32) 0x00000012)
  84. #define SND_AUDIOCODEC_DTS_LBR ((__u32) 0x00000013)
  85. #define SND_AUDIOCODEC_DTS_TRANSCODE_LOOPBACK ((__u32) 0x00000014)
  86. #define SND_AUDIOCODEC_PASS_THROUGH ((__u32) 0x00000015)
  87. #define SND_AUDIOCODEC_MP2 ((__u32) 0x00000016)
  88. #define SND_AUDIOCODEC_DTS_LBR_PASS_THROUGH ((__u32) 0x00000017)
  89. #define SND_AUDIOCODEC_EAC3 ((__u32) 0x00000018)
  90. #define SND_AUDIOCODEC_MAX SND_AUDIOCODEC_EAC3
  91. /*
  92. * Profile and modes are listed with bit masks. This allows for a
  93. * more compact representation of fields that will not evolve
  94. * (in contrast to the list of codecs)
  95. */
  96. #define SND_AUDIOPROFILE_PCM ((__u32) 0x00000001)
  97. /* MP3 modes are only useful for encoders */
  98. #define SND_AUDIOCHANMODE_MP3_MONO ((__u32) 0x00000001)
  99. #define SND_AUDIOCHANMODE_MP3_STEREO ((__u32) 0x00000002)
  100. #define SND_AUDIOCHANMODE_MP3_JOINTSTEREO ((__u32) 0x00000004)
  101. #define SND_AUDIOCHANMODE_MP3_DUAL ((__u32) 0x00000008)
  102. #define SND_AUDIOPROFILE_AMR ((__u32) 0x00000001)
  103. /* AMR modes are only useful for encoders */
  104. #define SND_AUDIOMODE_AMR_DTX_OFF ((__u32) 0x00000001)
  105. #define SND_AUDIOMODE_AMR_VAD1 ((__u32) 0x00000002)
  106. #define SND_AUDIOMODE_AMR_VAD2 ((__u32) 0x00000004)
  107. #define SND_AUDIOSTREAMFORMAT_UNDEFINED ((__u32) 0x00000000)
  108. #define SND_AUDIOSTREAMFORMAT_CONFORMANCE ((__u32) 0x00000001)
  109. #define SND_AUDIOSTREAMFORMAT_IF1 ((__u32) 0x00000002)
  110. #define SND_AUDIOSTREAMFORMAT_IF2 ((__u32) 0x00000004)
  111. #define SND_AUDIOSTREAMFORMAT_FSF ((__u32) 0x00000008)
  112. #define SND_AUDIOSTREAMFORMAT_RTPPAYLOAD ((__u32) 0x00000010)
  113. #define SND_AUDIOSTREAMFORMAT_ITU ((__u32) 0x00000020)
  114. #define SND_AUDIOPROFILE_AMRWB ((__u32) 0x00000001)
  115. /* AMRWB modes are only useful for encoders */
  116. #define SND_AUDIOMODE_AMRWB_DTX_OFF ((__u32) 0x00000001)
  117. #define SND_AUDIOMODE_AMRWB_VAD1 ((__u32) 0x00000002)
  118. #define SND_AUDIOMODE_AMRWB_VAD2 ((__u32) 0x00000004)
  119. #define SND_AUDIOPROFILE_AMRWBPLUS ((__u32) 0x00000001)
  120. #define SND_AUDIOPROFILE_AAC ((__u32) 0x00000001)
  121. /* AAC modes are required for encoders and decoders */
  122. #define SND_AUDIOMODE_AAC_MAIN ((__u32) 0x00000001)
  123. #define SND_AUDIOMODE_AAC_LC ((__u32) 0x00000002)
  124. #define SND_AUDIOMODE_AAC_SSR ((__u32) 0x00000004)
  125. #define SND_AUDIOMODE_AAC_LTP ((__u32) 0x00000008)
  126. #define SND_AUDIOMODE_AAC_HE ((__u32) 0x00000010)
  127. #define SND_AUDIOMODE_AAC_SCALABLE ((__u32) 0x00000020)
  128. #define SND_AUDIOMODE_AAC_ERLC ((__u32) 0x00000040)
  129. #define SND_AUDIOMODE_AAC_LD ((__u32) 0x00000080)
  130. #define SND_AUDIOMODE_AAC_HE_PS ((__u32) 0x00000100)
  131. #define SND_AUDIOMODE_AAC_HE_MPS ((__u32) 0x00000200)
  132. /* AAC formats are required for encoders and decoders */
  133. #define SND_AUDIOSTREAMFORMAT_MP2ADTS ((__u32) 0x00000001)
  134. #define SND_AUDIOSTREAMFORMAT_MP4ADTS ((__u32) 0x00000002)
  135. #define SND_AUDIOSTREAMFORMAT_MP4LOAS ((__u32) 0x00000004)
  136. #define SND_AUDIOSTREAMFORMAT_MP4LATM ((__u32) 0x00000008)
  137. #define SND_AUDIOSTREAMFORMAT_ADIF ((__u32) 0x00000010)
  138. #define SND_AUDIOSTREAMFORMAT_MP4FF ((__u32) 0x00000020)
  139. #define SND_AUDIOSTREAMFORMAT_RAW ((__u32) 0x00000040)
  140. #define SND_AUDIOPROFILE_WMA7 ((__u32) 0x00000001)
  141. #define SND_AUDIOPROFILE_WMA8 ((__u32) 0x00000002)
  142. #define SND_AUDIOPROFILE_WMA9 ((__u32) 0x00000004)
  143. #define SND_AUDIOPROFILE_WMA10 ((__u32) 0x00000008)
  144. #define SND_AUDIOMODE_WMA_LEVEL1 ((__u32) 0x00000001)
  145. #define SND_AUDIOMODE_WMA_LEVEL2 ((__u32) 0x00000002)
  146. #define SND_AUDIOMODE_WMA_LEVEL3 ((__u32) 0x00000004)
  147. #define SND_AUDIOMODE_WMA_LEVEL4 ((__u32) 0x00000008)
  148. #define SND_AUDIOMODE_WMAPRO_LEVELM0 ((__u32) 0x00000010)
  149. #define SND_AUDIOMODE_WMAPRO_LEVELM1 ((__u32) 0x00000020)
  150. #define SND_AUDIOMODE_WMAPRO_LEVELM2 ((__u32) 0x00000040)
  151. #define SND_AUDIOMODE_WMAPRO_LEVELM3 ((__u32) 0x00000080)
  152. #define SND_AUDIOSTREAMFORMAT_WMA_ASF ((__u32) 0x00000001)
  153. /*
  154. * Some implementations strip the ASF header and only send ASF packets
  155. * to the DSP
  156. */
  157. #define SND_AUDIOSTREAMFORMAT_WMA_NOASF_HDR ((__u32) 0x00000002)
  158. #define SND_AUDIOPROFILE_REALAUDIO ((__u32) 0x00000001)
  159. #define SND_AUDIOMODE_REALAUDIO_G2 ((__u32) 0x00000001)
  160. #define SND_AUDIOMODE_REALAUDIO_8 ((__u32) 0x00000002)
  161. #define SND_AUDIOMODE_REALAUDIO_10 ((__u32) 0x00000004)
  162. #define SND_AUDIOMODE_REALAUDIO_SURROUND ((__u32) 0x00000008)
  163. #define SND_AUDIOPROFILE_VORBIS ((__u32) 0x00000001)
  164. #define SND_AUDIOMODE_VORBIS ((__u32) 0x00000001)
  165. #define SND_AUDIOPROFILE_FLAC ((__u32) 0x00000001)
  166. /*
  167. * Define quality levels for FLAC encoders, from LEVEL0 (fast)
  168. * to LEVEL8 (best)
  169. */
  170. #define SND_AUDIOMODE_FLAC_LEVEL0 ((__u32) 0x00000001)
  171. #define SND_AUDIOMODE_FLAC_LEVEL1 ((__u32) 0x00000002)
  172. #define SND_AUDIOMODE_FLAC_LEVEL2 ((__u32) 0x00000004)
  173. #define SND_AUDIOMODE_FLAC_LEVEL3 ((__u32) 0x00000008)
  174. #define SND_AUDIOMODE_FLAC_LEVEL4 ((__u32) 0x00000010)
  175. #define SND_AUDIOMODE_FLAC_LEVEL5 ((__u32) 0x00000020)
  176. #define SND_AUDIOMODE_FLAC_LEVEL6 ((__u32) 0x00000040)
  177. #define SND_AUDIOMODE_FLAC_LEVEL7 ((__u32) 0x00000080)
  178. #define SND_AUDIOMODE_FLAC_LEVEL8 ((__u32) 0x00000100)
  179. #define SND_AUDIOSTREAMFORMAT_FLAC ((__u32) 0x00000001)
  180. #define SND_AUDIOSTREAMFORMAT_FLAC_OGG ((__u32) 0x00000002)
  181. /* IEC61937 payloads without CUVP and preambles */
  182. #define SND_AUDIOPROFILE_IEC61937 ((__u32) 0x00000001)
  183. /* IEC61937 with S/PDIF preambles+CUVP bits in 32-bit containers */
  184. #define SND_AUDIOPROFILE_IEC61937_SPDIF ((__u32) 0x00000002)
  185. /*
  186. * IEC modes are mandatory for decoders. Format autodetection
  187. * will only happen on the DSP side with mode 0. The PCM mode should
  188. * not be used, the PCM codec should be used instead.
  189. */
  190. #define SND_AUDIOMODE_IEC_REF_STREAM_HEADER ((__u32) 0x00000000)
  191. #define SND_AUDIOMODE_IEC_LPCM ((__u32) 0x00000001)
  192. #define SND_AUDIOMODE_IEC_AC3 ((__u32) 0x00000002)
  193. #define SND_AUDIOMODE_IEC_MPEG1 ((__u32) 0x00000004)
  194. #define SND_AUDIOMODE_IEC_MP3 ((__u32) 0x00000008)
  195. #define SND_AUDIOMODE_IEC_MPEG2 ((__u32) 0x00000010)
  196. #define SND_AUDIOMODE_IEC_AACLC ((__u32) 0x00000020)
  197. #define SND_AUDIOMODE_IEC_DTS ((__u32) 0x00000040)
  198. #define SND_AUDIOMODE_IEC_ATRAC ((__u32) 0x00000080)
  199. #define SND_AUDIOMODE_IEC_SACD ((__u32) 0x00000100)
  200. #define SND_AUDIOMODE_IEC_EAC3 ((__u32) 0x00000200)
  201. #define SND_AUDIOMODE_IEC_DTS_HD ((__u32) 0x00000400)
  202. #define SND_AUDIOMODE_IEC_MLP ((__u32) 0x00000800)
  203. #define SND_AUDIOMODE_IEC_DST ((__u32) 0x00001000)
  204. #define SND_AUDIOMODE_IEC_WMAPRO ((__u32) 0x00002000)
  205. #define SND_AUDIOMODE_IEC_REF_CXT ((__u32) 0x00004000)
  206. #define SND_AUDIOMODE_IEC_HE_AAC ((__u32) 0x00008000)
  207. #define SND_AUDIOMODE_IEC_HE_AAC2 ((__u32) 0x00010000)
  208. #define SND_AUDIOMODE_IEC_MPEG_SURROUND ((__u32) 0x00020000)
  209. #define SND_AUDIOPROFILE_G723_1 ((__u32) 0x00000001)
  210. #define SND_AUDIOMODE_G723_1_ANNEX_A ((__u32) 0x00000001)
  211. #define SND_AUDIOMODE_G723_1_ANNEX_B ((__u32) 0x00000002)
  212. #define SND_AUDIOMODE_G723_1_ANNEX_C ((__u32) 0x00000004)
  213. #define SND_AUDIOPROFILE_G729 ((__u32) 0x00000001)
  214. #define SND_AUDIOMODE_G729_ANNEX_A ((__u32) 0x00000001)
  215. #define SND_AUDIOMODE_G729_ANNEX_B ((__u32) 0x00000002)
  216. /* <FIXME: multichannel encoders aren't supported for now. Would need
  217. an additional definition of channel arrangement> */
  218. /* VBR/CBR definitions */
  219. #define SND_RATECONTROLMODE_CONSTANTBITRATE ((__u32) 0x00000001)
  220. #define SND_RATECONTROLMODE_VARIABLEBITRATE ((__u32) 0x00000002)
  221. /* Encoder options */
  222. struct snd_enc_wma {
  223. __u32 super_block_align; /* WMA Type-specific data */
  224. __u32 bits_per_sample;
  225. __u32 channelmask;
  226. __u32 encodeopt;
  227. __u32 encodeopt1;
  228. __u32 encodeopt2;
  229. };
  230. /**
  231. * struct snd_enc_vorbis
  232. * @quality: Sets encoding quality to n, between -1 (low) and 10 (high).
  233. * In the default mode of operation, the quality level is 3.
  234. * Normal quality range is 0 - 10.
  235. * @managed: Boolean. Set bitrate management mode. This turns off the
  236. * normal VBR encoding, but allows hard or soft bitrate constraints to be
  237. * enforced by the encoder. This mode can be slower, and may also be
  238. * lower quality. It is primarily useful for streaming.
  239. * @max_bit_rate: Enabled only if managed is TRUE
  240. * @min_bit_rate: Enabled only if managed is TRUE
  241. * @downmix: Boolean. Downmix input from stereo to mono (has no effect on
  242. * non-stereo streams). Useful for lower-bitrate encoding.
  243. *
  244. * These options were extracted from the OpenMAX IL spec and Gstreamer vorbisenc
  245. * properties
  246. *
  247. * For best quality users should specify VBR mode and set quality levels.
  248. */
  249. struct snd_enc_vorbis {
  250. __s32 quality;
  251. __u32 managed;
  252. __u32 max_bit_rate;
  253. __u32 min_bit_rate;
  254. __u32 downmix;
  255. };
  256. /**
  257. * struct snd_enc_real
  258. * @quant_bits: number of coupling quantization bits in the stream
  259. * @start_region: coupling start region in the stream
  260. * @num_regions: number of regions value
  261. *
  262. * These options were extracted from the OpenMAX IL spec
  263. */
  264. struct snd_enc_real {
  265. __u32 quant_bits;
  266. __u32 start_region;
  267. __u32 num_regions;
  268. };
  269. /**
  270. * struct snd_enc_flac
  271. * @num: serial number, valid only for OGG formats
  272. * needs to be set by application
  273. * @gain: Add replay gain tags
  274. *
  275. * These options were extracted from the FLAC online documentation
  276. * at http://flac.sourceforge.net/documentation_tools_flac.html
  277. *
  278. * To make the API simpler, it is assumed that the user will select quality
  279. * profiles. Additional options that affect encoding quality and speed can
  280. * be added at a later stage if needed.
  281. *
  282. * By default the Subset format is used by encoders.
  283. *
  284. * TAGS such as pictures, etc, cannot be handled by an offloaded encoder and are
  285. * not supported in this API.
  286. */
  287. struct snd_enc_flac {
  288. __u32 num;
  289. __u32 gain;
  290. };
  291. struct snd_enc_generic {
  292. __u32 bw; /* encoder bandwidth */
  293. __s32 reserved[15];
  294. };
  295. struct snd_dec_dts {
  296. __u32 modelIdLength;
  297. __u8 *modelId;
  298. };
  299. struct snd_dec_ddp {
  300. __u32 params_length;
  301. __u8 *params;
  302. __u32 params_id[18];
  303. __u32 params_value[18];
  304. };
  305. union snd_codec_options {
  306. struct snd_enc_wma wma;
  307. struct snd_enc_vorbis vorbis;
  308. struct snd_enc_real real;
  309. struct snd_enc_flac flac;
  310. struct snd_enc_generic generic;
  311. struct snd_dec_dts dts;
  312. struct snd_dec_ddp ddp;
  313. };
  314. /** struct snd_codec_desc - description of codec capabilities
  315. * @max_ch: Maximum number of audio channels
  316. * @sample_rates: Sampling rates in Hz, use SNDRV_PCM_RATE_xxx for this
  317. * @bit_rate: Indexed array containing supported bit rates
  318. * @num_bitrates: Number of valid values in bit_rate array
  319. * @rate_control: value is specified by SND_RATECONTROLMODE defines.
  320. * @profiles: Supported profiles. See SND_AUDIOPROFILE defines.
  321. * @modes: Supported modes. See SND_AUDIOMODE defines
  322. * @formats: Supported formats. See SND_AUDIOSTREAMFORMAT defines
  323. * @min_buffer: Minimum buffer size handled by codec implementation
  324. * @reserved: reserved for future use
  325. *
  326. * This structure provides a scalar value for profiles, modes and stream
  327. * format fields.
  328. * If an implementation supports multiple combinations, they will be listed as
  329. * codecs with different descriptors, for example there would be 2 descriptors
  330. * for AAC-RAW and AAC-ADTS.
  331. * This entails some redundancy but makes it easier to avoid invalid
  332. * configurations.
  333. *
  334. */
  335. struct snd_codec_desc {
  336. __u32 max_ch;
  337. __u32 sample_rates;
  338. __u32 bit_rate[MAX_NUM_BITRATES];
  339. __u32 num_bitrates;
  340. __u32 rate_control;
  341. __u32 profiles;
  342. __u32 modes;
  343. __u32 formats;
  344. __u32 min_buffer;
  345. __u32 reserved[15];
  346. };
  347. /** struct snd_codec
  348. * @id: Identifies the supported audio encoder/decoder.
  349. * See SND_AUDIOCODEC macros.
  350. * @ch_in: Number of input audio channels
  351. * @ch_out: Number of output channels. In case of contradiction between
  352. * this field and the channelMode field, the channelMode field
  353. * overrides.
  354. * @sample_rate: Audio sample rate of input data
  355. * @bit_rate: Bitrate of encoded data. May be ignored by decoders
  356. * @rate_control: Encoding rate control. See SND_RATECONTROLMODE defines.
  357. * Encoders may rely on profiles for quality levels.
  358. * May be ignored by decoders.
  359. * @profile: Mandatory for encoders, can be mandatory for specific
  360. * decoders as well. See SND_AUDIOPROFILE defines.
  361. * @level: Supported level (Only used by WMA at the moment)
  362. * @ch_mode: Channel mode for encoder. See SND_AUDIOCHANMODE defines
  363. * @format: Format of encoded bistream. Mandatory when defined.
  364. * See SND_AUDIOSTREAMFORMAT defines.
  365. * @align: Block alignment in bytes of an audio sample.
  366. * Only required for PCM or IEC formats.
  367. * @options: encoder-specific settings
  368. * @reserved: reserved for future use
  369. */
  370. struct snd_codec {
  371. __u32 id;
  372. __u32 ch_in;
  373. __u32 ch_out;
  374. __u32 sample_rate;
  375. __u32 bit_rate;
  376. __u32 rate_control;
  377. __u32 profile;
  378. __u32 level;
  379. __u32 ch_mode;
  380. __u32 format;
  381. __u32 align;
  382. __u32 transcode_dts;
  383. struct snd_dec_dts dts;
  384. union snd_codec_options options;
  385. __u32 reserved[3];
  386. };
  387. #endif