1 /**************************************************************************** 2 **************************************************************************** 3 *** 4 *** This header was automatically generated from a Linux kernel header 5 *** of the same name, to make information necessary for userspace to 6 *** call into the kernel available to libc. It contains only constants, 7 *** structures, and macros generated from the original header, and thus, 8 *** contains no copyrightable information. 9 *** 10 *** To edit the content of this header, modify the corresponding 11 *** source file (e.g. under external/kernel-headers/original/) then 12 *** run bionic/libc/kernel/tools/update_all.py 13 *** 14 *** Any manual change here will be lost the next time this script will 15 *** be run. You've been warned! 16 *** 17 **************************************************************************** 18 ****************************************************************************/ 19 #ifndef __SND_COMPRESS_PARAMS_H 20 #define __SND_COMPRESS_PARAMS_H 21 #include <linux/types.h> 22 #define SND_DEC_DDP_MAX_PARAMS 18 23 #define MAX_PCM_DECODE_CHANNELS 32 24 #define MAX_NUM_CODECS 32 25 #define MAX_NUM_CODEC_DESCRIPTORS 32 26 #define MAX_NUM_BITRATES 32 27 #define MAX_NUM_SAMPLE_RATES 32 28 #define MAX_NUM_FRAMES_PER_BUFFER 1 29 #define COMPRESSED_META_DATA_MODE 0x10 30 #define META_DATA_LEN_BYTES 36 31 #define Q6_AC3_DECODER 0x00010BF6 32 #define Q6_EAC3_DECODER 0x00010C3C 33 #define Q6_DTS 0x00010D88 34 #define Q6_DTS_LBR 0x00010DBB 35 #define COMPRESSED_TIMESTAMP_FLAG 0x0001 36 #define COMPRESSED_PERF_MODE_FLAG 0x0002 37 #define SND_AUDIOCODEC_PCM ((__u32) 0x00000001) 38 #define SND_AUDIOCODEC_MP3 ((__u32) 0x00000002) 39 #define SND_AUDIOCODEC_AMR ((__u32) 0x00000003) 40 #define SND_AUDIOCODEC_AMRWB ((__u32) 0x00000004) 41 #define SND_AUDIOCODEC_AMRWBPLUS ((__u32) 0x00000005) 42 #define SND_AUDIOCODEC_AAC ((__u32) 0x00000006) 43 #define SND_AUDIOCODEC_WMA ((__u32) 0x00000007) 44 #define SND_AUDIOCODEC_REAL ((__u32) 0x00000008) 45 #define SND_AUDIOCODEC_VORBIS ((__u32) 0x00000009) 46 #define SND_AUDIOCODEC_FLAC ((__u32) 0x0000000A) 47 #define SND_AUDIOCODEC_IEC61937 ((__u32) 0x0000000B) 48 #define SND_AUDIOCODEC_G723_1 ((__u32) 0x0000000C) 49 #define SND_AUDIOCODEC_G729 ((__u32) 0x0000000D) 50 #define SND_AUDIOCODEC_BESPOKE ((__u32) 0x0000000E) 51 #define SND_AUDIOCODEC_DTS_PASS_THROUGH ((__u32) 0x0000000F) 52 #define SND_AUDIOCODEC_DTS_LBR ((__u32) 0x00000010) 53 #define SND_AUDIOCODEC_DTS_TRANSCODE_LOOPBACK ((__u32) 0x00000011) 54 #define SND_AUDIOCODEC_PASS_THROUGH ((__u32) 0x00000012) 55 #define SND_AUDIOCODEC_MP2 ((__u32) 0x00000013) 56 #define SND_AUDIOCODEC_DTS_LBR_PASS_THROUGH ((__u32) 0x00000014) 57 #define SND_AUDIOCODEC_AC3 ((__u32) 0x00000015) 58 #define SND_AUDIOCODEC_AC3_PASS_THROUGH ((__u32) 0x00000016) 59 #define SND_AUDIOCODEC_WMA_PRO ((__u32) 0x00000017) 60 #define SND_AUDIOCODEC_DTS ((__u32) 0x00000018) 61 #define SND_AUDIOCODEC_EAC3 ((__u32) 0x00000019) 62 #define SND_AUDIOCODEC_ALAC ((__u32) 0x00000020) 63 #define SND_AUDIOCODEC_APE ((__u32) 0x00000021) 64 #define SND_AUDIOCODEC_DSD ((__u32) 0x00000022) 65 #define SND_AUDIOCODEC_APTX ((__u32) 0x00000023) 66 #define SND_AUDIOCODEC_TRUEHD ((__u32) 0x00000024) 67 #define SND_AUDIOCODEC_MAT ((__u32) 0x00000025) 68 #define SND_AUDIOCODEC_THD ((__u32) 0x00000026) 69 #define SND_AUDIOCODEC_MAX SND_AUDIOCODEC_THD 70 #define SND_AUDIOPROFILE_PCM ((__u32) 0x00000001) 71 #define SND_AUDIOCHANMODE_MP3_MONO ((__u32) 0x00000001) 72 #define SND_AUDIOCHANMODE_MP3_STEREO ((__u32) 0x00000002) 73 #define SND_AUDIOCHANMODE_MP3_JOINTSTEREO ((__u32) 0x00000004) 74 #define SND_AUDIOCHANMODE_MP3_DUAL ((__u32) 0x00000008) 75 #define SND_AUDIOPROFILE_AMR ((__u32) 0x00000001) 76 #define SND_AUDIOMODE_AMR_DTX_OFF ((__u32) 0x00000001) 77 #define SND_AUDIOMODE_AMR_VAD1 ((__u32) 0x00000002) 78 #define SND_AUDIOMODE_AMR_VAD2 ((__u32) 0x00000004) 79 #define SND_AUDIOSTREAMFORMAT_UNDEFINED ((__u32) 0x00000000) 80 #define SND_AUDIOSTREAMFORMAT_CONFORMANCE ((__u32) 0x00000001) 81 #define SND_AUDIOSTREAMFORMAT_IF1 ((__u32) 0x00000002) 82 #define SND_AUDIOSTREAMFORMAT_IF2 ((__u32) 0x00000004) 83 #define SND_AUDIOSTREAMFORMAT_FSF ((__u32) 0x00000008) 84 #define SND_AUDIOSTREAMFORMAT_RTPPAYLOAD ((__u32) 0x00000010) 85 #define SND_AUDIOSTREAMFORMAT_ITU ((__u32) 0x00000020) 86 #define SND_AUDIOPROFILE_AMRWB ((__u32) 0x00000001) 87 #define SND_AUDIOMODE_AMRWB_DTX_OFF ((__u32) 0x00000001) 88 #define SND_AUDIOMODE_AMRWB_VAD1 ((__u32) 0x00000002) 89 #define SND_AUDIOMODE_AMRWB_VAD2 ((__u32) 0x00000004) 90 #define SND_AUDIOPROFILE_AMRWBPLUS ((__u32) 0x00000001) 91 #define SND_AUDIOPROFILE_AAC ((__u32) 0x00000001) 92 #define SND_AUDIOMODE_AAC_MAIN ((__u32) 0x00000001) 93 #define SND_AUDIOMODE_AAC_LC ((__u32) 0x00000002) 94 #define SND_AUDIOMODE_AAC_SSR ((__u32) 0x00000004) 95 #define SND_AUDIOMODE_AAC_LTP ((__u32) 0x00000008) 96 #define SND_AUDIOMODE_AAC_HE ((__u32) 0x00000010) 97 #define SND_AUDIOMODE_AAC_SCALABLE ((__u32) 0x00000020) 98 #define SND_AUDIOMODE_AAC_ERLC ((__u32) 0x00000040) 99 #define SND_AUDIOMODE_AAC_LD ((__u32) 0x00000080) 100 #define SND_AUDIOMODE_AAC_HE_PS ((__u32) 0x00000100) 101 #define SND_AUDIOMODE_AAC_HE_MPS ((__u32) 0x00000200) 102 #define SND_AUDIOSTREAMFORMAT_MP2ADTS ((__u32) 0x00000001) 103 #define SND_AUDIOSTREAMFORMAT_MP4ADTS ((__u32) 0x00000002) 104 #define SND_AUDIOSTREAMFORMAT_MP4LOAS ((__u32) 0x00000004) 105 #define SND_AUDIOSTREAMFORMAT_MP4LATM ((__u32) 0x00000008) 106 #define SND_AUDIOSTREAMFORMAT_ADIF ((__u32) 0x00000010) 107 #define SND_AUDIOSTREAMFORMAT_MP4FF ((__u32) 0x00000020) 108 #define SND_AUDIOSTREAMFORMAT_RAW ((__u32) 0x00000040) 109 #define SND_AUDIOPROFILE_WMA7 ((__u32) 0x00000001) 110 #define SND_AUDIOPROFILE_WMA8 ((__u32) 0x00000002) 111 #define SND_AUDIOPROFILE_WMA9 ((__u32) 0x00000004) 112 #define SND_AUDIOPROFILE_WMA10 ((__u32) 0x00000008) 113 #define SND_AUDIOMODE_WMA_LEVEL1 ((__u32) 0x00000001) 114 #define SND_AUDIOMODE_WMA_LEVEL2 ((__u32) 0x00000002) 115 #define SND_AUDIOMODE_WMA_LEVEL3 ((__u32) 0x00000004) 116 #define SND_AUDIOMODE_WMA_LEVEL4 ((__u32) 0x00000008) 117 #define SND_AUDIOMODE_WMAPRO_LEVELM0 ((__u32) 0x00000010) 118 #define SND_AUDIOMODE_WMAPRO_LEVELM1 ((__u32) 0x00000020) 119 #define SND_AUDIOMODE_WMAPRO_LEVELM2 ((__u32) 0x00000040) 120 #define SND_AUDIOMODE_WMAPRO_LEVELM3 ((__u32) 0x00000080) 121 #define SND_AUDIOSTREAMFORMAT_WMA_ASF ((__u32) 0x00000001) 122 #define SND_AUDIOSTREAMFORMAT_WMA_NOASF_HDR ((__u32) 0x00000002) 123 #define SND_AUDIOPROFILE_REALAUDIO ((__u32) 0x00000001) 124 #define SND_AUDIOMODE_REALAUDIO_G2 ((__u32) 0x00000001) 125 #define SND_AUDIOMODE_REALAUDIO_8 ((__u32) 0x00000002) 126 #define SND_AUDIOMODE_REALAUDIO_10 ((__u32) 0x00000004) 127 #define SND_AUDIOMODE_REALAUDIO_SURROUND ((__u32) 0x00000008) 128 #define SND_AUDIOPROFILE_VORBIS ((__u32) 0x00000001) 129 #define SND_AUDIOMODE_VORBIS ((__u32) 0x00000001) 130 #define SND_AUDIOPROFILE_FLAC ((__u32) 0x00000001) 131 #define SND_AUDIOMODE_FLAC_LEVEL0 ((__u32) 0x00000001) 132 #define SND_AUDIOMODE_FLAC_LEVEL1 ((__u32) 0x00000002) 133 #define SND_AUDIOMODE_FLAC_LEVEL2 ((__u32) 0x00000004) 134 #define SND_AUDIOMODE_FLAC_LEVEL3 ((__u32) 0x00000008) 135 #define SND_AUDIOMODE_FLAC_LEVEL4 ((__u32) 0x00000010) 136 #define SND_AUDIOMODE_FLAC_LEVEL5 ((__u32) 0x00000020) 137 #define SND_AUDIOMODE_FLAC_LEVEL6 ((__u32) 0x00000040) 138 #define SND_AUDIOMODE_FLAC_LEVEL7 ((__u32) 0x00000080) 139 #define SND_AUDIOMODE_FLAC_LEVEL8 ((__u32) 0x00000100) 140 #define SND_AUDIOSTREAMFORMAT_FLAC ((__u32) 0x00000001) 141 #define SND_AUDIOSTREAMFORMAT_FLAC_OGG ((__u32) 0x00000002) 142 #define SND_AUDIOPROFILE_IEC61937 ((__u32) 0x00000001) 143 #define SND_AUDIOPROFILE_IEC61937_SPDIF ((__u32) 0x00000002) 144 #define SND_AUDIOMODE_IEC_REF_STREAM_HEADER ((__u32) 0x00000000) 145 #define SND_AUDIOMODE_IEC_LPCM ((__u32) 0x00000001) 146 #define SND_AUDIOMODE_IEC_AC3 ((__u32) 0x00000002) 147 #define SND_AUDIOMODE_IEC_MPEG1 ((__u32) 0x00000004) 148 #define SND_AUDIOMODE_IEC_MP3 ((__u32) 0x00000008) 149 #define SND_AUDIOMODE_IEC_MPEG2 ((__u32) 0x00000010) 150 #define SND_AUDIOMODE_IEC_AACLC ((__u32) 0x00000020) 151 #define SND_AUDIOMODE_IEC_DTS ((__u32) 0x00000040) 152 #define SND_AUDIOMODE_IEC_ATRAC ((__u32) 0x00000080) 153 #define SND_AUDIOMODE_IEC_SACD ((__u32) 0x00000100) 154 #define SND_AUDIOMODE_IEC_EAC3 ((__u32) 0x00000200) 155 #define SND_AUDIOMODE_IEC_DTS_HD ((__u32) 0x00000400) 156 #define SND_AUDIOMODE_IEC_MLP ((__u32) 0x00000800) 157 #define SND_AUDIOMODE_IEC_DST ((__u32) 0x00001000) 158 #define SND_AUDIOMODE_IEC_WMAPRO ((__u32) 0x00002000) 159 #define SND_AUDIOMODE_IEC_REF_CXT ((__u32) 0x00004000) 160 #define SND_AUDIOMODE_IEC_HE_AAC ((__u32) 0x00008000) 161 #define SND_AUDIOMODE_IEC_HE_AAC2 ((__u32) 0x00010000) 162 #define SND_AUDIOMODE_IEC_MPEG_SURROUND ((__u32) 0x00020000) 163 #define SND_AUDIOPROFILE_G723_1 ((__u32) 0x00000001) 164 #define SND_AUDIOMODE_G723_1_ANNEX_A ((__u32) 0x00000001) 165 #define SND_AUDIOMODE_G723_1_ANNEX_B ((__u32) 0x00000002) 166 #define SND_AUDIOMODE_G723_1_ANNEX_C ((__u32) 0x00000004) 167 #define SND_AUDIOPROFILE_G729 ((__u32) 0x00000001) 168 #define SND_AUDIOMODE_G729_ANNEX_A ((__u32) 0x00000001) 169 #define SND_AUDIOMODE_G729_ANNEX_B ((__u32) 0x00000002) 170 #define SND_RATECONTROLMODE_CONSTANTBITRATE ((__u32) 0x00000001) 171 #define SND_RATECONTROLMODE_VARIABLEBITRATE ((__u32) 0x00000002) 172 struct snd_enc_wma { 173 __u32 super_block_align; 174 __u32 bits_per_sample; 175 __u32 channelmask; 176 __u32 encodeopt; 177 __u32 encodeopt1; 178 __u32 encodeopt2; 179 __u32 avg_bit_rate; 180 }; 181 struct snd_enc_vorbis { 182 __s32 quality; 183 __u32 managed; 184 __u32 max_bit_rate; 185 __u32 min_bit_rate; 186 __u32 downmix; 187 } __attribute__((packed, aligned(4))); 188 struct snd_enc_real { 189 __u32 quant_bits; 190 __u32 start_region; 191 __u32 num_regions; 192 } __attribute__((packed, aligned(4))); 193 struct snd_enc_flac { 194 __u32 num; 195 __u32 gain; 196 } __attribute__((packed, aligned(4))); 197 struct snd_enc_generic { 198 __u32 bw; 199 __s32 reserved[15]; 200 } __attribute__((packed, aligned(4))); 201 struct snd_dec_ddp { 202 __u32 params_length; 203 __u32 params_id[SND_DEC_DDP_MAX_PARAMS]; 204 __u32 params_value[SND_DEC_DDP_MAX_PARAMS]; 205 } __attribute__((packed, aligned(4))); 206 #define SND_DEC_THD_MAX_PARAMS 8 207 struct snd_dec_thd { 208 __u32 params_length; 209 __u32 params_id[SND_DEC_THD_MAX_PARAMS]; 210 __u32 params_value[SND_DEC_THD_MAX_PARAMS]; 211 } __attribute__((packed, aligned(4))); 212 struct snd_dec_flac { 213 __u16 sample_size; 214 __u16 min_blk_size; 215 __u16 max_blk_size; 216 __u16 min_frame_size; 217 __u16 max_frame_size; 218 } __attribute__((packed, aligned(4))); 219 struct snd_dec_vorbis { 220 __u32 bit_stream_fmt; 221 }; 222 struct snd_dec_alac { 223 __u32 frame_length; 224 __u8 compatible_version; 225 __u8 bit_depth; 226 __u8 pb; 227 __u8 mb; 228 __u8 kb; 229 __u8 num_channels; 230 __u16 max_run; 231 __u32 max_frame_bytes; 232 __u32 avg_bit_rate; 233 __u32 sample_rate; 234 __u32 channel_layout_tag; 235 }; 236 struct snd_dec_ape { 237 __u16 compatible_version; 238 __u16 compression_level; 239 __u32 format_flags; 240 __u32 blocks_per_frame; 241 __u32 final_frame_blocks; 242 __u32 total_frames; 243 __u16 bits_per_sample; 244 __u16 num_channels; 245 __u32 sample_rate; 246 __u32 seek_table_present; 247 }; 248 struct snd_dec_aptx { 249 __u32 lap; 250 __u32 uap; 251 __u32 nap; 252 }; 253 struct snd_dec_dsd { 254 __u32 blk_size; 255 }; 256 struct snd_dec_pcm { 257 __u32 num_channels; 258 __u8 ch_map[MAX_PCM_DECODE_CHANNELS]; 259 } __attribute__((packed, aligned(4))); 260 struct snd_dec_amrwb_plus { 261 __u32 bit_stream_fmt; 262 }; 263 union snd_codec_options { 264 struct snd_enc_wma wma; 265 struct snd_enc_vorbis vorbis; 266 struct snd_enc_real real; 267 struct snd_enc_flac flac; 268 struct snd_enc_generic generic; 269 struct snd_dec_ddp ddp; 270 struct snd_dec_flac flac_dec; 271 struct snd_dec_vorbis vorbis_dec; 272 struct snd_dec_alac alac; 273 struct snd_dec_ape ape; 274 struct snd_dec_aptx aptx_dec; 275 struct snd_dec_thd truehd; 276 struct snd_dec_pcm pcm_dec; 277 struct snd_dec_amrwb_plus amrwbplus; 278 struct snd_dec_dsd dsd_dec; 279 }; 280 struct snd_codec_desc { 281 __u32 max_ch; 282 __u32 sample_rates[MAX_NUM_SAMPLE_RATES]; 283 __u32 num_sample_rates; 284 __u32 bit_rate[MAX_NUM_BITRATES]; 285 __u32 num_bitrates; 286 __u32 rate_control; 287 __u32 profiles; 288 __u32 modes; 289 __u32 formats; 290 __u32 min_buffer; 291 __u32 reserved[15]; 292 } __attribute__((packed, aligned(4))); 293 struct snd_codec { 294 __u32 id; 295 __u32 ch_in; 296 __u32 ch_out; 297 __u32 sample_rate; 298 __u32 bit_rate; 299 __u32 rate_control; 300 __u32 profile; 301 __u32 level; 302 __u32 ch_mode; 303 __u32 format; 304 __u32 align; 305 union snd_codec_options options; 306 __u32 compr_passthr; 307 __u32 flags; 308 __u32 reserved[1]; 309 } __attribute__((packed, aligned(4))); 310 struct snd_codec_metadata { 311 __u32 length; 312 __u32 offset; 313 __u64 timestamp; 314 __u32 flags; 315 __u32 reserved[3]; 316 }; 317 #endif 318