blob: 800f8f987fa01f72d89d819a030e049aac9a1908 [file] [log] [blame]
Elliott Hughes180edef2023-11-02 00:08:05 +00001/*
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 */
Ben Cheng655a7c02013-10-16 16:09:24 -07007#ifndef __SND_COMPRESS_PARAMS_H
8#define __SND_COMPRESS_PARAMS_H
9#include <linux/types.h>
10#define MAX_NUM_CODECS 32
Ben Cheng655a7c02013-10-16 16:09:24 -070011#define MAX_NUM_CODEC_DESCRIPTORS 32
12#define MAX_NUM_BITRATES 32
Christopher Ferris38062f92014-07-09 15:33:25 -070013#define MAX_NUM_SAMPLE_RATES 32
Ben Cheng655a7c02013-10-16 16:09:24 -070014#define SND_AUDIOCODEC_PCM ((__u32) 0x00000001)
Christopher Ferris38062f92014-07-09 15:33:25 -070015#define SND_AUDIOCODEC_MP3 ((__u32) 0x00000002)
Ben Cheng655a7c02013-10-16 16:09:24 -070016#define SND_AUDIOCODEC_AMR ((__u32) 0x00000003)
17#define SND_AUDIOCODEC_AMRWB ((__u32) 0x00000004)
18#define SND_AUDIOCODEC_AMRWBPLUS ((__u32) 0x00000005)
Christopher Ferris38062f92014-07-09 15:33:25 -070019#define SND_AUDIOCODEC_AAC ((__u32) 0x00000006)
Ben Cheng655a7c02013-10-16 16:09:24 -070020#define SND_AUDIOCODEC_WMA ((__u32) 0x00000007)
21#define SND_AUDIOCODEC_REAL ((__u32) 0x00000008)
22#define SND_AUDIOCODEC_VORBIS ((__u32) 0x00000009)
Christopher Ferris38062f92014-07-09 15:33:25 -070023#define SND_AUDIOCODEC_FLAC ((__u32) 0x0000000A)
Ben Cheng655a7c02013-10-16 16:09:24 -070024#define SND_AUDIOCODEC_IEC61937 ((__u32) 0x0000000B)
25#define SND_AUDIOCODEC_G723_1 ((__u32) 0x0000000C)
26#define SND_AUDIOCODEC_G729 ((__u32) 0x0000000D)
Christopher Ferris106b3a82016-08-24 12:15:38 -070027#define SND_AUDIOCODEC_BESPOKE ((__u32) 0x0000000E)
Christopher Ferrisaf09c702020-06-01 20:29:29 -070028#define SND_AUDIOCODEC_ALAC ((__u32) 0x0000000F)
29#define SND_AUDIOCODEC_APE ((__u32) 0x00000010)
30#define SND_AUDIOCODEC_MAX SND_AUDIOCODEC_APE
Ben Cheng655a7c02013-10-16 16:09:24 -070031#define SND_AUDIOPROFILE_PCM ((__u32) 0x00000001)
32#define SND_AUDIOCHANMODE_MP3_MONO ((__u32) 0x00000001)
Christopher Ferris106b3a82016-08-24 12:15:38 -070033#define SND_AUDIOCHANMODE_MP3_STEREO ((__u32) 0x00000002)
Christopher Ferris38062f92014-07-09 15:33:25 -070034#define SND_AUDIOCHANMODE_MP3_JOINTSTEREO ((__u32) 0x00000004)
Ben Cheng655a7c02013-10-16 16:09:24 -070035#define SND_AUDIOCHANMODE_MP3_DUAL ((__u32) 0x00000008)
36#define SND_AUDIOPROFILE_AMR ((__u32) 0x00000001)
Christopher Ferris106b3a82016-08-24 12:15:38 -070037#define SND_AUDIOMODE_AMR_DTX_OFF ((__u32) 0x00000001)
Christopher Ferris38062f92014-07-09 15:33:25 -070038#define SND_AUDIOMODE_AMR_VAD1 ((__u32) 0x00000002)
Ben Cheng655a7c02013-10-16 16:09:24 -070039#define SND_AUDIOMODE_AMR_VAD2 ((__u32) 0x00000004)
40#define SND_AUDIOSTREAMFORMAT_UNDEFINED ((__u32) 0x00000000)
Christopher Ferris106b3a82016-08-24 12:15:38 -070041#define SND_AUDIOSTREAMFORMAT_CONFORMANCE ((__u32) 0x00000001)
Christopher Ferris38062f92014-07-09 15:33:25 -070042#define SND_AUDIOSTREAMFORMAT_IF1 ((__u32) 0x00000002)
Ben Cheng655a7c02013-10-16 16:09:24 -070043#define SND_AUDIOSTREAMFORMAT_IF2 ((__u32) 0x00000004)
44#define SND_AUDIOSTREAMFORMAT_FSF ((__u32) 0x00000008)
Christopher Ferris106b3a82016-08-24 12:15:38 -070045#define SND_AUDIOSTREAMFORMAT_RTPPAYLOAD ((__u32) 0x00000010)
Christopher Ferris38062f92014-07-09 15:33:25 -070046#define SND_AUDIOSTREAMFORMAT_ITU ((__u32) 0x00000020)
Ben Cheng655a7c02013-10-16 16:09:24 -070047#define SND_AUDIOPROFILE_AMRWB ((__u32) 0x00000001)
48#define SND_AUDIOMODE_AMRWB_DTX_OFF ((__u32) 0x00000001)
Christopher Ferris106b3a82016-08-24 12:15:38 -070049#define SND_AUDIOMODE_AMRWB_VAD1 ((__u32) 0x00000002)
Christopher Ferris38062f92014-07-09 15:33:25 -070050#define SND_AUDIOMODE_AMRWB_VAD2 ((__u32) 0x00000004)
Ben Cheng655a7c02013-10-16 16:09:24 -070051#define SND_AUDIOPROFILE_AMRWBPLUS ((__u32) 0x00000001)
52#define SND_AUDIOPROFILE_AAC ((__u32) 0x00000001)
Christopher Ferris106b3a82016-08-24 12:15:38 -070053#define SND_AUDIOMODE_AAC_MAIN ((__u32) 0x00000001)
Christopher Ferris38062f92014-07-09 15:33:25 -070054#define SND_AUDIOMODE_AAC_LC ((__u32) 0x00000002)
Ben Cheng655a7c02013-10-16 16:09:24 -070055#define SND_AUDIOMODE_AAC_SSR ((__u32) 0x00000004)
56#define SND_AUDIOMODE_AAC_LTP ((__u32) 0x00000008)
Christopher Ferris106b3a82016-08-24 12:15:38 -070057#define SND_AUDIOMODE_AAC_HE ((__u32) 0x00000010)
Christopher Ferris38062f92014-07-09 15:33:25 -070058#define SND_AUDIOMODE_AAC_SCALABLE ((__u32) 0x00000020)
Ben Cheng655a7c02013-10-16 16:09:24 -070059#define SND_AUDIOMODE_AAC_ERLC ((__u32) 0x00000040)
60#define SND_AUDIOMODE_AAC_LD ((__u32) 0x00000080)
Christopher Ferris106b3a82016-08-24 12:15:38 -070061#define SND_AUDIOMODE_AAC_HE_PS ((__u32) 0x00000100)
Christopher Ferris38062f92014-07-09 15:33:25 -070062#define SND_AUDIOMODE_AAC_HE_MPS ((__u32) 0x00000200)
Ben Cheng655a7c02013-10-16 16:09:24 -070063#define SND_AUDIOSTREAMFORMAT_MP2ADTS ((__u32) 0x00000001)
64#define SND_AUDIOSTREAMFORMAT_MP4ADTS ((__u32) 0x00000002)
Christopher Ferris106b3a82016-08-24 12:15:38 -070065#define SND_AUDIOSTREAMFORMAT_MP4LOAS ((__u32) 0x00000004)
Christopher Ferris38062f92014-07-09 15:33:25 -070066#define SND_AUDIOSTREAMFORMAT_MP4LATM ((__u32) 0x00000008)
Ben Cheng655a7c02013-10-16 16:09:24 -070067#define SND_AUDIOSTREAMFORMAT_ADIF ((__u32) 0x00000010)
68#define SND_AUDIOSTREAMFORMAT_MP4FF ((__u32) 0x00000020)
Christopher Ferris106b3a82016-08-24 12:15:38 -070069#define SND_AUDIOSTREAMFORMAT_RAW ((__u32) 0x00000040)
Christopher Ferris38062f92014-07-09 15:33:25 -070070#define SND_AUDIOPROFILE_WMA7 ((__u32) 0x00000001)
Ben Cheng655a7c02013-10-16 16:09:24 -070071#define SND_AUDIOPROFILE_WMA8 ((__u32) 0x00000002)
72#define SND_AUDIOPROFILE_WMA9 ((__u32) 0x00000004)
Christopher Ferris106b3a82016-08-24 12:15:38 -070073#define SND_AUDIOPROFILE_WMA10 ((__u32) 0x00000008)
Christopher Ferrisaf09c702020-06-01 20:29:29 -070074#define SND_AUDIOPROFILE_WMA9_PRO ((__u32) 0x00000010)
75#define SND_AUDIOPROFILE_WMA9_LOSSLESS ((__u32) 0x00000020)
76#define SND_AUDIOPROFILE_WMA10_LOSSLESS ((__u32) 0x00000040)
Christopher Ferris38062f92014-07-09 15:33:25 -070077#define SND_AUDIOMODE_WMA_LEVEL1 ((__u32) 0x00000001)
Ben Cheng655a7c02013-10-16 16:09:24 -070078#define SND_AUDIOMODE_WMA_LEVEL2 ((__u32) 0x00000002)
79#define SND_AUDIOMODE_WMA_LEVEL3 ((__u32) 0x00000004)
Christopher Ferris106b3a82016-08-24 12:15:38 -070080#define SND_AUDIOMODE_WMA_LEVEL4 ((__u32) 0x00000008)
Christopher Ferris38062f92014-07-09 15:33:25 -070081#define SND_AUDIOMODE_WMAPRO_LEVELM0 ((__u32) 0x00000010)
Ben Cheng655a7c02013-10-16 16:09:24 -070082#define SND_AUDIOMODE_WMAPRO_LEVELM1 ((__u32) 0x00000020)
83#define SND_AUDIOMODE_WMAPRO_LEVELM2 ((__u32) 0x00000040)
Christopher Ferris106b3a82016-08-24 12:15:38 -070084#define SND_AUDIOMODE_WMAPRO_LEVELM3 ((__u32) 0x00000080)
Christopher Ferris38062f92014-07-09 15:33:25 -070085#define SND_AUDIOSTREAMFORMAT_WMA_ASF ((__u32) 0x00000001)
Ben Cheng655a7c02013-10-16 16:09:24 -070086#define SND_AUDIOSTREAMFORMAT_WMA_NOASF_HDR ((__u32) 0x00000002)
87#define SND_AUDIOPROFILE_REALAUDIO ((__u32) 0x00000001)
Christopher Ferris106b3a82016-08-24 12:15:38 -070088#define SND_AUDIOMODE_REALAUDIO_G2 ((__u32) 0x00000001)
Christopher Ferris38062f92014-07-09 15:33:25 -070089#define SND_AUDIOMODE_REALAUDIO_8 ((__u32) 0x00000002)
Ben Cheng655a7c02013-10-16 16:09:24 -070090#define SND_AUDIOMODE_REALAUDIO_10 ((__u32) 0x00000004)
91#define SND_AUDIOMODE_REALAUDIO_SURROUND ((__u32) 0x00000008)
Christopher Ferris106b3a82016-08-24 12:15:38 -070092#define SND_AUDIOPROFILE_VORBIS ((__u32) 0x00000001)
Christopher Ferris38062f92014-07-09 15:33:25 -070093#define SND_AUDIOMODE_VORBIS ((__u32) 0x00000001)
Ben Cheng655a7c02013-10-16 16:09:24 -070094#define SND_AUDIOPROFILE_FLAC ((__u32) 0x00000001)
95#define SND_AUDIOMODE_FLAC_LEVEL0 ((__u32) 0x00000001)
Christopher Ferris106b3a82016-08-24 12:15:38 -070096#define SND_AUDIOMODE_FLAC_LEVEL1 ((__u32) 0x00000002)
Christopher Ferris38062f92014-07-09 15:33:25 -070097#define SND_AUDIOMODE_FLAC_LEVEL2 ((__u32) 0x00000004)
Ben Cheng655a7c02013-10-16 16:09:24 -070098#define SND_AUDIOMODE_FLAC_LEVEL3 ((__u32) 0x00000008)
99#define SND_AUDIOMODE_FLAC_LEVEL4 ((__u32) 0x00000010)
Christopher Ferris106b3a82016-08-24 12:15:38 -0700100#define SND_AUDIOMODE_FLAC_LEVEL5 ((__u32) 0x00000020)
Christopher Ferris38062f92014-07-09 15:33:25 -0700101#define SND_AUDIOMODE_FLAC_LEVEL6 ((__u32) 0x00000040)
Ben Cheng655a7c02013-10-16 16:09:24 -0700102#define SND_AUDIOMODE_FLAC_LEVEL7 ((__u32) 0x00000080)
103#define SND_AUDIOMODE_FLAC_LEVEL8 ((__u32) 0x00000100)
Christopher Ferris106b3a82016-08-24 12:15:38 -0700104#define SND_AUDIOSTREAMFORMAT_FLAC ((__u32) 0x00000001)
Christopher Ferris38062f92014-07-09 15:33:25 -0700105#define SND_AUDIOSTREAMFORMAT_FLAC_OGG ((__u32) 0x00000002)
Ben Cheng655a7c02013-10-16 16:09:24 -0700106#define SND_AUDIOPROFILE_IEC61937 ((__u32) 0x00000001)
107#define SND_AUDIOPROFILE_IEC61937_SPDIF ((__u32) 0x00000002)
Christopher Ferris106b3a82016-08-24 12:15:38 -0700108#define SND_AUDIOMODE_IEC_REF_STREAM_HEADER ((__u32) 0x00000000)
Christopher Ferris38062f92014-07-09 15:33:25 -0700109#define SND_AUDIOMODE_IEC_LPCM ((__u32) 0x00000001)
Ben Cheng655a7c02013-10-16 16:09:24 -0700110#define SND_AUDIOMODE_IEC_AC3 ((__u32) 0x00000002)
111#define SND_AUDIOMODE_IEC_MPEG1 ((__u32) 0x00000004)
Christopher Ferris106b3a82016-08-24 12:15:38 -0700112#define SND_AUDIOMODE_IEC_MP3 ((__u32) 0x00000008)
Christopher Ferris38062f92014-07-09 15:33:25 -0700113#define SND_AUDIOMODE_IEC_MPEG2 ((__u32) 0x00000010)
Ben Cheng655a7c02013-10-16 16:09:24 -0700114#define SND_AUDIOMODE_IEC_AACLC ((__u32) 0x00000020)
115#define SND_AUDIOMODE_IEC_DTS ((__u32) 0x00000040)
Christopher Ferris106b3a82016-08-24 12:15:38 -0700116#define SND_AUDIOMODE_IEC_ATRAC ((__u32) 0x00000080)
Christopher Ferris38062f92014-07-09 15:33:25 -0700117#define SND_AUDIOMODE_IEC_SACD ((__u32) 0x00000100)
Ben Cheng655a7c02013-10-16 16:09:24 -0700118#define SND_AUDIOMODE_IEC_EAC3 ((__u32) 0x00000200)
119#define SND_AUDIOMODE_IEC_DTS_HD ((__u32) 0x00000400)
Christopher Ferris106b3a82016-08-24 12:15:38 -0700120#define SND_AUDIOMODE_IEC_MLP ((__u32) 0x00000800)
Christopher Ferris38062f92014-07-09 15:33:25 -0700121#define SND_AUDIOMODE_IEC_DST ((__u32) 0x00001000)
Ben Cheng655a7c02013-10-16 16:09:24 -0700122#define SND_AUDIOMODE_IEC_WMAPRO ((__u32) 0x00002000)
123#define SND_AUDIOMODE_IEC_REF_CXT ((__u32) 0x00004000)
Christopher Ferris106b3a82016-08-24 12:15:38 -0700124#define SND_AUDIOMODE_IEC_HE_AAC ((__u32) 0x00008000)
Christopher Ferris38062f92014-07-09 15:33:25 -0700125#define SND_AUDIOMODE_IEC_HE_AAC2 ((__u32) 0x00010000)
Ben Cheng655a7c02013-10-16 16:09:24 -0700126#define SND_AUDIOMODE_IEC_MPEG_SURROUND ((__u32) 0x00020000)
127#define SND_AUDIOPROFILE_G723_1 ((__u32) 0x00000001)
Christopher Ferris106b3a82016-08-24 12:15:38 -0700128#define SND_AUDIOMODE_G723_1_ANNEX_A ((__u32) 0x00000001)
Christopher Ferris38062f92014-07-09 15:33:25 -0700129#define SND_AUDIOMODE_G723_1_ANNEX_B ((__u32) 0x00000002)
Ben Cheng655a7c02013-10-16 16:09:24 -0700130#define SND_AUDIOMODE_G723_1_ANNEX_C ((__u32) 0x00000004)
131#define SND_AUDIOPROFILE_G729 ((__u32) 0x00000001)
Christopher Ferris106b3a82016-08-24 12:15:38 -0700132#define SND_AUDIOMODE_G729_ANNEX_A ((__u32) 0x00000001)
Christopher Ferris38062f92014-07-09 15:33:25 -0700133#define SND_AUDIOMODE_G729_ANNEX_B ((__u32) 0x00000002)
Ben Cheng655a7c02013-10-16 16:09:24 -0700134#define SND_RATECONTROLMODE_CONSTANTBITRATE ((__u32) 0x00000001)
135#define SND_RATECONTROLMODE_VARIABLEBITRATE ((__u32) 0x00000002)
Christopher Ferris106b3a82016-08-24 12:15:38 -0700136struct snd_enc_wma {
Tao Baod7db5942015-01-28 10:07:51 -0800137 __u32 super_block_align;
Ben Cheng655a7c02013-10-16 16:09:24 -0700138};
139struct snd_enc_vorbis {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700140 __s32 quality;
Tao Baod7db5942015-01-28 10:07:51 -0800141 __u32 managed;
142 __u32 max_bit_rate;
143 __u32 min_bit_rate;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700144 __u32 downmix;
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700145} __attribute__((packed, aligned(4)));
Ben Cheng655a7c02013-10-16 16:09:24 -0700146struct snd_enc_real {
Tao Baod7db5942015-01-28 10:07:51 -0800147 __u32 quant_bits;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700148 __u32 start_region;
Tao Baod7db5942015-01-28 10:07:51 -0800149 __u32 num_regions;
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700150} __attribute__((packed, aligned(4)));
Ben Cheng655a7c02013-10-16 16:09:24 -0700151struct snd_enc_flac {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700152 __u32 num;
Tao Baod7db5942015-01-28 10:07:51 -0800153 __u32 gain;
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700154} __attribute__((packed, aligned(4)));
Ben Cheng655a7c02013-10-16 16:09:24 -0700155struct snd_enc_generic {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700156 __u32 bw;
Tao Baod7db5942015-01-28 10:07:51 -0800157 __s32 reserved[15];
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700158} __attribute__((packed, aligned(4)));
Christopher Ferrisd32ca142020-02-04 16:16:51 -0800159struct 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)));
Christopher Ferrisaf09c702020-06-01 20:29:29 -0700167struct 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)));
173struct 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)));
182struct 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)));
Ben Cheng655a7c02013-10-16 16:09:24 -0700191union snd_codec_options {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700192 struct snd_enc_wma wma;
Tao Baod7db5942015-01-28 10:07:51 -0800193 struct snd_enc_vorbis vorbis;
194 struct snd_enc_real real;
195 struct snd_enc_flac flac;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700196 struct snd_enc_generic generic;
Christopher Ferrisd32ca142020-02-04 16:16:51 -0800197 struct snd_dec_flac flac_d;
Christopher Ferrisaf09c702020-06-01 20:29:29 -0700198 struct snd_dec_wma wma_d;
199 struct snd_dec_alac alac_d;
200 struct snd_dec_ape ape_d;
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700201} __attribute__((packed, aligned(4)));
Ben Cheng655a7c02013-10-16 16:09:24 -0700202struct snd_codec_desc {
Tao Baod7db5942015-01-28 10:07:51 -0800203 __u32 max_ch;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700204 __u32 sample_rates[MAX_NUM_SAMPLE_RATES];
Tao Baod7db5942015-01-28 10:07:51 -0800205 __u32 num_sample_rates;
206 __u32 bit_rate[MAX_NUM_BITRATES];
207 __u32 num_bitrates;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700208 __u32 rate_control;
Tao Baod7db5942015-01-28 10:07:51 -0800209 __u32 profiles;
210 __u32 modes;
211 __u32 formats;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700212 __u32 min_buffer;
Tao Baod7db5942015-01-28 10:07:51 -0800213 __u32 reserved[15];
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700214} __attribute__((packed, aligned(4)));
Ben Cheng655a7c02013-10-16 16:09:24 -0700215struct snd_codec {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700216 __u32 id;
Tao Baod7db5942015-01-28 10:07:51 -0800217 __u32 ch_in;
218 __u32 ch_out;
219 __u32 sample_rate;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700220 __u32 bit_rate;
Tao Baod7db5942015-01-28 10:07:51 -0800221 __u32 rate_control;
222 __u32 profile;
223 __u32 level;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700224 __u32 ch_mode;
Tao Baod7db5942015-01-28 10:07:51 -0800225 __u32 format;
226 __u32 align;
227 union snd_codec_options options;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700228 __u32 reserved[3];
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700229} __attribute__((packed, aligned(4)));
Ben Cheng655a7c02013-10-16 16:09:24 -0700230#endif