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 _UAPI__M2M1SHOT_H_ 20 #define _UAPI__M2M1SHOT_H_ 21 #include <linux/ioctl.h> 22 #include <linux/types.h> 23 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 24 #include <linux/videodev2.h> 25 #define M2M1SHOT_MAX_PLANES 3 26 struct m2m1shot_rect { 27 __s16 left; 28 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 29 __s16 top; 30 __u16 width; 31 __u16 height; 32 }; 33 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 34 struct m2m1shot_pix_format { 35 __u32 fmt; 36 __u32 width; 37 __u32 height; 38 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 39 struct v4l2_rect crop; 40 }; 41 enum m2m1shot_buffer_type { 42 M2M1SHOT_BUFFER_NONE, 43 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 44 M2M1SHOT_BUFFER_DMABUF, 45 M2M1SHOT_BUFFER_USERPTR, 46 }; 47 struct m2m1shot_buffer_plane { 48 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 49 union { 50 __s32 fd; 51 unsigned long userptr; 52 }; 53 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 54 size_t len; 55 }; 56 struct m2m1shot_buffer { 57 struct m2m1shot_buffer_plane plane[M2M1SHOT_MAX_PLANES]; 58 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 59 __u8 type; 60 __u8 num_planes; 61 }; 62 #define M2M1SHOT_OP_FLIP_VIRT (1 << 0) 63 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 64 #define M2M1SHOT_OP_FLIP_HORI (1 << 1) 65 #define M2M1SHOT_OP_CSC_WIDE (1 << 8) 66 #define M2M1SHOT_OP_CSC_NARROW (1 << 9) 67 #define M2M1SHOT_OP_CSC_601 (1 << 10) 68 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 69 #define M2M1SHOT_OP_CSC_709 (1 << 11) 70 #define M2M1SHOT_OP_PREMULTIPLIED_ALPHA (1 << 16) 71 #define M2M1SHOT_OP_DITHERING (1 << 17) 72 struct m2m1shot_operation { 73 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 74 __s16 quality_level; 75 __s16 rotate; 76 __u32 op; 77 }; 78 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 79 struct m2m1shot { 80 struct m2m1shot_pix_format fmt_out; 81 struct m2m1shot_pix_format fmt_cap; 82 struct m2m1shot_buffer buf_out; 83 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 84 struct m2m1shot_buffer buf_cap; 85 struct m2m1shot_operation op; 86 unsigned long reserved[2]; 87 }; 88 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 89 struct m2m1shot_custom_data { 90 unsigned int cmd; 91 unsigned long arg; 92 }; 93 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 94 #define M2M1SHOT_IOC_PROCESS _IOWR('M', 0, struct m2m1shot) 95 #define M2M1SHOT_IOC_CUSTOM _IOWR('M', 16, struct m2m1shot_custom_data) 96 #endif 97