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 __COMPRESS_OFFLOAD_H 20 #define __COMPRESS_OFFLOAD_H 21 #include <linux/types.h> 22 #include <sound/asound.h> 23 24 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 25 #include <sound/compress_params.h> 26 #define SNDRV_COMPRESS_VERSION SNDRV_PROTOCOL_VERSION(0, 1, 1) 27 struct snd_compressed_buffer { 28 __u32 fragment_size; 29 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 30 __u32 fragments; 31 }; 32 struct snd_compr_params { 33 struct snd_compressed_buffer buffer; 34 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 35 struct snd_codec codec; 36 __u8 no_wake_mode; 37 }; 38 struct snd_compr_tstamp { 39 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 40 __u32 byte_offset; 41 __u32 copied_total; 42 snd_pcm_uframes_t pcm_frames; 43 snd_pcm_uframes_t pcm_io_frames; 44 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 45 __u32 sampling_rate; 46 uint64_t timestamp; 47 }; 48 struct snd_compr_avail { 49 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 50 __u64 avail; 51 struct snd_compr_tstamp tstamp; 52 }; 53 enum snd_compr_direction { 54 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 55 SND_COMPRESS_PLAYBACK = 0, 56 SND_COMPRESS_CAPTURE 57 }; 58 struct snd_compr_caps { 59 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 60 __u32 num_codecs; 61 __u32 direction; 62 __u32 min_fragment_size; 63 __u32 max_fragment_size; 64 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 65 __u32 min_fragments; 66 __u32 max_fragments; 67 __u32 codecs[MAX_NUM_CODECS]; 68 __u32 reserved[11]; 69 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 70 }; 71 struct snd_compr_codec_caps { 72 __u32 codec; 73 __u32 num_descriptors; 74 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 75 struct snd_codec_desc descriptor[MAX_NUM_CODEC_DESCRIPTORS]; 76 }; 77 enum { 78 SNDRV_COMPRESS_ENCODER_PADDING = 1, 79 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 80 SNDRV_COMPRESS_ENCODER_DELAY = 2, 81 }; 82 struct snd_compr_metadata { 83 __u32 key; 84 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 85 __u32 value[8]; 86 }; 87 struct snd_compr_audio_info { 88 uint32_t frame_size; 89 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 90 uint32_t reserved[15]; 91 }; 92 #define SNDRV_COMPRESS_IOCTL_VERSION _IOR('C', 0x00, int) 93 #define SNDRV_COMPRESS_GET_CAPS _IOWR('C', 0x10, struct snd_compr_caps) 94 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 95 #define SNDRV_COMPRESS_GET_CODEC_CAPS _IOWR('C', 0x11, struct snd_compr_codec_caps) 96 #define SNDRV_COMPRESS_SET_PARAMS _IOW('C', 0x12, struct snd_compr_params) 97 #define SNDRV_COMPRESS_GET_PARAMS _IOR('C', 0x13, struct snd_codec) 98 #define SNDRV_COMPRESS_SET_METADATA _IOW('C', 0x14, struct snd_compr_metadata) 99 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 100 #define SNDRV_COMPRESS_GET_METADATA _IOWR('C', 0x15, struct snd_compr_metadata) 101 #define SNDRV_COMPRESS_TSTAMP _IOR('C', 0x20, struct snd_compr_tstamp) 102 #define SNDRV_COMPRESS_AVAIL _IOR('C', 0x21, struct snd_compr_avail) 103 #define SNDRV_COMPRESS_PAUSE _IO('C', 0x30) 104 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 105 #define SNDRV_COMPRESS_RESUME _IO('C', 0x31) 106 #define SNDRV_COMPRESS_START _IO('C', 0x32) 107 #define SNDRV_COMPRESS_STOP _IO('C', 0x33) 108 #define SNDRV_COMPRESS_DRAIN _IO('C', 0x34) 109 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 110 #define SNDRV_COMPRESS_NEXT_TRACK _IO('C', 0x35) 111 #define SNDRV_COMPRESS_PARTIAL_DRAIN _IO('C', 0x36) 112 #define SND_COMPR_TRIGGER_DRAIN 7 113 #define SND_COMPR_TRIGGER_NEXT_TRACK 8 114 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 115 #define SND_COMPR_TRIGGER_PARTIAL_DRAIN 9 116 #endif 117