• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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  */
7 #ifndef __LINUX_V4L2_SUBDEV_H
8 #define __LINUX_V4L2_SUBDEV_H
9 #include <linux/const.h>
10 #include <linux/ioctl.h>
11 #include <linux/types.h>
12 #include <linux/v4l2-common.h>
13 #include <linux/v4l2-mediabus.h>
14 enum v4l2_subdev_format_whence {
15   V4L2_SUBDEV_FORMAT_TRY = 0,
16   V4L2_SUBDEV_FORMAT_ACTIVE = 1,
17 };
18 struct v4l2_subdev_format {
19   __u32 which;
20   __u32 pad;
21   struct v4l2_mbus_framefmt format;
22   __u32 stream;
23   __u32 reserved[7];
24 };
25 struct v4l2_subdev_crop {
26   __u32 which;
27   __u32 pad;
28   struct v4l2_rect rect;
29   __u32 stream;
30   __u32 reserved[7];
31 };
32 #define V4L2_SUBDEV_MBUS_CODE_CSC_COLORSPACE 0x00000001
33 #define V4L2_SUBDEV_MBUS_CODE_CSC_XFER_FUNC 0x00000002
34 #define V4L2_SUBDEV_MBUS_CODE_CSC_YCBCR_ENC 0x00000004
35 #define V4L2_SUBDEV_MBUS_CODE_CSC_HSV_ENC V4L2_SUBDEV_MBUS_CODE_CSC_YCBCR_ENC
36 #define V4L2_SUBDEV_MBUS_CODE_CSC_QUANTIZATION 0x00000008
37 struct v4l2_subdev_mbus_code_enum {
38   __u32 pad;
39   __u32 index;
40   __u32 code;
41   __u32 which;
42   __u32 flags;
43   __u32 stream;
44   __u32 reserved[6];
45 };
46 struct v4l2_subdev_frame_size_enum {
47   __u32 index;
48   __u32 pad;
49   __u32 code;
50   __u32 min_width;
51   __u32 max_width;
52   __u32 min_height;
53   __u32 max_height;
54   __u32 which;
55   __u32 stream;
56   __u32 reserved[7];
57 };
58 struct v4l2_subdev_frame_interval {
59   __u32 pad;
60   struct v4l2_fract interval;
61   __u32 stream;
62   __u32 which;
63   __u32 reserved[7];
64 };
65 struct v4l2_subdev_frame_interval_enum {
66   __u32 index;
67   __u32 pad;
68   __u32 code;
69   __u32 width;
70   __u32 height;
71   struct v4l2_fract interval;
72   __u32 which;
73   __u32 stream;
74   __u32 reserved[7];
75 };
76 struct v4l2_subdev_selection {
77   __u32 which;
78   __u32 pad;
79   __u32 target;
80   __u32 flags;
81   struct v4l2_rect r;
82   __u32 stream;
83   __u32 reserved[7];
84 };
85 struct v4l2_subdev_capability {
86   __u32 version;
87   __u32 capabilities;
88   __u32 reserved[14];
89 };
90 #define V4L2_SUBDEV_CAP_RO_SUBDEV 0x00000001
91 #define V4L2_SUBDEV_CAP_STREAMS 0x00000002
92 #define V4L2_SUBDEV_ROUTE_FL_ACTIVE (1U << 0)
93 struct v4l2_subdev_route {
94   __u32 sink_pad;
95   __u32 sink_stream;
96   __u32 source_pad;
97   __u32 source_stream;
98   __u32 flags;
99   __u32 reserved[5];
100 };
101 struct v4l2_subdev_routing {
102   __u32 which;
103   __u32 num_routes;
104   __u64 routes;
105   __u32 reserved[6];
106 };
107 #define V4L2_SUBDEV_CLIENT_CAP_STREAMS (1ULL << 0)
108 #define V4L2_SUBDEV_CLIENT_CAP_INTERVAL_USES_WHICH (1ULL << 1)
109 struct v4l2_subdev_client_capability {
110   __u64 capabilities;
111 };
112 #define v4l2_subdev_edid v4l2_edid
113 #define VIDIOC_SUBDEV_QUERYCAP _IOR('V', 0, struct v4l2_subdev_capability)
114 #define VIDIOC_SUBDEV_G_FMT _IOWR('V', 4, struct v4l2_subdev_format)
115 #define VIDIOC_SUBDEV_S_FMT _IOWR('V', 5, struct v4l2_subdev_format)
116 #define VIDIOC_SUBDEV_G_FRAME_INTERVAL _IOWR('V', 21, struct v4l2_subdev_frame_interval)
117 #define VIDIOC_SUBDEV_S_FRAME_INTERVAL _IOWR('V', 22, struct v4l2_subdev_frame_interval)
118 #define VIDIOC_SUBDEV_ENUM_MBUS_CODE _IOWR('V', 2, struct v4l2_subdev_mbus_code_enum)
119 #define VIDIOC_SUBDEV_ENUM_FRAME_SIZE _IOWR('V', 74, struct v4l2_subdev_frame_size_enum)
120 #define VIDIOC_SUBDEV_ENUM_FRAME_INTERVAL _IOWR('V', 75, struct v4l2_subdev_frame_interval_enum)
121 #define VIDIOC_SUBDEV_G_CROP _IOWR('V', 59, struct v4l2_subdev_crop)
122 #define VIDIOC_SUBDEV_S_CROP _IOWR('V', 60, struct v4l2_subdev_crop)
123 #define VIDIOC_SUBDEV_G_SELECTION _IOWR('V', 61, struct v4l2_subdev_selection)
124 #define VIDIOC_SUBDEV_S_SELECTION _IOWR('V', 62, struct v4l2_subdev_selection)
125 #define VIDIOC_SUBDEV_G_ROUTING _IOWR('V', 38, struct v4l2_subdev_routing)
126 #define VIDIOC_SUBDEV_S_ROUTING _IOWR('V', 39, struct v4l2_subdev_routing)
127 #define VIDIOC_SUBDEV_G_CLIENT_CAP _IOR('V', 101, struct v4l2_subdev_client_capability)
128 #define VIDIOC_SUBDEV_S_CLIENT_CAP _IOWR('V', 102, struct v4l2_subdev_client_capability)
129 #define VIDIOC_SUBDEV_G_STD _IOR('V', 23, v4l2_std_id)
130 #define VIDIOC_SUBDEV_S_STD _IOW('V', 24, v4l2_std_id)
131 #define VIDIOC_SUBDEV_ENUMSTD _IOWR('V', 25, struct v4l2_standard)
132 #define VIDIOC_SUBDEV_G_EDID _IOWR('V', 40, struct v4l2_edid)
133 #define VIDIOC_SUBDEV_S_EDID _IOWR('V', 41, struct v4l2_edid)
134 #define VIDIOC_SUBDEV_QUERYSTD _IOR('V', 63, v4l2_std_id)
135 #define VIDIOC_SUBDEV_S_DV_TIMINGS _IOWR('V', 87, struct v4l2_dv_timings)
136 #define VIDIOC_SUBDEV_G_DV_TIMINGS _IOWR('V', 88, struct v4l2_dv_timings)
137 #define VIDIOC_SUBDEV_ENUM_DV_TIMINGS _IOWR('V', 98, struct v4l2_enum_dv_timings)
138 #define VIDIOC_SUBDEV_QUERY_DV_TIMINGS _IOR('V', 99, struct v4l2_dv_timings)
139 #define VIDIOC_SUBDEV_DV_TIMINGS_CAP _IOWR('V', 100, struct v4l2_dv_timings_cap)
140 #endif
141