~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/uapi/linux/uvcvideo.h

Version: ~ [ linux-6.11-rc3 ] ~ [ linux-6.10.4 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.45 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.104 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.164 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.223 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.281 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.319 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
  2 #ifndef __LINUX_UVCVIDEO_H_
  3 #define __LINUX_UVCVIDEO_H_
  4 
  5 #include <linux/ioctl.h>
  6 #include <linux/types.h>
  7 
  8 /*
  9  * Dynamic controls
 10  */
 11 
 12 /* Data types for UVC control data */
 13 #define UVC_CTRL_DATA_TYPE_RAW          0
 14 #define UVC_CTRL_DATA_TYPE_SIGNED       1
 15 #define UVC_CTRL_DATA_TYPE_UNSIGNED     2
 16 #define UVC_CTRL_DATA_TYPE_BOOLEAN      3
 17 #define UVC_CTRL_DATA_TYPE_ENUM         4
 18 #define UVC_CTRL_DATA_TYPE_BITMASK      5
 19 
 20 /* Control flags */
 21 #define UVC_CTRL_FLAG_SET_CUR           (1 << 0)
 22 #define UVC_CTRL_FLAG_GET_CUR           (1 << 1)
 23 #define UVC_CTRL_FLAG_GET_MIN           (1 << 2)
 24 #define UVC_CTRL_FLAG_GET_MAX           (1 << 3)
 25 #define UVC_CTRL_FLAG_GET_RES           (1 << 4)
 26 #define UVC_CTRL_FLAG_GET_DEF           (1 << 5)
 27 /* Control should be saved at suspend and restored at resume. */
 28 #define UVC_CTRL_FLAG_RESTORE           (1 << 6)
 29 /* Control can be updated by the camera. */
 30 #define UVC_CTRL_FLAG_AUTO_UPDATE       (1 << 7)
 31 /* Control supports asynchronous reporting */
 32 #define UVC_CTRL_FLAG_ASYNCHRONOUS      (1 << 8)
 33 
 34 #define UVC_CTRL_FLAG_GET_RANGE \
 35         (UVC_CTRL_FLAG_GET_CUR | UVC_CTRL_FLAG_GET_MIN | \
 36          UVC_CTRL_FLAG_GET_MAX | UVC_CTRL_FLAG_GET_RES | \
 37          UVC_CTRL_FLAG_GET_DEF)
 38 
 39 #define UVC_MENU_NAME_LEN 32
 40 
 41 struct uvc_menu_info {
 42         __u32 value;
 43         __u8 name[UVC_MENU_NAME_LEN];
 44 };
 45 
 46 struct uvc_xu_control_mapping {
 47         __u32 id;
 48         __u8 name[32];
 49         __u8 entity[16];
 50         __u8 selector;
 51 
 52         __u8 size;
 53         __u8 offset;
 54         __u32 v4l2_type;
 55         __u32 data_type;
 56 
 57         struct uvc_menu_info __user *menu_info;
 58         __u32 menu_count;
 59 
 60         __u32 reserved[4];
 61 };
 62 
 63 struct uvc_xu_control_query {
 64         __u8 unit;
 65         __u8 selector;
 66         __u8 query;             /* Video Class-Specific Request Code, */
 67                                 /* defined in linux/usb/video.h A.8.  */
 68         __u16 size;
 69         __u8 __user *data;
 70 };
 71 
 72 #define UVCIOC_CTRL_MAP         _IOWR('u', 0x20, struct uvc_xu_control_mapping)
 73 #define UVCIOC_CTRL_QUERY       _IOWR('u', 0x21, struct uvc_xu_control_query)
 74 
 75 /*
 76  * Metadata node
 77  */
 78 
 79 /**
 80  * struct uvc_meta_buf - metadata buffer building block
 81  * @ns: system timestamp of the payload in nanoseconds
 82  * @sof: USB Frame Number
 83  * @length: length of the payload header
 84  * @flags: payload header flags
 85  * @buf: optional device-specific header data
 86  *
 87  * UVC metadata nodes fill buffers with possibly multiple instances of this
 88  * struct. The first two fields are added by the driver, they can be used for
 89  * clock synchronisation. The rest is an exact copy of a UVC payload header.
 90  * Only complete objects with complete buffers are included. Therefore it's
 91  * always sizeof(meta->ns) + sizeof(meta->sof) + meta->length bytes large.
 92  */
 93 struct uvc_meta_buf {
 94         __u64 ns;
 95         __u16 sof;
 96         __u8 length;
 97         __u8 flags;
 98         __u8 buf[];
 99 } __packed;
100 
101 #endif
102 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php