Elliott Hughes | 180edef | 2023-11-02 00:08:05 +0000 | [diff] [blame] | 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 | */ |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 7 | #ifndef __LINUX_UVCVIDEO_H_ |
| 8 | #define __LINUX_UVCVIDEO_H_ |
| 9 | #include <linux/ioctl.h> |
| 10 | #include <linux/types.h> |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 11 | #define UVC_CTRL_DATA_TYPE_RAW 0 |
| 12 | #define UVC_CTRL_DATA_TYPE_SIGNED 1 |
| 13 | #define UVC_CTRL_DATA_TYPE_UNSIGNED 2 |
| 14 | #define UVC_CTRL_DATA_TYPE_BOOLEAN 3 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 15 | #define UVC_CTRL_DATA_TYPE_ENUM 4 |
| 16 | #define UVC_CTRL_DATA_TYPE_BITMASK 5 |
| 17 | #define UVC_CTRL_FLAG_SET_CUR (1 << 0) |
| 18 | #define UVC_CTRL_FLAG_GET_CUR (1 << 1) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 19 | #define UVC_CTRL_FLAG_GET_MIN (1 << 2) |
| 20 | #define UVC_CTRL_FLAG_GET_MAX (1 << 3) |
| 21 | #define UVC_CTRL_FLAG_GET_RES (1 << 4) |
| 22 | #define UVC_CTRL_FLAG_GET_DEF (1 << 5) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 23 | #define UVC_CTRL_FLAG_RESTORE (1 << 6) |
| 24 | #define UVC_CTRL_FLAG_AUTO_UPDATE (1 << 7) |
Christopher Ferris | 9ce2884 | 2018-10-25 12:11:39 -0700 | [diff] [blame] | 25 | #define UVC_CTRL_FLAG_ASYNCHRONOUS (1 << 8) |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 26 | #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) |
Christopher Ferris | b7cef6d | 2023-05-09 19:04:15 +0000 | [diff] [blame] | 27 | #define UVC_MENU_NAME_LEN 32 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 28 | struct uvc_menu_info { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 29 | __u32 value; |
Christopher Ferris | b7cef6d | 2023-05-09 19:04:15 +0000 | [diff] [blame] | 30 | __u8 name[UVC_MENU_NAME_LEN]; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 31 | }; |
| 32 | struct uvc_xu_control_mapping { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 33 | __u32 id; |
| 34 | __u8 name[32]; |
| 35 | __u8 entity[16]; |
| 36 | __u8 selector; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 37 | __u8 size; |
| 38 | __u8 offset; |
| 39 | __u32 v4l2_type; |
| 40 | __u32 data_type; |
Elliott Hughes | 0f0c18f | 2023-03-29 15:53:31 -0700 | [diff] [blame] | 41 | struct uvc_menu_info * menu_info; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 42 | __u32 menu_count; |
| 43 | __u32 reserved[4]; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 44 | }; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 45 | struct uvc_xu_control_query { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 46 | __u8 unit; |
| 47 | __u8 selector; |
| 48 | __u8 query; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 49 | __u16 size; |
Elliott Hughes | 0f0c18f | 2023-03-29 15:53:31 -0700 | [diff] [blame] | 50 | __u8 * data; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 51 | }; |
| 52 | #define UVCIOC_CTRL_MAP _IOWR('u', 0x20, struct uvc_xu_control_mapping) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 53 | #define UVCIOC_CTRL_QUERY _IOWR('u', 0x21, struct uvc_xu_control_query) |
Christopher Ferris | 76a1d45 | 2018-06-27 14:12:29 -0700 | [diff] [blame] | 54 | struct uvc_meta_buf { |
| 55 | __u64 ns; |
| 56 | __u16 sof; |
| 57 | __u8 length; |
| 58 | __u8 flags; |
| 59 | __u8 buf[]; |
Colin Cross | 4ac3322 | 2022-12-15 15:45:35 -0800 | [diff] [blame] | 60 | } __attribute__((__packed__)); |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 61 | #endif |