1 /*
2  * This file is auto-generated. Modifications will be lost.
3  *
4  * See https://android.googlesource.com/platform/bionic/+/master/libc/kernel/
5  * for more information.
6  */
7 #ifndef __SND_COMPRESS_PARAMS_H
8 #define __SND_COMPRESS_PARAMS_H
9 #include <linux/types.h>
10 #define MAX_NUM_CODECS 32
11 #define MAX_NUM_CODEC_DESCRIPTORS 32
12 #define MAX_NUM_BITRATES 32
13 #define MAX_NUM_SAMPLE_RATES 32
14 #define SND_AUDIOCODEC_PCM ((__u32) 0x00000001)
15 #define SND_AUDIOCODEC_MP3 ((__u32) 0x00000002)
16 #define SND_AUDIOCODEC_AMR ((__u32) 0x00000003)
17 #define SND_AUDIOCODEC_AMRWB ((__u32) 0x00000004)
18 #define SND_AUDIOCODEC_AMRWBPLUS ((__u32) 0x00000005)
19 #define SND_AUDIOCODEC_AAC ((__u32) 0x00000006)
20 #define SND_AUDIOCODEC_WMA ((__u32) 0x00000007)
21 #define SND_AUDIOCODEC_REAL ((__u32) 0x00000008)
22 #define SND_AUDIOCODEC_VORBIS ((__u32) 0x00000009)
23 #define SND_AUDIOCODEC_FLAC ((__u32) 0x0000000A)
24 #define SND_AUDIOCODEC_IEC61937 ((__u32) 0x0000000B)
25 #define SND_AUDIOCODEC_G723_1 ((__u32) 0x0000000C)
26 #define SND_AUDIOCODEC_G729 ((__u32) 0x0000000D)
27 #define SND_AUDIOCODEC_BESPOKE ((__u32) 0x0000000E)
28 #define SND_AUDIOCODEC_ALAC ((__u32) 0x0000000F)
29 #define SND_AUDIOCODEC_APE ((__u32) 0x00000010)
30 #define SND_AUDIOCODEC_MAX SND_AUDIOCODEC_APE
31 #define SND_AUDIOPROFILE_PCM ((__u32) 0x00000001)
32 #define SND_AUDIOCHANMODE_MP3_MONO ((__u32) 0x00000001)
33 #define SND_AUDIOCHANMODE_MP3_STEREO ((__u32) 0x00000002)
34 #define SND_AUDIOCHANMODE_MP3_JOINTSTEREO ((__u32) 0x00000004)
35 #define SND_AUDIOCHANMODE_MP3_DUAL ((__u32) 0x00000008)
36 #define SND_AUDIOPROFILE_AMR ((__u32) 0x00000001)
37 #define SND_AUDIOMODE_AMR_DTX_OFF ((__u32) 0x00000001)
38 #define SND_AUDIOMODE_AMR_VAD1 ((__u32) 0x00000002)
39 #define SND_AUDIOMODE_AMR_VAD2 ((__u32) 0x00000004)
40 #define SND_AUDIOSTREAMFORMAT_UNDEFINED ((__u32) 0x00000000)
41 #define SND_AUDIOSTREAMFORMAT_CONFORMANCE ((__u32) 0x00000001)
42 #define SND_AUDIOSTREAMFORMAT_IF1 ((__u32) 0x00000002)
43 #define SND_AUDIOSTREAMFORMAT_IF2 ((__u32) 0x00000004)
44 #define SND_AUDIOSTREAMFORMAT_FSF ((__u32) 0x00000008)
45 #define SND_AUDIOSTREAMFORMAT_RTPPAYLOAD ((__u32) 0x00000010)
46 #define SND_AUDIOSTREAMFORMAT_ITU ((__u32) 0x00000020)
47 #define SND_AUDIOPROFILE_AMRWB ((__u32) 0x00000001)
48 #define SND_AUDIOMODE_AMRWB_DTX_OFF ((__u32) 0x00000001)
49 #define SND_AUDIOMODE_AMRWB_VAD1 ((__u32) 0x00000002)
50 #define SND_AUDIOMODE_AMRWB_VAD2 ((__u32) 0x00000004)
51 #define SND_AUDIOPROFILE_AMRWBPLUS ((__u32) 0x00000001)
52 #define SND_AUDIOPROFILE_AAC ((__u32) 0x00000001)
53 #define SND_AUDIOMODE_AAC_MAIN ((__u32) 0x00000001)
54 #define SND_AUDIOMODE_AAC_LC ((__u32) 0x00000002)
55 #define SND_AUDIOMODE_AAC_SSR ((__u32) 0x00000004)
56 #define SND_AUDIOMODE_AAC_LTP ((__u32) 0x00000008)
57 #define SND_AUDIOMODE_AAC_HE ((__u32) 0x00000010)
58 #define SND_AUDIOMODE_AAC_SCALABLE ((__u32) 0x00000020)
59 #define SND_AUDIOMODE_AAC_ERLC ((__u32) 0x00000040)
60 #define SND_AUDIOMODE_AAC_LD ((__u32) 0x00000080)
61 #define SND_AUDIOMODE_AAC_HE_PS ((__u32) 0x00000100)
62 #define SND_AUDIOMODE_AAC_HE_MPS ((__u32) 0x00000200)
63 #define SND_AUDIOSTREAMFORMAT_MP2ADTS ((__u32) 0x00000001)
64 #define SND_AUDIOSTREAMFORMAT_MP4ADTS ((__u32) 0x00000002)
65 #define SND_AUDIOSTREAMFORMAT_MP4LOAS ((__u32) 0x00000004)
66 #define SND_AUDIOSTREAMFORMAT_MP4LATM ((__u32) 0x00000008)
67 #define SND_AUDIOSTREAMFORMAT_ADIF ((__u32) 0x00000010)
68 #define SND_AUDIOSTREAMFORMAT_MP4FF ((__u32) 0x00000020)
69 #define SND_AUDIOSTREAMFORMAT_RAW ((__u32) 0x00000040)
70 #define SND_AUDIOPROFILE_WMA7 ((__u32) 0x00000001)
71 #define SND_AUDIOPROFILE_WMA8 ((__u32) 0x00000002)
72 #define SND_AUDIOPROFILE_WMA9 ((__u32) 0x00000004)
73 #define SND_AUDIOPROFILE_WMA10 ((__u32) 0x00000008)
74 #define SND_AUDIOPROFILE_WMA9_PRO ((__u32) 0x00000010)
75 #define SND_AUDIOPROFILE_WMA9_LOSSLESS ((__u32) 0x00000020)
76 #define SND_AUDIOPROFILE_WMA10_LOSSLESS ((__u32) 0x00000040)
77 #define SND_AUDIOMODE_WMA_LEVEL1 ((__u32) 0x00000001)
78 #define SND_AUDIOMODE_WMA_LEVEL2 ((__u32) 0x00000002)
79 #define SND_AUDIOMODE_WMA_LEVEL3 ((__u32) 0x00000004)
80 #define SND_AUDIOMODE_WMA_LEVEL4 ((__u32) 0x00000008)
81 #define SND_AUDIOMODE_WMAPRO_LEVELM0 ((__u32) 0x00000010)
82 #define SND_AUDIOMODE_WMAPRO_LEVELM1 ((__u32) 0x00000020)
83 #define SND_AUDIOMODE_WMAPRO_LEVELM2 ((__u32) 0x00000040)
84 #define SND_AUDIOMODE_WMAPRO_LEVELM3 ((__u32) 0x00000080)
85 #define SND_AUDIOSTREAMFORMAT_WMA_ASF ((__u32) 0x00000001)
86 #define SND_AUDIOSTREAMFORMAT_WMA_NOASF_HDR ((__u32) 0x00000002)
87 #define SND_AUDIOPROFILE_REALAUDIO ((__u32) 0x00000001)
88 #define SND_AUDIOMODE_REALAUDIO_G2 ((__u32) 0x00000001)
89 #define SND_AUDIOMODE_REALAUDIO_8 ((__u32) 0x00000002)
90 #define SND_AUDIOMODE_REALAUDIO_10 ((__u32) 0x00000004)
91 #define SND_AUDIOMODE_REALAUDIO_SURROUND ((__u32) 0x00000008)
92 #define SND_AUDIOPROFILE_VORBIS ((__u32) 0x00000001)
93 #define SND_AUDIOMODE_VORBIS ((__u32) 0x00000001)
94 #define SND_AUDIOPROFILE_FLAC ((__u32) 0x00000001)
95 #define SND_AUDIOMODE_FLAC_LEVEL0 ((__u32) 0x00000001)
96 #define SND_AUDIOMODE_FLAC_LEVEL1 ((__u32) 0x00000002)
97 #define SND_AUDIOMODE_FLAC_LEVEL2 ((__u32) 0x00000004)
98 #define SND_AUDIOMODE_FLAC_LEVEL3 ((__u32) 0x00000008)
99 #define SND_AUDIOMODE_FLAC_LEVEL4 ((__u32) 0x00000010)
100 #define SND_AUDIOMODE_FLAC_LEVEL5 ((__u32) 0x00000020)
101 #define SND_AUDIOMODE_FLAC_LEVEL6 ((__u32) 0x00000040)
102 #define SND_AUDIOMODE_FLAC_LEVEL7 ((__u32) 0x00000080)
103 #define SND_AUDIOMODE_FLAC_LEVEL8 ((__u32) 0x00000100)
104 #define SND_AUDIOSTREAMFORMAT_FLAC ((__u32) 0x00000001)
105 #define SND_AUDIOSTREAMFORMAT_FLAC_OGG ((__u32) 0x00000002)
106 #define SND_AUDIOPROFILE_IEC61937 ((__u32) 0x00000001)
107 #define SND_AUDIOPROFILE_IEC61937_SPDIF ((__u32) 0x00000002)
108 #define SND_AUDIOMODE_IEC_REF_STREAM_HEADER ((__u32) 0x00000000)
109 #define SND_AUDIOMODE_IEC_LPCM ((__u32) 0x00000001)
110 #define SND_AUDIOMODE_IEC_AC3 ((__u32) 0x00000002)
111 #define SND_AUDIOMODE_IEC_MPEG1 ((__u32) 0x00000004)
112 #define SND_AUDIOMODE_IEC_MP3 ((__u32) 0x00000008)
113 #define SND_AUDIOMODE_IEC_MPEG2 ((__u32) 0x00000010)
114 #define SND_AUDIOMODE_IEC_AACLC ((__u32) 0x00000020)
115 #define SND_AUDIOMODE_IEC_DTS ((__u32) 0x00000040)
116 #define SND_AUDIOMODE_IEC_ATRAC ((__u32) 0x00000080)
117 #define SND_AUDIOMODE_IEC_SACD ((__u32) 0x00000100)
118 #define SND_AUDIOMODE_IEC_EAC3 ((__u32) 0x00000200)
119 #define SND_AUDIOMODE_IEC_DTS_HD ((__u32) 0x00000400)
120 #define SND_AUDIOMODE_IEC_MLP ((__u32) 0x00000800)
121 #define SND_AUDIOMODE_IEC_DST ((__u32) 0x00001000)
122 #define SND_AUDIOMODE_IEC_WMAPRO ((__u32) 0x00002000)
123 #define SND_AUDIOMODE_IEC_REF_CXT ((__u32) 0x00004000)
124 #define SND_AUDIOMODE_IEC_HE_AAC ((__u32) 0x00008000)
125 #define SND_AUDIOMODE_IEC_HE_AAC2 ((__u32) 0x00010000)
126 #define SND_AUDIOMODE_IEC_MPEG_SURROUND ((__u32) 0x00020000)
127 #define SND_AUDIOPROFILE_G723_1 ((__u32) 0x00000001)
128 #define SND_AUDIOMODE_G723_1_ANNEX_A ((__u32) 0x00000001)
129 #define SND_AUDIOMODE_G723_1_ANNEX_B ((__u32) 0x00000002)
130 #define SND_AUDIOMODE_G723_1_ANNEX_C ((__u32) 0x00000004)
131 #define SND_AUDIOPROFILE_G729 ((__u32) 0x00000001)
132 #define SND_AUDIOMODE_G729_ANNEX_A ((__u32) 0x00000001)
133 #define SND_AUDIOMODE_G729_ANNEX_B ((__u32) 0x00000002)
134 #define SND_RATECONTROLMODE_CONSTANTBITRATE ((__u32) 0x00000001)
135 #define SND_RATECONTROLMODE_VARIABLEBITRATE ((__u32) 0x00000002)
136 struct snd_enc_wma {
137   __u32 super_block_align;
138 };
139 struct snd_enc_vorbis {
140   __s32 quality;
141   __u32 managed;
142   __u32 max_bit_rate;
143   __u32 min_bit_rate;
144   __u32 downmix;
145 } __attribute__((packed, aligned(4)));
146 struct snd_enc_real {
147   __u32 quant_bits;
148   __u32 start_region;
149   __u32 num_regions;
150 } __attribute__((packed, aligned(4)));
151 struct snd_enc_flac {
152   __u32 num;
153   __u32 gain;
154 } __attribute__((packed, aligned(4)));
155 struct snd_enc_generic {
156   __u32 bw;
157   __s32 reserved[15];
158 } __attribute__((packed, aligned(4)));
159 struct snd_dec_flac {
160   __u16 sample_size;
161   __u16 min_blk_size;
162   __u16 max_blk_size;
163   __u16 min_frame_size;
164   __u16 max_frame_size;
165   __u16 reserved;
166 } __attribute__((packed, aligned(4)));
167 struct snd_dec_wma {
168   __u32 encoder_option;
169   __u32 adv_encoder_option;
170   __u32 adv_encoder_option2;
171   __u32 reserved;
172 } __attribute__((packed, aligned(4)));
173 struct snd_dec_alac {
174   __u32 frame_length;
175   __u8 compatible_version;
176   __u8 pb;
177   __u8 mb;
178   __u8 kb;
179   __u32 max_run;
180   __u32 max_frame_bytes;
181 } __attribute__((packed, aligned(4)));
182 struct snd_dec_ape {
183   __u16 compatible_version;
184   __u16 compression_level;
185   __u32 format_flags;
186   __u32 blocks_per_frame;
187   __u32 final_frame_blocks;
188   __u32 total_frames;
189   __u32 seek_table_present;
190 } __attribute__((packed, aligned(4)));
191 union snd_codec_options {
192   struct snd_enc_wma wma;
193   struct snd_enc_vorbis vorbis;
194   struct snd_enc_real real;
195   struct snd_enc_flac flac;
196   struct snd_enc_generic generic;
197   struct snd_dec_flac flac_d;
198   struct snd_dec_wma wma_d;
199   struct snd_dec_alac alac_d;
200   struct snd_dec_ape ape_d;
201 } __attribute__((packed, aligned(4)));
202 struct snd_codec_desc {
203   __u32 max_ch;
204   __u32 sample_rates[MAX_NUM_SAMPLE_RATES];
205   __u32 num_sample_rates;
206   __u32 bit_rate[MAX_NUM_BITRATES];
207   __u32 num_bitrates;
208   __u32 rate_control;
209   __u32 profiles;
210   __u32 modes;
211   __u32 formats;
212   __u32 min_buffer;
213   __u32 reserved[15];
214 } __attribute__((packed, aligned(4)));
215 struct snd_codec {
216   __u32 id;
217   __u32 ch_in;
218   __u32 ch_out;
219   __u32 sample_rate;
220   __u32 bit_rate;
221   __u32 rate_control;
222   __u32 profile;
223   __u32 level;
224   __u32 ch_mode;
225   __u32 format;
226   __u32 align;
227   union snd_codec_options options;
228   __u32 reserved[3];
229 } __attribute__((packed, aligned(4)));
230 #endif
231