1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24 #ifndef __LINUX_V4L2_SUBDEV_H
25 #define __LINUX_V4L2_SUBDEV_H
26
27 #include <linux/ioctl.h>
28 #include <linux/types.h>
29 #include <linux/v4l2-common.h>
30 #include <linux/v4l2-mediabus.h>
31
32
33
34
35
36
37 enum v4l2_subdev_format_whence {
38 V4L2_SUBDEV_FORMAT_TRY = 0,
39 V4L2_SUBDEV_FORMAT_ACTIVE = 1,
40 };
41
42
43
44
45
46
47
48 struct v4l2_subdev_format {
49 __u32 which;
50 __u32 pad;
51 struct v4l2_mbus_framefmt format;
52 __u32 reserved[8];
53 };
54
55
56
57
58
59
60
61 struct v4l2_subdev_crop {
62 __u32 which;
63 __u32 pad;
64 struct v4l2_rect rect;
65 __u32 reserved[8];
66 };
67
68
69
70
71
72
73
74
75 struct v4l2_subdev_mbus_code_enum {
76 __u32 pad;
77 __u32 index;
78 __u32 code;
79 __u32 which;
80 __u32 reserved[8];
81 };
82
83
84
85
86
87
88
89
90 struct v4l2_subdev_frame_size_enum {
91 __u32 index;
92 __u32 pad;
93 __u32 code;
94 __u32 min_width;
95 __u32 max_width;
96 __u32 min_height;
97 __u32 max_height;
98 __u32 which;
99 __u32 reserved[8];
100 };
101
102
103
104
105
106
107 struct v4l2_subdev_frame_interval {
108 __u32 pad;
109 struct v4l2_fract interval;
110 __u32 reserved[9];
111 };
112
113
114
115
116
117
118
119
120
121
122
123 struct v4l2_subdev_frame_interval_enum {
124 __u32 index;
125 __u32 pad;
126 __u32 code;
127 __u32 width;
128 __u32 height;
129 struct v4l2_fract interval;
130 __u32 which;
131 __u32 reserved[8];
132 };
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149 struct v4l2_subdev_selection {
150 __u32 which;
151 __u32 pad;
152 __u32 target;
153 __u32 flags;
154 struct v4l2_rect r;
155 __u32 reserved[8];
156 };
157
158
159 #define v4l2_subdev_edid v4l2_edid
160
161 #define VIDIOC_SUBDEV_G_FMT _IOWR('V', 4, struct v4l2_subdev_format)
162 #define VIDIOC_SUBDEV_S_FMT _IOWR('V', 5, struct v4l2_subdev_format)
163 #define VIDIOC_SUBDEV_G_FRAME_INTERVAL _IOWR('V', 21, struct v4l2_subdev_frame_interval)
164 #define VIDIOC_SUBDEV_S_FRAME_INTERVAL _IOWR('V', 22, struct v4l2_subdev_frame_interval)
165 #define VIDIOC_SUBDEV_ENUM_MBUS_CODE _IOWR('V', 2, struct v4l2_subdev_mbus_code_enum)
166 #define VIDIOC_SUBDEV_ENUM_FRAME_SIZE _IOWR('V', 74, struct v4l2_subdev_frame_size_enum)
167 #define VIDIOC_SUBDEV_ENUM_FRAME_INTERVAL _IOWR('V', 75, struct v4l2_subdev_frame_interval_enum)
168 #define VIDIOC_SUBDEV_G_CROP _IOWR('V', 59, struct v4l2_subdev_crop)
169 #define VIDIOC_SUBDEV_S_CROP _IOWR('V', 60, struct v4l2_subdev_crop)
170 #define VIDIOC_SUBDEV_G_SELECTION _IOWR('V', 61, struct v4l2_subdev_selection)
171 #define VIDIOC_SUBDEV_S_SELECTION _IOWR('V', 62, struct v4l2_subdev_selection)
172
173 #define VIDIOC_SUBDEV_G_STD _IOR('V', 23, v4l2_std_id)
174 #define VIDIOC_SUBDEV_S_STD _IOW('V', 24, v4l2_std_id)
175 #define VIDIOC_SUBDEV_ENUMSTD _IOWR('V', 25, struct v4l2_standard)
176 #define VIDIOC_SUBDEV_G_EDID _IOWR('V', 40, struct v4l2_edid)
177 #define VIDIOC_SUBDEV_S_EDID _IOWR('V', 41, struct v4l2_edid)
178 #define VIDIOC_SUBDEV_QUERYSTD _IOR('V', 63, v4l2_std_id)
179 #define VIDIOC_SUBDEV_S_DV_TIMINGS _IOWR('V', 87, struct v4l2_dv_timings)
180 #define VIDIOC_SUBDEV_G_DV_TIMINGS _IOWR('V', 88, struct v4l2_dv_timings)
181 #define VIDIOC_SUBDEV_ENUM_DV_TIMINGS _IOWR('V', 98, struct v4l2_enum_dv_timings)
182 #define VIDIOC_SUBDEV_QUERY_DV_TIMINGS _IOR('V', 99, struct v4l2_dv_timings)
183 #define VIDIOC_SUBDEV_DV_TIMINGS_CAP _IOWR('V', 100, struct v4l2_dv_timings_cap)
184
185 #endif