blob: cdaf6a57af6b056ccee291923e493205d97847cc [file] [log] [blame]
Elliott Hughes180edef2023-11-02 00:08:05 +00001/*
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 Cheng655a7c02013-10-16 16:09:24 -07007#ifndef __LINUX_UVCVIDEO_H_
8#define __LINUX_UVCVIDEO_H_
9#include <linux/ioctl.h>
10#include <linux/types.h>
Ben Cheng655a7c02013-10-16 16:09:24 -070011#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 Cheng655a7c02013-10-16 16:09:24 -070015#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 Cheng655a7c02013-10-16 16:09:24 -070019#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 Cheng655a7c02013-10-16 16:09:24 -070023#define UVC_CTRL_FLAG_RESTORE (1 << 6)
24#define UVC_CTRL_FLAG_AUTO_UPDATE (1 << 7)
Christopher Ferris9ce28842018-10-25 12:11:39 -070025#define UVC_CTRL_FLAG_ASYNCHRONOUS (1 << 8)
Tao Baod7db5942015-01-28 10:07:51 -080026#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 Ferrisb7cef6d2023-05-09 19:04:15 +000027#define UVC_MENU_NAME_LEN 32
Ben Cheng655a7c02013-10-16 16:09:24 -070028struct uvc_menu_info {
Tao Baod7db5942015-01-28 10:07:51 -080029 __u32 value;
Christopher Ferrisb7cef6d2023-05-09 19:04:15 +000030 __u8 name[UVC_MENU_NAME_LEN];
Ben Cheng655a7c02013-10-16 16:09:24 -070031};
32struct uvc_xu_control_mapping {
Tao Baod7db5942015-01-28 10:07:51 -080033 __u32 id;
34 __u8 name[32];
35 __u8 entity[16];
36 __u8 selector;
Tao Baod7db5942015-01-28 10:07:51 -080037 __u8 size;
38 __u8 offset;
39 __u32 v4l2_type;
40 __u32 data_type;
Elliott Hughes0f0c18f2023-03-29 15:53:31 -070041 struct uvc_menu_info * menu_info;
Tao Baod7db5942015-01-28 10:07:51 -080042 __u32 menu_count;
43 __u32 reserved[4];
Ben Cheng655a7c02013-10-16 16:09:24 -070044};
Ben Cheng655a7c02013-10-16 16:09:24 -070045struct uvc_xu_control_query {
Tao Baod7db5942015-01-28 10:07:51 -080046 __u8 unit;
47 __u8 selector;
48 __u8 query;
Tao Baod7db5942015-01-28 10:07:51 -080049 __u16 size;
Elliott Hughes0f0c18f2023-03-29 15:53:31 -070050 __u8 * data;
Ben Cheng655a7c02013-10-16 16:09:24 -070051};
52#define UVCIOC_CTRL_MAP _IOWR('u', 0x20, struct uvc_xu_control_mapping)
Ben Cheng655a7c02013-10-16 16:09:24 -070053#define UVCIOC_CTRL_QUERY _IOWR('u', 0x21, struct uvc_xu_control_query)
Christopher Ferris76a1d452018-06-27 14:12:29 -070054struct uvc_meta_buf {
55 __u64 ns;
56 __u16 sof;
57 __u8 length;
58 __u8 flags;
59 __u8 buf[];
Colin Cross4ac33222022-12-15 15:45:35 -080060} __attribute__((__packed__));
Ben Cheng655a7c02013-10-16 16:09:24 -070061#endif