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