0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036
0037
0038
0039
0040
0041
0042
0043
0044
0045
0046
0047
0048
0049
0050
0051
0052 #ifndef __SND_COMPRESS_PARAMS_H
0053 #define __SND_COMPRESS_PARAMS_H
0054
0055 #include <linux/types.h>
0056
0057
0058 #define MAX_NUM_CODECS 32
0059 #define MAX_NUM_CODEC_DESCRIPTORS 32
0060 #define MAX_NUM_BITRATES 32
0061 #define MAX_NUM_SAMPLE_RATES 32
0062
0063
0064 #define SND_AUDIOCODEC_PCM ((__u32) 0x00000001)
0065 #define SND_AUDIOCODEC_MP3 ((__u32) 0x00000002)
0066 #define SND_AUDIOCODEC_AMR ((__u32) 0x00000003)
0067 #define SND_AUDIOCODEC_AMRWB ((__u32) 0x00000004)
0068 #define SND_AUDIOCODEC_AMRWBPLUS ((__u32) 0x00000005)
0069 #define SND_AUDIOCODEC_AAC ((__u32) 0x00000006)
0070 #define SND_AUDIOCODEC_WMA ((__u32) 0x00000007)
0071 #define SND_AUDIOCODEC_REAL ((__u32) 0x00000008)
0072 #define SND_AUDIOCODEC_VORBIS ((__u32) 0x00000009)
0073 #define SND_AUDIOCODEC_FLAC ((__u32) 0x0000000A)
0074 #define SND_AUDIOCODEC_IEC61937 ((__u32) 0x0000000B)
0075 #define SND_AUDIOCODEC_G723_1 ((__u32) 0x0000000C)
0076 #define SND_AUDIOCODEC_G729 ((__u32) 0x0000000D)
0077 #define SND_AUDIOCODEC_BESPOKE ((__u32) 0x0000000E)
0078 #define SND_AUDIOCODEC_ALAC ((__u32) 0x0000000F)
0079 #define SND_AUDIOCODEC_APE ((__u32) 0x00000010)
0080 #define SND_AUDIOCODEC_MAX SND_AUDIOCODEC_APE
0081
0082
0083
0084
0085
0086
0087
0088 #define SND_AUDIOPROFILE_PCM ((__u32) 0x00000001)
0089
0090
0091 #define SND_AUDIOCHANMODE_MP3_MONO ((__u32) 0x00000001)
0092 #define SND_AUDIOCHANMODE_MP3_STEREO ((__u32) 0x00000002)
0093 #define SND_AUDIOCHANMODE_MP3_JOINTSTEREO ((__u32) 0x00000004)
0094 #define SND_AUDIOCHANMODE_MP3_DUAL ((__u32) 0x00000008)
0095
0096 #define SND_AUDIOPROFILE_AMR ((__u32) 0x00000001)
0097
0098
0099 #define SND_AUDIOMODE_AMR_DTX_OFF ((__u32) 0x00000001)
0100 #define SND_AUDIOMODE_AMR_VAD1 ((__u32) 0x00000002)
0101 #define SND_AUDIOMODE_AMR_VAD2 ((__u32) 0x00000004)
0102
0103 #define SND_AUDIOSTREAMFORMAT_UNDEFINED ((__u32) 0x00000000)
0104 #define SND_AUDIOSTREAMFORMAT_CONFORMANCE ((__u32) 0x00000001)
0105 #define SND_AUDIOSTREAMFORMAT_IF1 ((__u32) 0x00000002)
0106 #define SND_AUDIOSTREAMFORMAT_IF2 ((__u32) 0x00000004)
0107 #define SND_AUDIOSTREAMFORMAT_FSF ((__u32) 0x00000008)
0108 #define SND_AUDIOSTREAMFORMAT_RTPPAYLOAD ((__u32) 0x00000010)
0109 #define SND_AUDIOSTREAMFORMAT_ITU ((__u32) 0x00000020)
0110
0111 #define SND_AUDIOPROFILE_AMRWB ((__u32) 0x00000001)
0112
0113
0114 #define SND_AUDIOMODE_AMRWB_DTX_OFF ((__u32) 0x00000001)
0115 #define SND_AUDIOMODE_AMRWB_VAD1 ((__u32) 0x00000002)
0116 #define SND_AUDIOMODE_AMRWB_VAD2 ((__u32) 0x00000004)
0117
0118 #define SND_AUDIOPROFILE_AMRWBPLUS ((__u32) 0x00000001)
0119
0120 #define SND_AUDIOPROFILE_AAC ((__u32) 0x00000001)
0121
0122
0123 #define SND_AUDIOMODE_AAC_MAIN ((__u32) 0x00000001)
0124 #define SND_AUDIOMODE_AAC_LC ((__u32) 0x00000002)
0125 #define SND_AUDIOMODE_AAC_SSR ((__u32) 0x00000004)
0126 #define SND_AUDIOMODE_AAC_LTP ((__u32) 0x00000008)
0127 #define SND_AUDIOMODE_AAC_HE ((__u32) 0x00000010)
0128 #define SND_AUDIOMODE_AAC_SCALABLE ((__u32) 0x00000020)
0129 #define SND_AUDIOMODE_AAC_ERLC ((__u32) 0x00000040)
0130 #define SND_AUDIOMODE_AAC_LD ((__u32) 0x00000080)
0131 #define SND_AUDIOMODE_AAC_HE_PS ((__u32) 0x00000100)
0132 #define SND_AUDIOMODE_AAC_HE_MPS ((__u32) 0x00000200)
0133
0134
0135 #define SND_AUDIOSTREAMFORMAT_MP2ADTS ((__u32) 0x00000001)
0136 #define SND_AUDIOSTREAMFORMAT_MP4ADTS ((__u32) 0x00000002)
0137 #define SND_AUDIOSTREAMFORMAT_MP4LOAS ((__u32) 0x00000004)
0138 #define SND_AUDIOSTREAMFORMAT_MP4LATM ((__u32) 0x00000008)
0139 #define SND_AUDIOSTREAMFORMAT_ADIF ((__u32) 0x00000010)
0140 #define SND_AUDIOSTREAMFORMAT_MP4FF ((__u32) 0x00000020)
0141 #define SND_AUDIOSTREAMFORMAT_RAW ((__u32) 0x00000040)
0142
0143 #define SND_AUDIOPROFILE_WMA7 ((__u32) 0x00000001)
0144 #define SND_AUDIOPROFILE_WMA8 ((__u32) 0x00000002)
0145 #define SND_AUDIOPROFILE_WMA9 ((__u32) 0x00000004)
0146 #define SND_AUDIOPROFILE_WMA10 ((__u32) 0x00000008)
0147 #define SND_AUDIOPROFILE_WMA9_PRO ((__u32) 0x00000010)
0148 #define SND_AUDIOPROFILE_WMA9_LOSSLESS ((__u32) 0x00000020)
0149 #define SND_AUDIOPROFILE_WMA10_LOSSLESS ((__u32) 0x00000040)
0150
0151 #define SND_AUDIOMODE_WMA_LEVEL1 ((__u32) 0x00000001)
0152 #define SND_AUDIOMODE_WMA_LEVEL2 ((__u32) 0x00000002)
0153 #define SND_AUDIOMODE_WMA_LEVEL3 ((__u32) 0x00000004)
0154 #define SND_AUDIOMODE_WMA_LEVEL4 ((__u32) 0x00000008)
0155 #define SND_AUDIOMODE_WMAPRO_LEVELM0 ((__u32) 0x00000010)
0156 #define SND_AUDIOMODE_WMAPRO_LEVELM1 ((__u32) 0x00000020)
0157 #define SND_AUDIOMODE_WMAPRO_LEVELM2 ((__u32) 0x00000040)
0158 #define SND_AUDIOMODE_WMAPRO_LEVELM3 ((__u32) 0x00000080)
0159
0160 #define SND_AUDIOSTREAMFORMAT_WMA_ASF ((__u32) 0x00000001)
0161
0162
0163
0164
0165 #define SND_AUDIOSTREAMFORMAT_WMA_NOASF_HDR ((__u32) 0x00000002)
0166
0167 #define SND_AUDIOPROFILE_REALAUDIO ((__u32) 0x00000001)
0168
0169 #define SND_AUDIOMODE_REALAUDIO_G2 ((__u32) 0x00000001)
0170 #define SND_AUDIOMODE_REALAUDIO_8 ((__u32) 0x00000002)
0171 #define SND_AUDIOMODE_REALAUDIO_10 ((__u32) 0x00000004)
0172 #define SND_AUDIOMODE_REALAUDIO_SURROUND ((__u32) 0x00000008)
0173
0174 #define SND_AUDIOPROFILE_VORBIS ((__u32) 0x00000001)
0175
0176 #define SND_AUDIOMODE_VORBIS ((__u32) 0x00000001)
0177
0178 #define SND_AUDIOPROFILE_FLAC ((__u32) 0x00000001)
0179
0180
0181
0182
0183
0184 #define SND_AUDIOMODE_FLAC_LEVEL0 ((__u32) 0x00000001)
0185 #define SND_AUDIOMODE_FLAC_LEVEL1 ((__u32) 0x00000002)
0186 #define SND_AUDIOMODE_FLAC_LEVEL2 ((__u32) 0x00000004)
0187 #define SND_AUDIOMODE_FLAC_LEVEL3 ((__u32) 0x00000008)
0188 #define SND_AUDIOMODE_FLAC_LEVEL4 ((__u32) 0x00000010)
0189 #define SND_AUDIOMODE_FLAC_LEVEL5 ((__u32) 0x00000020)
0190 #define SND_AUDIOMODE_FLAC_LEVEL6 ((__u32) 0x00000040)
0191 #define SND_AUDIOMODE_FLAC_LEVEL7 ((__u32) 0x00000080)
0192 #define SND_AUDIOMODE_FLAC_LEVEL8 ((__u32) 0x00000100)
0193
0194 #define SND_AUDIOSTREAMFORMAT_FLAC ((__u32) 0x00000001)
0195 #define SND_AUDIOSTREAMFORMAT_FLAC_OGG ((__u32) 0x00000002)
0196
0197
0198 #define SND_AUDIOPROFILE_IEC61937 ((__u32) 0x00000001)
0199
0200 #define SND_AUDIOPROFILE_IEC61937_SPDIF ((__u32) 0x00000002)
0201
0202
0203
0204
0205
0206
0207 #define SND_AUDIOMODE_IEC_REF_STREAM_HEADER ((__u32) 0x00000000)
0208 #define SND_AUDIOMODE_IEC_LPCM ((__u32) 0x00000001)
0209 #define SND_AUDIOMODE_IEC_AC3 ((__u32) 0x00000002)
0210 #define SND_AUDIOMODE_IEC_MPEG1 ((__u32) 0x00000004)
0211 #define SND_AUDIOMODE_IEC_MP3 ((__u32) 0x00000008)
0212 #define SND_AUDIOMODE_IEC_MPEG2 ((__u32) 0x00000010)
0213 #define SND_AUDIOMODE_IEC_AACLC ((__u32) 0x00000020)
0214 #define SND_AUDIOMODE_IEC_DTS ((__u32) 0x00000040)
0215 #define SND_AUDIOMODE_IEC_ATRAC ((__u32) 0x00000080)
0216 #define SND_AUDIOMODE_IEC_SACD ((__u32) 0x00000100)
0217 #define SND_AUDIOMODE_IEC_EAC3 ((__u32) 0x00000200)
0218 #define SND_AUDIOMODE_IEC_DTS_HD ((__u32) 0x00000400)
0219 #define SND_AUDIOMODE_IEC_MLP ((__u32) 0x00000800)
0220 #define SND_AUDIOMODE_IEC_DST ((__u32) 0x00001000)
0221 #define SND_AUDIOMODE_IEC_WMAPRO ((__u32) 0x00002000)
0222 #define SND_AUDIOMODE_IEC_REF_CXT ((__u32) 0x00004000)
0223 #define SND_AUDIOMODE_IEC_HE_AAC ((__u32) 0x00008000)
0224 #define SND_AUDIOMODE_IEC_HE_AAC2 ((__u32) 0x00010000)
0225 #define SND_AUDIOMODE_IEC_MPEG_SURROUND ((__u32) 0x00020000)
0226
0227 #define SND_AUDIOPROFILE_G723_1 ((__u32) 0x00000001)
0228
0229 #define SND_AUDIOMODE_G723_1_ANNEX_A ((__u32) 0x00000001)
0230 #define SND_AUDIOMODE_G723_1_ANNEX_B ((__u32) 0x00000002)
0231 #define SND_AUDIOMODE_G723_1_ANNEX_C ((__u32) 0x00000004)
0232
0233 #define SND_AUDIOPROFILE_G729 ((__u32) 0x00000001)
0234
0235 #define SND_AUDIOMODE_G729_ANNEX_A ((__u32) 0x00000001)
0236 #define SND_AUDIOMODE_G729_ANNEX_B ((__u32) 0x00000002)
0237
0238
0239
0240
0241
0242 #define SND_RATECONTROLMODE_CONSTANTBITRATE ((__u32) 0x00000001)
0243 #define SND_RATECONTROLMODE_VARIABLEBITRATE ((__u32) 0x00000002)
0244
0245
0246
0247 struct snd_enc_wma {
0248 __u32 super_block_align;
0249 };
0250
0251
0252
0253
0254
0255
0256
0257
0258
0259
0260
0261
0262
0263
0264
0265
0266
0267
0268
0269
0270
0271
0272 struct snd_enc_vorbis {
0273 __s32 quality;
0274 __u32 managed;
0275 __u32 max_bit_rate;
0276 __u32 min_bit_rate;
0277 __u32 downmix;
0278 } __attribute__((packed, aligned(4)));
0279
0280
0281
0282
0283
0284
0285
0286
0287
0288
0289
0290 struct snd_enc_real {
0291 __u32 quant_bits;
0292 __u32 start_region;
0293 __u32 num_regions;
0294 } __attribute__((packed, aligned(4)));
0295
0296
0297
0298
0299
0300
0301
0302
0303
0304
0305
0306
0307
0308
0309
0310
0311
0312
0313
0314
0315 struct snd_enc_flac {
0316 __u32 num;
0317 __u32 gain;
0318 } __attribute__((packed, aligned(4)));
0319
0320 struct snd_enc_generic {
0321 __u32 bw;
0322 __s32 reserved[15];
0323 } __attribute__((packed, aligned(4)));
0324
0325 struct snd_dec_flac {
0326 __u16 sample_size;
0327 __u16 min_blk_size;
0328 __u16 max_blk_size;
0329 __u16 min_frame_size;
0330 __u16 max_frame_size;
0331 __u16 reserved;
0332 } __attribute__((packed, aligned(4)));
0333
0334 struct snd_dec_wma {
0335 __u32 encoder_option;
0336 __u32 adv_encoder_option;
0337 __u32 adv_encoder_option2;
0338 __u32 reserved;
0339 } __attribute__((packed, aligned(4)));
0340
0341 struct snd_dec_alac {
0342 __u32 frame_length;
0343 __u8 compatible_version;
0344 __u8 pb;
0345 __u8 mb;
0346 __u8 kb;
0347 __u32 max_run;
0348 __u32 max_frame_bytes;
0349 } __attribute__((packed, aligned(4)));
0350
0351 struct snd_dec_ape {
0352 __u16 compatible_version;
0353 __u16 compression_level;
0354 __u32 format_flags;
0355 __u32 blocks_per_frame;
0356 __u32 final_frame_blocks;
0357 __u32 total_frames;
0358 __u32 seek_table_present;
0359 } __attribute__((packed, aligned(4)));
0360
0361 union snd_codec_options {
0362 struct snd_enc_wma wma;
0363 struct snd_enc_vorbis vorbis;
0364 struct snd_enc_real real;
0365 struct snd_enc_flac flac;
0366 struct snd_enc_generic generic;
0367 struct snd_dec_flac flac_d;
0368 struct snd_dec_wma wma_d;
0369 struct snd_dec_alac alac_d;
0370 struct snd_dec_ape ape_d;
0371 } __attribute__((packed, aligned(4)));
0372
0373
0374
0375
0376
0377
0378
0379
0380
0381
0382
0383
0384
0385
0386
0387
0388
0389
0390
0391
0392
0393
0394
0395
0396 struct snd_codec_desc {
0397 __u32 max_ch;
0398 __u32 sample_rates[MAX_NUM_SAMPLE_RATES];
0399 __u32 num_sample_rates;
0400 __u32 bit_rate[MAX_NUM_BITRATES];
0401 __u32 num_bitrates;
0402 __u32 rate_control;
0403 __u32 profiles;
0404 __u32 modes;
0405 __u32 formats;
0406 __u32 min_buffer;
0407 __u32 reserved[15];
0408 } __attribute__((packed, aligned(4)));
0409
0410
0411
0412
0413
0414
0415
0416
0417
0418
0419
0420
0421
0422
0423
0424
0425
0426
0427
0428
0429
0430
0431
0432
0433
0434
0435 struct snd_codec {
0436 __u32 id;
0437 __u32 ch_in;
0438 __u32 ch_out;
0439 __u32 sample_rate;
0440 __u32 bit_rate;
0441 __u32 rate_control;
0442 __u32 profile;
0443 __u32 level;
0444 __u32 ch_mode;
0445 __u32 format;
0446 __u32 align;
0447 union snd_codec_options options;
0448 __u32 reserved[3];
0449 } __attribute__((packed, aligned(4)));
0450
0451 #endif