1 #ifndef __LINUX_UVCVIDEO_H_
2 #define __LINUX_UVCVIDEO_H_
4 #include <linux/ioctl.h>
5 #include <linux/types.h>
11 /* Data types for UVC control data */
12 #define UVC_CTRL_DATA_TYPE_RAW 0
13 #define UVC_CTRL_DATA_TYPE_SIGNED 1
14 #define UVC_CTRL_DATA_TYPE_UNSIGNED 2
15 #define UVC_CTRL_DATA_TYPE_BOOLEAN 3
16 #define UVC_CTRL_DATA_TYPE_ENUM 4
17 #define UVC_CTRL_DATA_TYPE_BITMASK 5
20 #define UVC_CTRL_FLAG_SET_CUR (1 << 0)
21 #define UVC_CTRL_FLAG_GET_CUR (1 << 1)
22 #define UVC_CTRL_FLAG_GET_MIN (1 << 2)
23 #define UVC_CTRL_FLAG_GET_MAX (1 << 3)
24 #define UVC_CTRL_FLAG_GET_RES (1 << 4)
25 #define UVC_CTRL_FLAG_GET_DEF (1 << 5)
26 /* Control should be saved at suspend and restored at resume. */
27 #define UVC_CTRL_FLAG_RESTORE (1 << 6)
28 /* Control can be updated by the camera. */
29 #define UVC_CTRL_FLAG_AUTO_UPDATE (1 << 7)
31 #define UVC_CTRL_FLAG_GET_RANGE \
32 (UVC_CTRL_FLAG_GET_CUR | UVC_CTRL_FLAG_GET_MIN | \
33 UVC_CTRL_FLAG_GET_MAX | UVC_CTRL_FLAG_GET_RES | \
34 UVC_CTRL_FLAG_GET_DEF)
36 struct uvc_menu_info {
41 struct uvc_xu_control_mapping {
52 struct uvc_menu_info __user *menu_info;
58 struct uvc_xu_control_query {
61 __u8 query; /* Video Class-Specific Request Code, */
62 /* defined in linux/usb/video.h A.8. */
67 #define UVCIOC_CTRL_MAP _IOWR('u', 0x20, struct uvc_xu_control_mapping)
68 #define UVCIOC_CTRL_QUERY _IOWR('u', 0x21, struct uvc_xu_control_query)