blob: 55d71925cca7e12f7c0481a8e0b2504b1e09f099 [file] [log] [blame]
Ben Cheng655a7c02013-10-16 16:09:24 -07001/****************************************************************************
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_V4L2_SUBDEV_H
20#define __LINUX_V4L2_SUBDEV_H
Christopher Ferrisb7cef6d2023-05-09 19:04:15 +000021#include <linux/const.h>
Ben Cheng655a7c02013-10-16 16:09:24 -070022#include <linux/ioctl.h>
23#include <linux/types.h>
Ben Cheng655a7c02013-10-16 16:09:24 -070024#include <linux/v4l2-common.h>
25#include <linux/v4l2-mediabus.h>
26enum v4l2_subdev_format_whence {
Tao Baod7db5942015-01-28 10:07:51 -080027 V4L2_SUBDEV_FORMAT_TRY = 0,
Tao Baod7db5942015-01-28 10:07:51 -080028 V4L2_SUBDEV_FORMAT_ACTIVE = 1,
Ben Cheng655a7c02013-10-16 16:09:24 -070029};
30struct v4l2_subdev_format {
Tao Baod7db5942015-01-28 10:07:51 -080031 __u32 which;
Tao Baod7db5942015-01-28 10:07:51 -080032 __u32 pad;
33 struct v4l2_mbus_framefmt format;
Christopher Ferrisb7cef6d2023-05-09 19:04:15 +000034 __u32 stream;
35 __u32 reserved[7];
Ben Cheng655a7c02013-10-16 16:09:24 -070036};
Ben Cheng655a7c02013-10-16 16:09:24 -070037struct v4l2_subdev_crop {
Tao Baod7db5942015-01-28 10:07:51 -080038 __u32 which;
39 __u32 pad;
40 struct v4l2_rect rect;
Christopher Ferrisb7cef6d2023-05-09 19:04:15 +000041 __u32 stream;
42 __u32 reserved[7];
Ben Cheng655a7c02013-10-16 16:09:24 -070043};
Christopher Ferris32ff3f82020-12-14 13:10:04 -080044#define V4L2_SUBDEV_MBUS_CODE_CSC_COLORSPACE 0x00000001
45#define V4L2_SUBDEV_MBUS_CODE_CSC_XFER_FUNC 0x00000002
46#define V4L2_SUBDEV_MBUS_CODE_CSC_YCBCR_ENC 0x00000004
47#define V4L2_SUBDEV_MBUS_CODE_CSC_HSV_ENC V4L2_SUBDEV_MBUS_CODE_CSC_YCBCR_ENC
48#define V4L2_SUBDEV_MBUS_CODE_CSC_QUANTIZATION 0x00000008
Ben Cheng655a7c02013-10-16 16:09:24 -070049struct v4l2_subdev_mbus_code_enum {
Tao Baod7db5942015-01-28 10:07:51 -080050 __u32 pad;
Tao Baod7db5942015-01-28 10:07:51 -080051 __u32 index;
52 __u32 code;
Christopher Ferris05d08e92016-02-04 13:16:38 -080053 __u32 which;
Christopher Ferris32ff3f82020-12-14 13:10:04 -080054 __u32 flags;
Christopher Ferrisb7cef6d2023-05-09 19:04:15 +000055 __u32 stream;
56 __u32 reserved[6];
Christopher Ferris05d08e92016-02-04 13:16:38 -080057};
Ben Cheng655a7c02013-10-16 16:09:24 -070058struct v4l2_subdev_frame_size_enum {
Tao Baod7db5942015-01-28 10:07:51 -080059 __u32 index;
60 __u32 pad;
Christopher Ferris05d08e92016-02-04 13:16:38 -080061 __u32 code;
Tao Baod7db5942015-01-28 10:07:51 -080062 __u32 min_width;
63 __u32 max_width;
64 __u32 min_height;
65 __u32 max_height;
Tao Baod7db5942015-01-28 10:07:51 -080066 __u32 which;
Christopher Ferrisb7cef6d2023-05-09 19:04:15 +000067 __u32 stream;
68 __u32 reserved[7];
Ben Cheng655a7c02013-10-16 16:09:24 -070069};
Christopher Ferris05d08e92016-02-04 13:16:38 -080070struct v4l2_subdev_frame_interval {
71 __u32 pad;
72 struct v4l2_fract interval;
Christopher Ferrisb7cef6d2023-05-09 19:04:15 +000073 __u32 stream;
74 __u32 reserved[8];
Christopher Ferris05d08e92016-02-04 13:16:38 -080075};
76struct v4l2_subdev_frame_interval_enum {
77 __u32 index;
78 __u32 pad;
Christopher Ferris05d08e92016-02-04 13:16:38 -080079 __u32 code;
80 __u32 width;
81 __u32 height;
82 struct v4l2_fract interval;
Christopher Ferris05d08e92016-02-04 13:16:38 -080083 __u32 which;
Christopher Ferrisb7cef6d2023-05-09 19:04:15 +000084 __u32 stream;
85 __u32 reserved[7];
Christopher Ferris05d08e92016-02-04 13:16:38 -080086};
87struct v4l2_subdev_selection {
Christopher Ferris05d08e92016-02-04 13:16:38 -080088 __u32 which;
89 __u32 pad;
90 __u32 target;
91 __u32 flags;
Christopher Ferris05d08e92016-02-04 13:16:38 -080092 struct v4l2_rect r;
Christopher Ferrisb7cef6d2023-05-09 19:04:15 +000093 __u32 stream;
94 __u32 reserved[7];
Christopher Ferris05d08e92016-02-04 13:16:38 -080095};
Christopher Ferris8177cdf2020-08-03 11:53:55 -070096struct v4l2_subdev_capability {
97 __u32 version;
98 __u32 capabilities;
99 __u32 reserved[14];
100};
Christopher Ferris05667cd2021-02-16 16:01:34 -0800101#define V4L2_SUBDEV_CAP_RO_SUBDEV 0x00000001
Christopher Ferrisb7cef6d2023-05-09 19:04:15 +0000102#define V4L2_SUBDEV_CAP_STREAMS 0x00000002
103#define V4L2_SUBDEV_ROUTE_FL_ACTIVE (1U << 0)
104struct v4l2_subdev_route {
105 __u32 sink_pad;
106 __u32 sink_stream;
107 __u32 source_pad;
108 __u32 source_stream;
109 __u32 flags;
110 __u32 reserved[5];
111};
112struct v4l2_subdev_routing {
113 __u32 which;
114 __u32 num_routes;
115 __u64 routes;
116 __u32 reserved[6];
117};
Christopher Ferris37c3f3c2023-07-10 10:59:05 -0700118#define V4L2_SUBDEV_CLIENT_CAP_STREAMS (1U << 0)
119struct v4l2_subdev_client_capability {
120 __u64 capabilities;
121};
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700122#define v4l2_subdev_edid v4l2_edid
Christopher Ferris8177cdf2020-08-03 11:53:55 -0700123#define VIDIOC_SUBDEV_QUERYCAP _IOR('V', 0, struct v4l2_subdev_capability)
Ben Cheng655a7c02013-10-16 16:09:24 -0700124#define VIDIOC_SUBDEV_G_FMT _IOWR('V', 4, struct v4l2_subdev_format)
Ben Cheng655a7c02013-10-16 16:09:24 -0700125#define VIDIOC_SUBDEV_S_FMT _IOWR('V', 5, struct v4l2_subdev_format)
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700126#define VIDIOC_SUBDEV_G_FRAME_INTERVAL _IOWR('V', 21, struct v4l2_subdev_frame_interval)
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700127#define VIDIOC_SUBDEV_S_FRAME_INTERVAL _IOWR('V', 22, struct v4l2_subdev_frame_interval)
128#define VIDIOC_SUBDEV_ENUM_MBUS_CODE _IOWR('V', 2, struct v4l2_subdev_mbus_code_enum)
129#define VIDIOC_SUBDEV_ENUM_FRAME_SIZE _IOWR('V', 74, struct v4l2_subdev_frame_size_enum)
130#define VIDIOC_SUBDEV_ENUM_FRAME_INTERVAL _IOWR('V', 75, struct v4l2_subdev_frame_interval_enum)
Ben Cheng655a7c02013-10-16 16:09:24 -0700131#define VIDIOC_SUBDEV_G_CROP _IOWR('V', 59, struct v4l2_subdev_crop)
132#define VIDIOC_SUBDEV_S_CROP _IOWR('V', 60, struct v4l2_subdev_crop)
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700133#define VIDIOC_SUBDEV_G_SELECTION _IOWR('V', 61, struct v4l2_subdev_selection)
134#define VIDIOC_SUBDEV_S_SELECTION _IOWR('V', 62, struct v4l2_subdev_selection)
Christopher Ferrisb7cef6d2023-05-09 19:04:15 +0000135#define VIDIOC_SUBDEV_G_ROUTING _IOWR('V', 38, struct v4l2_subdev_routing)
136#define VIDIOC_SUBDEV_S_ROUTING _IOWR('V', 39, struct v4l2_subdev_routing)
Christopher Ferris37c3f3c2023-07-10 10:59:05 -0700137#define VIDIOC_SUBDEV_G_CLIENT_CAP _IOR('V', 101, struct v4l2_subdev_client_capability)
138#define VIDIOC_SUBDEV_S_CLIENT_CAP _IOWR('V', 102, struct v4l2_subdev_client_capability)
Christopher Ferris9ce28842018-10-25 12:11:39 -0700139#define VIDIOC_SUBDEV_G_STD _IOR('V', 23, v4l2_std_id)
140#define VIDIOC_SUBDEV_S_STD _IOW('V', 24, v4l2_std_id)
141#define VIDIOC_SUBDEV_ENUMSTD _IOWR('V', 25, struct v4l2_standard)
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700142#define VIDIOC_SUBDEV_G_EDID _IOWR('V', 40, struct v4l2_edid)
143#define VIDIOC_SUBDEV_S_EDID _IOWR('V', 41, struct v4l2_edid)
Christopher Ferris9ce28842018-10-25 12:11:39 -0700144#define VIDIOC_SUBDEV_QUERYSTD _IOR('V', 63, v4l2_std_id)
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700145#define VIDIOC_SUBDEV_S_DV_TIMINGS _IOWR('V', 87, struct v4l2_dv_timings)
146#define VIDIOC_SUBDEV_G_DV_TIMINGS _IOWR('V', 88, struct v4l2_dv_timings)
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700147#define VIDIOC_SUBDEV_ENUM_DV_TIMINGS _IOWR('V', 98, struct v4l2_enum_dv_timings)
148#define VIDIOC_SUBDEV_QUERY_DV_TIMINGS _IOR('V', 99, struct v4l2_dv_timings)
149#define VIDIOC_SUBDEV_DV_TIMINGS_CAP _IOWR('V', 100, struct v4l2_dv_timings_cap)
Ben Cheng655a7c02013-10-16 16:09:24 -0700150#endif