| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 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 __LINUX_UVCVIDEO_H_ | 
 | 20 | #define __LINUX_UVCVIDEO_H_ | 
 | 21 | #include <linux/ioctl.h> | 
 | 22 | #include <linux/types.h> | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 23 | #define UVC_CTRL_DATA_TYPE_RAW 0 | 
 | 24 | #define UVC_CTRL_DATA_TYPE_SIGNED 1 | 
 | 25 | #define UVC_CTRL_DATA_TYPE_UNSIGNED 2 | 
 | 26 | #define UVC_CTRL_DATA_TYPE_BOOLEAN 3 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 27 | #define UVC_CTRL_DATA_TYPE_ENUM 4 | 
 | 28 | #define UVC_CTRL_DATA_TYPE_BITMASK 5 | 
 | 29 | #define UVC_CTRL_FLAG_SET_CUR (1 << 0) | 
 | 30 | #define UVC_CTRL_FLAG_GET_CUR (1 << 1) | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 31 | #define UVC_CTRL_FLAG_GET_MIN (1 << 2) | 
 | 32 | #define UVC_CTRL_FLAG_GET_MAX (1 << 3) | 
 | 33 | #define UVC_CTRL_FLAG_GET_RES (1 << 4) | 
 | 34 | #define UVC_CTRL_FLAG_GET_DEF (1 << 5) | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 35 | #define UVC_CTRL_FLAG_RESTORE (1 << 6) | 
 | 36 | #define UVC_CTRL_FLAG_AUTO_UPDATE (1 << 7) | 
| Christopher Ferris | 9ce2884 | 2018-10-25 12:11:39 -0700 | [diff] [blame] | 37 | #define UVC_CTRL_FLAG_ASYNCHRONOUS (1 << 8) | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 38 | #define UVC_CTRL_FLAG_GET_RANGE (UVC_CTRL_FLAG_GET_CUR | UVC_CTRL_FLAG_GET_MIN | UVC_CTRL_FLAG_GET_MAX | UVC_CTRL_FLAG_GET_RES | UVC_CTRL_FLAG_GET_DEF) | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 39 | struct uvc_menu_info { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 40 |   __u32 value; | 
 | 41 |   __u8 name[32]; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 42 | }; | 
 | 43 | struct uvc_xu_control_mapping { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 44 |   __u32 id; | 
 | 45 |   __u8 name[32]; | 
 | 46 |   __u8 entity[16]; | 
 | 47 |   __u8 selector; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 48 |   __u8 size; | 
 | 49 |   __u8 offset; | 
 | 50 |   __u32 v4l2_type; | 
 | 51 |   __u32 data_type; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 52 |   struct uvc_menu_info __user * menu_info; | 
 | 53 |   __u32 menu_count; | 
 | 54 |   __u32 reserved[4]; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 55 | }; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 56 | struct uvc_xu_control_query { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 57 |   __u8 unit; | 
 | 58 |   __u8 selector; | 
 | 59 |   __u8 query; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 60 |   __u16 size; | 
 | 61 |   __u8 __user * data; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 62 | }; | 
 | 63 | #define UVCIOC_CTRL_MAP _IOWR('u', 0x20, struct uvc_xu_control_mapping) | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 64 | #define UVCIOC_CTRL_QUERY _IOWR('u', 0x21, struct uvc_xu_control_query) | 
| Christopher Ferris | 76a1d45 | 2018-06-27 14:12:29 -0700 | [diff] [blame] | 65 | struct uvc_meta_buf { | 
 | 66 |   __u64 ns; | 
 | 67 |   __u16 sof; | 
 | 68 |   __u8 length; | 
 | 69 |   __u8 flags; | 
 | 70 |   __u8 buf[]; | 
 | 71 | } __packed; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 72 | #endif |