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