Blame view

include/media/v4l2-ioctl.h 30.4 KB
35ea11ff8   Hans Verkuil   V4L/DVB (8430): v...
1
2
3
4
5
6
7
8
9
10
11
12
13
  /*
   *
   *	V 4 L 2   D R I V E R   H E L P E R   A P I
   *
   * Moved from videodev2.h
   *
   *	Some commonly needed functions for drivers (v4l2-common.o module)
   */
  #ifndef _V4L2_IOCTL_H
  #define _V4L2_IOCTL_H
  
  #include <linux/poll.h>
  #include <linux/fs.h>
35ea11ff8   Hans Verkuil   V4L/DVB (8430): v...
14
15
  #include <linux/mutex.h>
  #include <linux/compiler.h> /* need __user */
35ea11ff8   Hans Verkuil   V4L/DVB (8430): v...
16
  #include <linux/videodev2.h>
35ea11ff8   Hans Verkuil   V4L/DVB (8430): v...
17

d3d7c9635   Sakari Ailus   V4L/DVB: V4L: Eve...
18
  struct v4l2_fh;
c91661f1e   Mauro Carvalho Chehab   [media] v4l2-ioct...
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
  /**
   * struct v4l2_ioctl_ops - describe operations for each V4L2 ioctl
   *
   * @vidioc_querycap: pointer to the function that implements
   *	:ref:`VIDIOC_QUERYCAP <vidioc_querycap>` ioctl
   * @vidioc_enum_fmt_vid_cap: pointer to the function that implements
   *	:ref:`VIDIOC_ENUM_FMT <vidioc_enum_fmt>` ioctl logic
   *	for video capture in single plane mode
   * @vidioc_enum_fmt_vid_overlay: pointer to the function that implements
   *	:ref:`VIDIOC_ENUM_FMT <vidioc_enum_fmt>` ioctl logic
   *	for video overlay
   * @vidioc_enum_fmt_vid_out: pointer to the function that implements
   *	:ref:`VIDIOC_ENUM_FMT <vidioc_enum_fmt>` ioctl logic
   *	for video output in single plane mode
   * @vidioc_enum_fmt_vid_cap_mplane: pointer to the function that implements
   *	:ref:`VIDIOC_ENUM_FMT <vidioc_enum_fmt>` ioctl logic
   *	for video capture in multiplane mode
   * @vidioc_enum_fmt_vid_out_mplane: pointer to the function that implements
   *	:ref:`VIDIOC_ENUM_FMT <vidioc_enum_fmt>` ioctl logic
   *	for video output in multiplane mode
   * @vidioc_enum_fmt_sdr_cap: pointer to the function that implements
   *	:ref:`VIDIOC_ENUM_FMT <vidioc_enum_fmt>` ioctl logic
   *	for Software Defined Radio capture
   * @vidioc_enum_fmt_sdr_out: pointer to the function that implements
   *	:ref:`VIDIOC_ENUM_FMT <vidioc_enum_fmt>` ioctl logic
   *	for Software Defined Radio output
   * @vidioc_g_fmt_vid_cap: pointer to the function that implements
   *	:ref:`VIDIOC_G_FMT <vidioc_g_fmt>` ioctl logic for video capture
   *	in single plane mode
   * @vidioc_g_fmt_vid_overlay: pointer to the function that implements
   *	:ref:`VIDIOC_G_FMT <vidioc_g_fmt>` ioctl logic for video overlay
   * @vidioc_g_fmt_vid_out: pointer to the function that implements
   *	:ref:`VIDIOC_G_FMT <vidioc_g_fmt>` ioctl logic for video out
   *	in single plane mode
   * @vidioc_g_fmt_vid_out_overlay: pointer to the function that implements
   *	:ref:`VIDIOC_G_FMT <vidioc_g_fmt>` ioctl logic for video overlay output
   * @vidioc_g_fmt_vbi_cap: pointer to the function that implements
   *	:ref:`VIDIOC_G_FMT <vidioc_g_fmt>` ioctl logic for raw VBI capture
   * @vidioc_g_fmt_vbi_out: pointer to the function that implements
   *	:ref:`VIDIOC_G_FMT <vidioc_g_fmt>` ioctl logic for raw VBI output
   * @vidioc_g_fmt_sliced_vbi_cap: pointer to the function that implements
   *	:ref:`VIDIOC_G_FMT <vidioc_g_fmt>` ioctl logic for sliced VBI capture
   * @vidioc_g_fmt_sliced_vbi_out: pointer to the function that implements
   *	:ref:`VIDIOC_G_FMT <vidioc_g_fmt>` ioctl logic for sliced VBI output
   * @vidioc_g_fmt_vid_cap_mplane: pointer to the function that implements
   *	:ref:`VIDIOC_G_FMT <vidioc_g_fmt>` ioctl logic for video capture
   *	in multiple plane mode
   * @vidioc_g_fmt_vid_out_mplane: pointer to the function that implements
   *	:ref:`VIDIOC_G_FMT <vidioc_g_fmt>` ioctl logic for video out
   *	in multiplane plane mode
   * @vidioc_g_fmt_sdr_cap: pointer to the function that implements
   *	:ref:`VIDIOC_G_FMT <vidioc_g_fmt>` ioctl logic for Software Defined
   *	Radio capture
   * @vidioc_g_fmt_sdr_out: pointer to the function that implements
   *	:ref:`VIDIOC_G_FMT <vidioc_g_fmt>` ioctl logic for Software Defined
   *	Radio output
   * @vidioc_s_fmt_vid_cap: pointer to the function that implements
   *	:ref:`VIDIOC_S_FMT <vidioc_g_fmt>` ioctl logic for video capture
   *	in single plane mode
   * @vidioc_s_fmt_vid_overlay: pointer to the function that implements
   *	:ref:`VIDIOC_S_FMT <vidioc_g_fmt>` ioctl logic for video overlay
   * @vidioc_s_fmt_vid_out: pointer to the function that implements
   *	:ref:`VIDIOC_S_FMT <vidioc_g_fmt>` ioctl logic for video out
   *	in single plane mode
   * @vidioc_s_fmt_vid_out_overlay: pointer to the function that implements
   *	:ref:`VIDIOC_S_FMT <vidioc_g_fmt>` ioctl logic for video overlay output
   * @vidioc_s_fmt_vbi_cap: pointer to the function that implements
   *	:ref:`VIDIOC_S_FMT <vidioc_g_fmt>` ioctl logic for raw VBI capture
   * @vidioc_s_fmt_vbi_out: pointer to the function that implements
   *	:ref:`VIDIOC_S_FMT <vidioc_g_fmt>` ioctl logic for raw VBI output
   * @vidioc_s_fmt_sliced_vbi_cap: pointer to the function that implements
   *	:ref:`VIDIOC_S_FMT <vidioc_g_fmt>` ioctl logic for sliced VBI capture
   * @vidioc_s_fmt_sliced_vbi_out: pointer to the function that implements
   *	:ref:`VIDIOC_S_FMT <vidioc_g_fmt>` ioctl logic for sliced VBI output
   * @vidioc_s_fmt_vid_cap_mplane: pointer to the function that implements
   *	:ref:`VIDIOC_S_FMT <vidioc_g_fmt>` ioctl logic for video capture
   *	in multiple plane mode
   * @vidioc_s_fmt_vid_out_mplane: pointer to the function that implements
   *	:ref:`VIDIOC_S_FMT <vidioc_g_fmt>` ioctl logic for video out
   *	in multiplane plane mode
   * @vidioc_s_fmt_sdr_cap: pointer to the function that implements
   *	:ref:`VIDIOC_S_FMT <vidioc_g_fmt>` ioctl logic for Software Defined
   *	Radio capture
   * @vidioc_s_fmt_sdr_out: pointer to the function that implements
   *	:ref:`VIDIOC_S_FMT <vidioc_g_fmt>` ioctl logic for Software Defined
   *	Radio output
   * @vidioc_try_fmt_vid_cap: pointer to the function that implements
   *	:ref:`VIDIOC_TRY_FMT <vidioc_g_fmt>` ioctl logic for video capture
   *	in single plane mode
   * @vidioc_try_fmt_vid_overlay: pointer to the function that implements
   *	:ref:`VIDIOC_TRY_FMT <vidioc_g_fmt>` ioctl logic for video overlay
   * @vidioc_try_fmt_vid_out: pointer to the function that implements
   *	:ref:`VIDIOC_TRY_FMT <vidioc_g_fmt>` ioctl logic for video out
   *	in single plane mode
   * @vidioc_try_fmt_vid_out_overlay: pointer to the function that implements
   *	:ref:`VIDIOC_TRY_FMT <vidioc_g_fmt>` ioctl logic for video overlay
   *	output
   * @vidioc_try_fmt_vbi_cap: pointer to the function that implements
   *	:ref:`VIDIOC_TRY_FMT <vidioc_g_fmt>` ioctl logic for raw VBI capture
   * @vidioc_try_fmt_vbi_out: pointer to the function that implements
   *	:ref:`VIDIOC_TRY_FMT <vidioc_g_fmt>` ioctl logic for raw VBI output
   * @vidioc_try_fmt_sliced_vbi_cap: pointer to the function that implements
   *	:ref:`VIDIOC_TRY_FMT <vidioc_g_fmt>` ioctl logic for sliced VBI
   *	capture
   * @vidioc_try_fmt_sliced_vbi_out: pointer to the function that implements
   *	:ref:`VIDIOC_TRY_FMT <vidioc_g_fmt>` ioctl logic for sliced VBI output
   * @vidioc_try_fmt_vid_cap_mplane: pointer to the function that implements
   *	:ref:`VIDIOC_TRY_FMT <vidioc_g_fmt>` ioctl logic for video capture
   *	in multiple plane mode
   * @vidioc_try_fmt_vid_out_mplane: pointer to the function that implements
   *	:ref:`VIDIOC_TRY_FMT <vidioc_g_fmt>` ioctl logic for video out
   *	in multiplane plane mode
   * @vidioc_try_fmt_sdr_cap: pointer to the function that implements
   *	:ref:`VIDIOC_TRY_FMT <vidioc_g_fmt>` ioctl logic for Software Defined
   *	Radio capture
   * @vidioc_try_fmt_sdr_out: pointer to the function that implements
   *	:ref:`VIDIOC_TRY_FMT <vidioc_g_fmt>` ioctl logic for Software Defined
   *	Radio output
   * @vidioc_reqbufs: pointer to the function that implements
   *	:ref:`VIDIOC_REQBUFS <vidioc_reqbufs>` ioctl
   * @vidioc_querybuf: pointer to the function that implements
   *	:ref:`VIDIOC_QUERYBUF <vidioc_querybuf>` ioctl
   * @vidioc_qbuf: pointer to the function that implements
   *	:ref:`VIDIOC_QBUF <vidioc_qbuf>` ioctl
   * @vidioc_expbuf: pointer to the function that implements
   *	:ref:`VIDIOC_EXPBUF <vidioc_expbuf>` ioctl
   * @vidioc_dqbuf: pointer to the function that implements
   *	:ref:`VIDIOC_DQBUF <vidioc_qbuf>` ioctl
   * @vidioc_create_bufs: pointer to the function that implements
   *	:ref:`VIDIOC_CREATE_BUFS <vidioc_create_bufs>` ioctl
   * @vidioc_prepare_buf: pointer to the function that implements
   *	:ref:`VIDIOC_PREPARE_BUF <vidioc_prepare_buf>` ioctl
   * @vidioc_overlay: pointer to the function that implements
   *	:ref:`VIDIOC_OVERLAY <vidioc_overlay>` ioctl
   * @vidioc_g_fbuf: pointer to the function that implements
   *	:ref:`VIDIOC_G_FBUF <vidioc_g_fbuf>` ioctl
   * @vidioc_s_fbuf: pointer to the function that implements
   *	:ref:`VIDIOC_S_FBUF <vidioc_g_fbuf>` ioctl
   * @vidioc_streamon: pointer to the function that implements
   *	:ref:`VIDIOC_STREAMON <vidioc_streamon>` ioctl
   * @vidioc_streamoff: pointer to the function that implements
   *	:ref:`VIDIOC_STREAMOFF <vidioc_streamon>` ioctl
   * @vidioc_g_std: pointer to the function that implements
   *	:ref:`VIDIOC_G_STD <vidioc_g_std>` ioctl
   * @vidioc_s_std: pointer to the function that implements
   *	:ref:`VIDIOC_S_STD <vidioc_g_std>` ioctl
   * @vidioc_querystd: pointer to the function that implements
   *	:ref:`VIDIOC_QUERYSTD <vidioc_querystd>` ioctl
   * @vidioc_enum_input: pointer to the function that implements
   *	:ref:`VIDIOC_ENUM_INPUT <vidioc_g_input>` ioctl
   * @vidioc_g_input: pointer to the function that implements
   *	:ref:`VIDIOC_G_INPUT <vidioc_g_input>` ioctl
   * @vidioc_s_input: pointer to the function that implements
   *	:ref:`VIDIOC_S_INPUT <vidioc_g_input>` ioctl
   * @vidioc_enum_output: pointer to the function that implements
   *	:ref:`VIDIOC_ENUM_OUTPUT <vidioc_g_output>` ioctl
   * @vidioc_g_output: pointer to the function that implements
   *	:ref:`VIDIOC_G_OUTPUT <vidioc_g_output>` ioctl
   * @vidioc_s_output: pointer to the function that implements
   *	:ref:`VIDIOC_S_OUTPUT <vidioc_g_output>` ioctl
   * @vidioc_queryctrl: pointer to the function that implements
   *	:ref:`VIDIOC_QUERYCTRL <vidioc_queryctrl>` ioctl
   * @vidioc_query_ext_ctrl: pointer to the function that implements
   *	:ref:`VIDIOC_QUERY_EXT_CTRL <vidioc_queryctrl>` ioctl
   * @vidioc_g_ctrl: pointer to the function that implements
   *	:ref:`VIDIOC_G_CTRL <vidioc_g_ctrl>` ioctl
   * @vidioc_s_ctrl: pointer to the function that implements
   *	:ref:`VIDIOC_S_CTRL <vidioc_g_ctrl>` ioctl
   * @vidioc_g_ext_ctrls: pointer to the function that implements
   *	:ref:`VIDIOC_G_EXT_CTRLS <vidioc_g_ext_ctrls>` ioctl
   * @vidioc_s_ext_ctrls: pointer to the function that implements
   *	:ref:`VIDIOC_S_EXT_CTRLS <vidioc_g_ext_ctrls>` ioctl
   * @vidioc_try_ext_ctrls: pointer to the function that implements
   *	:ref:`VIDIOC_TRY_EXT_CTRLS <vidioc_g_ext_ctrls>` ioctl
   * @vidioc_querymenu: pointer to the function that implements
   *	:ref:`VIDIOC_QUERYMENU <vidioc_queryctrl>` ioctl
   * @vidioc_enumaudio: pointer to the function that implements
   *	:ref:`VIDIOC_ENUMAUDIO <vidioc_enumaudio>` ioctl
   * @vidioc_g_audio: pointer to the function that implements
   *	:ref:`VIDIOC_G_AUDIO <vidioc_g_audio>` ioctl
   * @vidioc_s_audio: pointer to the function that implements
   *	:ref:`VIDIOC_S_AUDIO <vidioc_g_audio>` ioctl
   * @vidioc_enumaudout: pointer to the function that implements
   *	:ref:`VIDIOC_ENUMAUDOUT <vidioc_enumaudout>` ioctl
   * @vidioc_g_audout: pointer to the function that implements
   *	:ref:`VIDIOC_G_AUDOUT <vidioc_g_audout>` ioctl
   * @vidioc_s_audout: pointer to the function that implements
   *	:ref:`VIDIOC_S_AUDOUT <vidioc_g_audout>` ioctl
   * @vidioc_g_modulator: pointer to the function that implements
   *	:ref:`VIDIOC_G_MODULATOR <vidioc_g_modulator>` ioctl
   * @vidioc_s_modulator: pointer to the function that implements
   *	:ref:`VIDIOC_S_MODULATOR <vidioc_g_modulator>` ioctl
   * @vidioc_cropcap: pointer to the function that implements
   *	:ref:`VIDIOC_CROPCAP <vidioc_cropcap>` ioctl
   * @vidioc_g_crop: pointer to the function that implements
   *	:ref:`VIDIOC_G_CROP <vidioc_g_crop>` ioctl
   * @vidioc_s_crop: pointer to the function that implements
   *	:ref:`VIDIOC_S_CROP <vidioc_g_crop>` ioctl
   * @vidioc_g_selection: pointer to the function that implements
   *	:ref:`VIDIOC_G_SELECTION <vidioc_g_selection>` ioctl
   * @vidioc_s_selection: pointer to the function that implements
   *	:ref:`VIDIOC_S_SELECTION <vidioc_g_selection>` ioctl
   * @vidioc_g_jpegcomp: pointer to the function that implements
   *	:ref:`VIDIOC_G_JPEGCOMP <vidioc_g_jpegcomp>` ioctl
   * @vidioc_s_jpegcomp: pointer to the function that implements
   *	:ref:`VIDIOC_S_JPEGCOMP <vidioc_g_jpegcomp>` ioctl
   * @vidioc_g_enc_index: pointer to the function that implements
   *	:ref:`VIDIOC_G_ENC_INDEX <vidioc_g_enc_index>` ioctl
   * @vidioc_encoder_cmd: pointer to the function that implements
   *	:ref:`VIDIOC_ENCODER_CMD <vidioc_encoder_cmd>` ioctl
   * @vidioc_try_encoder_cmd: pointer to the function that implements
   *	:ref:`VIDIOC_TRY_ENCODER_CMD <vidioc_encoder_cmd>` ioctl
   * @vidioc_decoder_cmd: pointer to the function that implements
   *	:ref:`VIDIOC_DECODER_CMD <vidioc_decoder_cmd>` ioctl
   * @vidioc_try_decoder_cmd: pointer to the function that implements
   *	:ref:`VIDIOC_TRY_DECODER_CMD <vidioc_decoder_cmd>` ioctl
   * @vidioc_g_parm: pointer to the function that implements
   *	:ref:`VIDIOC_G_PARM <vidioc_g_parm>` ioctl
   * @vidioc_s_parm: pointer to the function that implements
   *	:ref:`VIDIOC_S_PARM <vidioc_g_parm>` ioctl
   * @vidioc_g_tuner: pointer to the function that implements
   *	:ref:`VIDIOC_G_TUNER <vidioc_g_tuner>` ioctl
   * @vidioc_s_tuner: pointer to the function that implements
   *	:ref:`VIDIOC_S_TUNER <vidioc_g_tuner>` ioctl
   * @vidioc_g_frequency: pointer to the function that implements
   *	:ref:`VIDIOC_G_FREQUENCY <vidioc_g_frequency>` ioctl
   * @vidioc_s_frequency: pointer to the function that implements
   *	:ref:`VIDIOC_S_FREQUENCY <vidioc_g_frequency>` ioctl
   * @vidioc_enum_freq_bands: pointer to the function that implements
   *	:ref:`VIDIOC_ENUM_FREQ_BANDS <vidioc_enum_freq_bands>` ioctl
   * @vidioc_g_sliced_vbi_cap: pointer to the function that implements
   *	:ref:`VIDIOC_G_SLICED_VBI_CAP <vidioc_g_sliced_vbi_cap>` ioctl
   * @vidioc_log_status: pointer to the function that implements
   *	:ref:`VIDIOC_LOG_STATUS <vidioc_log_status>` ioctl
   * @vidioc_s_hw_freq_seek: pointer to the function that implements
   *	:ref:`VIDIOC_S_HW_FREQ_SEEK <vidioc_s_hw_freq_seek>` ioctl
   * @vidioc_g_register: pointer to the function that implements
   *	:ref:`VIDIOC_DBG_G_REGISTER <vidioc_dbg_g_register>` ioctl
   * @vidioc_s_register: pointer to the function that implements
   *	:ref:`VIDIOC_DBG_S_REGISTER <vidioc_dbg_g_register>` ioctl
   * @vidioc_g_chip_info: pointer to the function that implements
   *	:ref:`VIDIOC_DBG_G_CHIP_INFO <vidioc_dbg_g_chip_info>` ioctl
   * @vidioc_enum_framesizes: pointer to the function that implements
   *	:ref:`VIDIOC_ENUM_FRAMESIZES <vidioc_enum_framesizes>` ioctl
   * @vidioc_enum_frameintervals: pointer to the function that implements
   *	:ref:`VIDIOC_ENUM_FRAMEINTERVALS <vidioc_enum_frameintervals>` ioctl
   * @vidioc_s_dv_timings: pointer to the function that implements
   *	:ref:`VIDIOC_S_DV_TIMINGS <vidioc_g_dv_timings>` ioctl
   * @vidioc_g_dv_timings: pointer to the function that implements
   *	:ref:`VIDIOC_G_DV_TIMINGS <vidioc_g_dv_timings>` ioctl
   * @vidioc_query_dv_timings: pointer to the function that implements
   *	:ref:`VIDIOC_QUERY_DV_TIMINGS <vidioc_query_dv_timings>` ioctl
   * @vidioc_enum_dv_timings: pointer to the function that implements
   *	:ref:`VIDIOC_ENUM_DV_TIMINGS <vidioc_enum_dv_timings>` ioctl
   * @vidioc_dv_timings_cap: pointer to the function that implements
   *	:ref:`VIDIOC_DV_TIMINGS_CAP <vidioc_dv_timings_cap>` ioctl
   * @vidioc_g_edid: pointer to the function that implements
   *	:ref:`VIDIOC_G_EDID <vidioc_g_edid>` ioctl
   * @vidioc_s_edid: pointer to the function that implements
   *	:ref:`VIDIOC_S_EDID <vidioc_g_edid>` ioctl
   * @vidioc_subscribe_event: pointer to the function that implements
   *	:ref:`VIDIOC_SUBSCRIBE_EVENT <vidioc_subscribe_event>` ioctl
   * @vidioc_unsubscribe_event: pointer to the function that implements
   *	:ref:`VIDIOC_UNSUBSCRIBE_EVENT <vidioc_unsubscribe_event>` ioctl
   * @vidioc_default: pointed used to allow other ioctls
   */
a399810ca   Hans Verkuil   V4L/DVB (8482): v...
285
286
287
288
  struct v4l2_ioctl_ops {
  	/* ioctl callbacks */
  
  	/* VIDIOC_QUERYCAP handler */
bba65c132   Mauro Carvalho Chehab   [media] v4l2-ioct...
289
290
  	int (*vidioc_querycap)(struct file *file, void *fh,
  			       struct v4l2_capability *cap);
a399810ca   Hans Verkuil   V4L/DVB (8482): v...
291

a399810ca   Hans Verkuil   V4L/DVB (8482): v...
292
  	/* VIDIOC_ENUM_FMT handlers */
bba65c132   Mauro Carvalho Chehab   [media] v4l2-ioct...
293
294
295
296
297
298
  	int (*vidioc_enum_fmt_vid_cap)(struct file *file, void *fh,
  				       struct v4l2_fmtdesc *f);
  	int (*vidioc_enum_fmt_vid_overlay)(struct file *file, void *fh,
  					   struct v4l2_fmtdesc *f);
  	int (*vidioc_enum_fmt_vid_out)(struct file *file, void *fh,
  				       struct v4l2_fmtdesc *f);
d14e6d76e   Pawel Osciak   [media] v4l: Add ...
299
300
301
302
  	int (*vidioc_enum_fmt_vid_cap_mplane)(struct file *file, void *fh,
  					      struct v4l2_fmtdesc *f);
  	int (*vidioc_enum_fmt_vid_out_mplane)(struct file *file, void *fh,
  					      struct v4l2_fmtdesc *f);
bba65c132   Mauro Carvalho Chehab   [media] v4l2-ioct...
303
304
305
306
  	int (*vidioc_enum_fmt_sdr_cap)(struct file *file, void *fh,
  				       struct v4l2_fmtdesc *f);
  	int (*vidioc_enum_fmt_sdr_out)(struct file *file, void *fh,
  				       struct v4l2_fmtdesc *f);
a399810ca   Hans Verkuil   V4L/DVB (8482): v...
307
308
  
  	/* VIDIOC_G_FMT handlers */
bba65c132   Mauro Carvalho Chehab   [media] v4l2-ioct...
309
310
  	int (*vidioc_g_fmt_vid_cap)(struct file *file, void *fh,
  				    struct v4l2_format *f);
a399810ca   Hans Verkuil   V4L/DVB (8482): v...
311
312
  	int (*vidioc_g_fmt_vid_overlay)(struct file *file, void *fh,
  					struct v4l2_format *f);
bba65c132   Mauro Carvalho Chehab   [media] v4l2-ioct...
313
314
  	int (*vidioc_g_fmt_vid_out)(struct file *file, void *fh,
  				    struct v4l2_format *f);
a399810ca   Hans Verkuil   V4L/DVB (8482): v...
315
  	int (*vidioc_g_fmt_vid_out_overlay)(struct file *file, void *fh,
bba65c132   Mauro Carvalho Chehab   [media] v4l2-ioct...
316
317
318
319
320
  					    struct v4l2_format *f);
  	int (*vidioc_g_fmt_vbi_cap)(struct file *file, void *fh,
  				    struct v4l2_format *f);
  	int (*vidioc_g_fmt_vbi_out)(struct file *file, void *fh,
  				    struct v4l2_format *f);
a399810ca   Hans Verkuil   V4L/DVB (8482): v...
321
  	int (*vidioc_g_fmt_sliced_vbi_cap)(struct file *file, void *fh,
bba65c132   Mauro Carvalho Chehab   [media] v4l2-ioct...
322
  					   struct v4l2_format *f);
a399810ca   Hans Verkuil   V4L/DVB (8482): v...
323
  	int (*vidioc_g_fmt_sliced_vbi_out)(struct file *file, void *fh,
bba65c132   Mauro Carvalho Chehab   [media] v4l2-ioct...
324
  					   struct v4l2_format *f);
d14e6d76e   Pawel Osciak   [media] v4l: Add ...
325
326
327
328
  	int (*vidioc_g_fmt_vid_cap_mplane)(struct file *file, void *fh,
  					   struct v4l2_format *f);
  	int (*vidioc_g_fmt_vid_out_mplane)(struct file *file, void *fh,
  					   struct v4l2_format *f);
bba65c132   Mauro Carvalho Chehab   [media] v4l2-ioct...
329
330
331
332
  	int (*vidioc_g_fmt_sdr_cap)(struct file *file, void *fh,
  				    struct v4l2_format *f);
  	int (*vidioc_g_fmt_sdr_out)(struct file *file, void *fh,
  				    struct v4l2_format *f);
a399810ca   Hans Verkuil   V4L/DVB (8482): v...
333
334
  
  	/* VIDIOC_S_FMT handlers */
bba65c132   Mauro Carvalho Chehab   [media] v4l2-ioct...
335
336
  	int (*vidioc_s_fmt_vid_cap)(struct file *file, void *fh,
  				    struct v4l2_format *f);
a399810ca   Hans Verkuil   V4L/DVB (8482): v...
337
338
  	int (*vidioc_s_fmt_vid_overlay)(struct file *file, void *fh,
  					struct v4l2_format *f);
bba65c132   Mauro Carvalho Chehab   [media] v4l2-ioct...
339
340
  	int (*vidioc_s_fmt_vid_out)(struct file *file, void *fh,
  				    struct v4l2_format *f);
a399810ca   Hans Verkuil   V4L/DVB (8482): v...
341
  	int (*vidioc_s_fmt_vid_out_overlay)(struct file *file, void *fh,
bba65c132   Mauro Carvalho Chehab   [media] v4l2-ioct...
342
343
344
345
346
  					    struct v4l2_format *f);
  	int (*vidioc_s_fmt_vbi_cap)(struct file *file, void *fh,
  				    struct v4l2_format *f);
  	int (*vidioc_s_fmt_vbi_out)(struct file *file, void *fh,
  				    struct v4l2_format *f);
a399810ca   Hans Verkuil   V4L/DVB (8482): v...
347
  	int (*vidioc_s_fmt_sliced_vbi_cap)(struct file *file, void *fh,
bba65c132   Mauro Carvalho Chehab   [media] v4l2-ioct...
348
  					   struct v4l2_format *f);
a399810ca   Hans Verkuil   V4L/DVB (8482): v...
349
  	int (*vidioc_s_fmt_sliced_vbi_out)(struct file *file, void *fh,
bba65c132   Mauro Carvalho Chehab   [media] v4l2-ioct...
350
  					   struct v4l2_format *f);
d14e6d76e   Pawel Osciak   [media] v4l: Add ...
351
352
353
354
  	int (*vidioc_s_fmt_vid_cap_mplane)(struct file *file, void *fh,
  					   struct v4l2_format *f);
  	int (*vidioc_s_fmt_vid_out_mplane)(struct file *file, void *fh,
  					   struct v4l2_format *f);
bba65c132   Mauro Carvalho Chehab   [media] v4l2-ioct...
355
356
357
358
  	int (*vidioc_s_fmt_sdr_cap)(struct file *file, void *fh,
  				    struct v4l2_format *f);
  	int (*vidioc_s_fmt_sdr_out)(struct file *file, void *fh,
  				    struct v4l2_format *f);
a399810ca   Hans Verkuil   V4L/DVB (8482): v...
359
360
  
  	/* VIDIOC_TRY_FMT handlers */
bba65c132   Mauro Carvalho Chehab   [media] v4l2-ioct...
361
362
  	int (*vidioc_try_fmt_vid_cap)(struct file *file, void *fh,
  				      struct v4l2_format *f);
a399810ca   Hans Verkuil   V4L/DVB (8482): v...
363
364
  	int (*vidioc_try_fmt_vid_overlay)(struct file *file, void *fh,
  					  struct v4l2_format *f);
bba65c132   Mauro Carvalho Chehab   [media] v4l2-ioct...
365
366
  	int (*vidioc_try_fmt_vid_out)(struct file *file, void *fh,
  				      struct v4l2_format *f);
a399810ca   Hans Verkuil   V4L/DVB (8482): v...
367
  	int (*vidioc_try_fmt_vid_out_overlay)(struct file *file, void *fh,
bba65c132   Mauro Carvalho Chehab   [media] v4l2-ioct...
368
369
370
371
372
  					     struct v4l2_format *f);
  	int (*vidioc_try_fmt_vbi_cap)(struct file *file, void *fh,
  				      struct v4l2_format *f);
  	int (*vidioc_try_fmt_vbi_out)(struct file *file, void *fh,
  				      struct v4l2_format *f);
a399810ca   Hans Verkuil   V4L/DVB (8482): v...
373
  	int (*vidioc_try_fmt_sliced_vbi_cap)(struct file *file, void *fh,
bba65c132   Mauro Carvalho Chehab   [media] v4l2-ioct...
374
  					     struct v4l2_format *f);
a399810ca   Hans Verkuil   V4L/DVB (8482): v...
375
  	int (*vidioc_try_fmt_sliced_vbi_out)(struct file *file, void *fh,
bba65c132   Mauro Carvalho Chehab   [media] v4l2-ioct...
376
  					     struct v4l2_format *f);
d14e6d76e   Pawel Osciak   [media] v4l: Add ...
377
378
379
380
  	int (*vidioc_try_fmt_vid_cap_mplane)(struct file *file, void *fh,
  					     struct v4l2_format *f);
  	int (*vidioc_try_fmt_vid_out_mplane)(struct file *file, void *fh,
  					     struct v4l2_format *f);
bba65c132   Mauro Carvalho Chehab   [media] v4l2-ioct...
381
382
383
384
  	int (*vidioc_try_fmt_sdr_cap)(struct file *file, void *fh,
  				      struct v4l2_format *f);
  	int (*vidioc_try_fmt_sdr_out)(struct file *file, void *fh,
  				      struct v4l2_format *f);
a399810ca   Hans Verkuil   V4L/DVB (8482): v...
385
386
  
  	/* Buffer handlers */
bba65c132   Mauro Carvalho Chehab   [media] v4l2-ioct...
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
  	int (*vidioc_reqbufs)(struct file *file, void *fh,
  			      struct v4l2_requestbuffers *b);
  	int (*vidioc_querybuf)(struct file *file, void *fh,
  			       struct v4l2_buffer *b);
  	int (*vidioc_qbuf)(struct file *file, void *fh,
  			   struct v4l2_buffer *b);
  	int (*vidioc_expbuf)(struct file *file, void *fh,
  			     struct v4l2_exportbuffer *e);
  	int (*vidioc_dqbuf)(struct file *file, void *fh,
  			    struct v4l2_buffer *b);
  
  	int (*vidioc_create_bufs)(struct file *file, void *fh,
  				  struct v4l2_create_buffers *b);
  	int (*vidioc_prepare_buf)(struct file *file, void *fh,
  				  struct v4l2_buffer *b);
  
  	int (*vidioc_overlay)(struct file *file, void *fh, unsigned int i);
  	int (*vidioc_g_fbuf)(struct file *file, void *fh,
  			     struct v4l2_framebuffer *a);
  	int (*vidioc_s_fbuf)(struct file *file, void *fh,
  			     const struct v4l2_framebuffer *a);
a399810ca   Hans Verkuil   V4L/DVB (8482): v...
408
409
  
  		/* Stream on/off */
bba65c132   Mauro Carvalho Chehab   [media] v4l2-ioct...
410
411
412
413
414
415
416
417
418
  	int (*vidioc_streamon)(struct file *file, void *fh,
  			       enum v4l2_buf_type i);
  	int (*vidioc_streamoff)(struct file *file, void *fh,
  				enum v4l2_buf_type i);
  
  		/*
  		 * Standard handling
  		 *
  		 * Note: ENUMSTD is handled by videodev.c
a399810ca   Hans Verkuil   V4L/DVB (8482): v...
419
  		 */
bba65c132   Mauro Carvalho Chehab   [media] v4l2-ioct...
420
421
422
  	int (*vidioc_g_std)(struct file *file, void *fh, v4l2_std_id *norm);
  	int (*vidioc_s_std)(struct file *file, void *fh, v4l2_std_id norm);
  	int (*vidioc_querystd)(struct file *file, void *fh, v4l2_std_id *a);
a399810ca   Hans Verkuil   V4L/DVB (8482): v...
423
424
425
426
  
  		/* Input handling */
  	int (*vidioc_enum_input)(struct file *file, void *fh,
  				 struct v4l2_input *inp);
bba65c132   Mauro Carvalho Chehab   [media] v4l2-ioct...
427
428
  	int (*vidioc_g_input)(struct file *file, void *fh, unsigned int *i);
  	int (*vidioc_s_input)(struct file *file, void *fh, unsigned int i);
a399810ca   Hans Verkuil   V4L/DVB (8482): v...
429
430
  
  		/* Output handling */
bba65c132   Mauro Carvalho Chehab   [media] v4l2-ioct...
431
  	int (*vidioc_enum_output)(struct file *file, void *fh,
a399810ca   Hans Verkuil   V4L/DVB (8482): v...
432
  				  struct v4l2_output *a);
bba65c132   Mauro Carvalho Chehab   [media] v4l2-ioct...
433
434
  	int (*vidioc_g_output)(struct file *file, void *fh, unsigned int *i);
  	int (*vidioc_s_output)(struct file *file, void *fh, unsigned int i);
a399810ca   Hans Verkuil   V4L/DVB (8482): v...
435
436
  
  		/* Control handling */
bba65c132   Mauro Carvalho Chehab   [media] v4l2-ioct...
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
  	int (*vidioc_queryctrl)(struct file *file, void *fh,
  				struct v4l2_queryctrl *a);
  	int (*vidioc_query_ext_ctrl)(struct file *file, void *fh,
  				     struct v4l2_query_ext_ctrl *a);
  	int (*vidioc_g_ctrl)(struct file *file, void *fh,
  			     struct v4l2_control *a);
  	int (*vidioc_s_ctrl)(struct file *file, void *fh,
  			     struct v4l2_control *a);
  	int (*vidioc_g_ext_ctrls)(struct file *file, void *fh,
  				  struct v4l2_ext_controls *a);
  	int (*vidioc_s_ext_ctrls)(struct file *file, void *fh,
  				  struct v4l2_ext_controls *a);
  	int (*vidioc_try_ext_ctrls)(struct file *file, void *fh,
  				    struct v4l2_ext_controls *a);
  	int (*vidioc_querymenu)(struct file *file, void *fh,
  				struct v4l2_querymenu *a);
a399810ca   Hans Verkuil   V4L/DVB (8482): v...
453
454
  
  	/* Audio ioctls */
bba65c132   Mauro Carvalho Chehab   [media] v4l2-ioct...
455
456
457
458
459
460
  	int (*vidioc_enumaudio)(struct file *file, void *fh,
  				struct v4l2_audio *a);
  	int (*vidioc_g_audio)(struct file *file, void *fh,
  			      struct v4l2_audio *a);
  	int (*vidioc_s_audio)(struct file *file, void *fh,
  			      const struct v4l2_audio *a);
a399810ca   Hans Verkuil   V4L/DVB (8482): v...
461
462
  
  	/* Audio out ioctls */
bba65c132   Mauro Carvalho Chehab   [media] v4l2-ioct...
463
464
465
466
467
468
469
470
471
472
  	int (*vidioc_enumaudout)(struct file *file, void *fh,
  				 struct v4l2_audioout *a);
  	int (*vidioc_g_audout)(struct file *file, void *fh,
  			       struct v4l2_audioout *a);
  	int (*vidioc_s_audout)(struct file *file, void *fh,
  			       const struct v4l2_audioout *a);
  	int (*vidioc_g_modulator)(struct file *file, void *fh,
  				  struct v4l2_modulator *a);
  	int (*vidioc_s_modulator)(struct file *file, void *fh,
  				  const struct v4l2_modulator *a);
a399810ca   Hans Verkuil   V4L/DVB (8482): v...
473
  	/* Crop ioctls */
bba65c132   Mauro Carvalho Chehab   [media] v4l2-ioct...
474
475
476
477
478
479
480
481
482
483
  	int (*vidioc_cropcap)(struct file *file, void *fh,
  			      struct v4l2_cropcap *a);
  	int (*vidioc_g_crop)(struct file *file, void *fh,
  			     struct v4l2_crop *a);
  	int (*vidioc_s_crop)(struct file *file, void *fh,
  			     const struct v4l2_crop *a);
  	int (*vidioc_g_selection)(struct file *file, void *fh,
  				  struct v4l2_selection *s);
  	int (*vidioc_s_selection)(struct file *file, void *fh,
  				  struct v4l2_selection *s);
a399810ca   Hans Verkuil   V4L/DVB (8482): v...
484
  	/* Compression ioctls */
bba65c132   Mauro Carvalho Chehab   [media] v4l2-ioct...
485
486
487
488
489
490
491
492
493
494
495
496
497
498
  	int (*vidioc_g_jpegcomp)(struct file *file, void *fh,
  				 struct v4l2_jpegcompression *a);
  	int (*vidioc_s_jpegcomp)(struct file *file, void *fh,
  				 const struct v4l2_jpegcompression *a);
  	int (*vidioc_g_enc_index)(struct file *file, void *fh,
  				  struct v4l2_enc_idx *a);
  	int (*vidioc_encoder_cmd)(struct file *file, void *fh,
  				  struct v4l2_encoder_cmd *a);
  	int (*vidioc_try_encoder_cmd)(struct file *file, void *fh,
  				      struct v4l2_encoder_cmd *a);
  	int (*vidioc_decoder_cmd)(struct file *file, void *fh,
  				  struct v4l2_decoder_cmd *a);
  	int (*vidioc_try_decoder_cmd)(struct file *file, void *fh,
  				      struct v4l2_decoder_cmd *a);
a399810ca   Hans Verkuil   V4L/DVB (8482): v...
499
500
  
  	/* Stream type-dependent parameter ioctls */
bba65c132   Mauro Carvalho Chehab   [media] v4l2-ioct...
501
502
503
504
  	int (*vidioc_g_parm)(struct file *file, void *fh,
  			     struct v4l2_streamparm *a);
  	int (*vidioc_s_parm)(struct file *file, void *fh,
  			     struct v4l2_streamparm *a);
a399810ca   Hans Verkuil   V4L/DVB (8482): v...
505
506
  
  	/* Tuner ioctls */
bba65c132   Mauro Carvalho Chehab   [media] v4l2-ioct...
507
508
509
510
511
512
513
514
515
516
  	int (*vidioc_g_tuner)(struct file *file, void *fh,
  			      struct v4l2_tuner *a);
  	int (*vidioc_s_tuner)(struct file *file, void *fh,
  			      const struct v4l2_tuner *a);
  	int (*vidioc_g_frequency)(struct file *file, void *fh,
  				  struct v4l2_frequency *a);
  	int (*vidioc_s_frequency)(struct file *file, void *fh,
  				  const struct v4l2_frequency *a);
  	int (*vidioc_enum_freq_bands)(struct file *file, void *fh,
  				      struct v4l2_frequency_band *band);
a399810ca   Hans Verkuil   V4L/DVB (8482): v...
517
518
  
  	/* Sliced VBI cap */
bba65c132   Mauro Carvalho Chehab   [media] v4l2-ioct...
519
520
  	int (*vidioc_g_sliced_vbi_cap)(struct file *file, void *fh,
  				       struct v4l2_sliced_vbi_cap *a);
a399810ca   Hans Verkuil   V4L/DVB (8482): v...
521
522
  
  	/* Log status ioctl */
bba65c132   Mauro Carvalho Chehab   [media] v4l2-ioct...
523
  	int (*vidioc_log_status)(struct file *file, void *fh);
a399810ca   Hans Verkuil   V4L/DVB (8482): v...
524

bba65c132   Mauro Carvalho Chehab   [media] v4l2-ioct...
525
526
  	int (*vidioc_s_hw_freq_seek)(struct file *file, void *fh,
  				     const struct v4l2_hw_freq_seek *a);
a399810ca   Hans Verkuil   V4L/DVB (8482): v...
527
528
529
  
  	/* Debugging ioctls */
  #ifdef CONFIG_VIDEO_ADV_DEBUG
bba65c132   Mauro Carvalho Chehab   [media] v4l2-ioct...
530
531
532
533
  	int (*vidioc_g_register)(struct file *file, void *fh,
  				 struct v4l2_dbg_register *reg);
  	int (*vidioc_s_register)(struct file *file, void *fh,
  				 const struct v4l2_dbg_register *reg);
a399810ca   Hans Verkuil   V4L/DVB (8482): v...
534

bba65c132   Mauro Carvalho Chehab   [media] v4l2-ioct...
535
536
  	int (*vidioc_g_chip_info)(struct file *file, void *fh,
  				  struct v4l2_dbg_chip_info *chip);
cd634f1bf   Hans Verkuil   [media] v4l2: put...
537
  #endif
73d9b3ac9   Oliver Brown   MLK-9662 [V4L2 Ca...
538
539
  	int (*vidioc_g_chip_ident)     (struct file *file, void *fh,
  					struct v4l2_dbg_chip_ident *chip);
79b0c6400   Hans Verkuil   [media] v4l2: add...
540

bba65c132   Mauro Carvalho Chehab   [media] v4l2-ioct...
541
542
  	int (*vidioc_enum_framesizes)(struct file *file, void *fh,
  				      struct v4l2_frmsizeenum *fsize);
74d83fa02   Mauro Carvalho Chehab   V4L/DVB (9578): v...
543

bba65c132   Mauro Carvalho Chehab   [media] v4l2-ioct...
544
545
  	int (*vidioc_enum_frameintervals)(struct file *file, void *fh,
  					  struct v4l2_frmivalenum *fival);
74d83fa02   Mauro Carvalho Chehab   V4L/DVB (9578): v...
546

b6456c0cf   Muralidharan Karicheri   V4L/DVB (13571): ...
547
  	/* DV Timings IOCTLs */
bba65c132   Mauro Carvalho Chehab   [media] v4l2-ioct...
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
  	int (*vidioc_s_dv_timings)(struct file *file, void *fh,
  				   struct v4l2_dv_timings *timings);
  	int (*vidioc_g_dv_timings)(struct file *file, void *fh,
  				   struct v4l2_dv_timings *timings);
  	int (*vidioc_query_dv_timings)(struct file *file, void *fh,
  				       struct v4l2_dv_timings *timings);
  	int (*vidioc_enum_dv_timings)(struct file *file, void *fh,
  				      struct v4l2_enum_dv_timings *timings);
  	int (*vidioc_dv_timings_cap)(struct file *file, void *fh,
  				     struct v4l2_dv_timings_cap *cap);
  	int (*vidioc_g_edid)(struct file *file, void *fh,
  			     struct v4l2_edid *edid);
  	int (*vidioc_s_edid)(struct file *file, void *fh,
  			     struct v4l2_edid *edid);
  
  	int (*vidioc_subscribe_event)(struct v4l2_fh *fh,
  				      const struct v4l2_event_subscription *sub);
d3d7c9635   Sakari Ailus   V4L/DVB: V4L: Eve...
565
  	int (*vidioc_unsubscribe_event)(struct v4l2_fh *fh,
85f5fe396   Hans Verkuil   [media] v4l2: mak...
566
  					const struct v4l2_event_subscription *sub);
d3d7c9635   Sakari Ailus   V4L/DVB: V4L: Eve...
567

a399810ca   Hans Verkuil   V4L/DVB (8482): v...
568
  	/* For other private ioctls */
bba65c132   Mauro Carvalho Chehab   [media] v4l2-ioct...
569
570
  	long (*vidioc_default)(struct file *file, void *fh,
  			       bool valid_prio, unsigned int cmd, void *arg);
a399810ca   Hans Verkuil   V4L/DVB (8482): v...
571
  };
2864462ea   Mauro Carvalho Chehab   V4L/DVB (8434): F...
572
  /* v4l debugging and diagnostics */
17028cdb7   Hans Verkuil   [media] v4l2 core...
573
574
575
576
577
578
579
580
581
582
583
584
  /* Device debug flags to be used with the video device debug attribute */
  
  /* Just log the ioctl name + error code */
  #define V4L2_DEV_DEBUG_IOCTL		0x01
  /* Log the ioctl name arguments + error code */
  #define V4L2_DEV_DEBUG_IOCTL_ARG	0x02
  /* Log the file operations open, release, mmap and get_unmapped_area */
  #define V4L2_DEV_DEBUG_FOP		0x04
  /* Log the read and write file operations and the VIDIOC_(D)QBUF ioctls */
  #define V4L2_DEV_DEBUG_STREAMING	0x08
  /* Log poll() */
  #define V4L2_DEV_DEBUG_POLL		0x10
2864462ea   Mauro Carvalho Chehab   V4L/DVB (8434): F...
585

35ea11ff8   Hans Verkuil   V4L/DVB (8430): v...
586
  /*  Video standard functions  */
bba65c132   Mauro Carvalho Chehab   [media] v4l2-ioct...
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
  
  /**
   * v4l2_norm_to_name - Ancillary routine to analog TV standard name from its ID.
   *
   * @id:	analog TV standard ID.
   *
   * Return: returns a string with the name of the analog TV standard.
   * If the standard is not found or if @id points to multiple standard,
   * it returns "Unknown".
   */
  const char *v4l2_norm_to_name(v4l2_std_id id);
  
  /**
   * v4l2_video_std_frame_period - Ancillary routine that fills a
   *	struct &v4l2_fract pointer with the default framerate fraction.
   *
   * @id: analog TV sdandard ID.
   * @frameperiod: struct &v4l2_fract pointer to be filled
   *
   */
  void v4l2_video_std_frame_period(int id, struct v4l2_fract *frameperiod);
  
  /**
   * v4l2_video_std_construct - Ancillary routine that fills in the fields of
   *	a &v4l2_standard structure according to the @id parameter.
   *
   * @vs: struct &v4l2_standard pointer to be filled
   * @id: analog TV sdandard ID.
   * @name: name of the standard to be used
   *
   * .. note::
   *
   *    This ancillary routine is obsolete. Shouldn't be used on newer drivers.
   */
  int v4l2_video_std_construct(struct v4l2_standard *vs,
35ea11ff8   Hans Verkuil   V4L/DVB (8430): v...
622
  				    int id, const char *name);
35ea11ff8   Hans Verkuil   V4L/DVB (8430): v...
623

bba65c132   Mauro Carvalho Chehab   [media] v4l2-ioct...
624
625
626
627
628
629
630
631
632
633
634
635
636
  /**
   * v4l_printk_ioctl - Ancillary routine that prints the ioctl in a
   *	human-readable format.
   *
   * @prefix: prefix to be added at the ioctl prints.
   * @cmd: ioctl name
   *
   * .. note::
   *
   *    If prefix != %NULL, then it will issue a
   *    ``printk(KERN_DEBUG "%s: ", prefix)`` first.
   */
  void v4l_printk_ioctl(const char *prefix, unsigned int cmd);
5a5adf6b6   Hans Verkuil   [media] v4l2-dev/...
637
  struct video_device;
bba65c132   Mauro Carvalho Chehab   [media] v4l2-ioct...
638
639
640
641
642
643
644
645
646
647
648
649
  
  
  /**
   * v4l2_ioctl_get_lock - get the mutex (if any) that it is need to lock for
   *	a given command.
   *
   * @vdev: Pointer to struct &video_device.
   * @cmd: Ioctl name.
   *
   * .. note:: Internal use only. Should not be used outside V4L2 core.
   */
  struct mutex *v4l2_ioctl_get_lock(struct video_device *vdev, unsigned int cmd);
5a5adf6b6   Hans Verkuil   [media] v4l2-dev/...
650

35ea11ff8   Hans Verkuil   V4L/DVB (8430): v...
651
652
653
  /* names for fancy debug output */
  extern const char *v4l2_field_names[];
  extern const char *v4l2_type_names[];
bec43661b   Hans Verkuil   V4L/DVB (10135): ...
654
  #ifdef CONFIG_COMPAT
bba65c132   Mauro Carvalho Chehab   [media] v4l2-ioct...
655
656
657
658
659
660
661
662
663
  /**
   * v4l2_compat_ioctl32 -32 Bits compatibility layer for 64 bits processors
   *
   * @file: Pointer to struct &file.
   * @cmd: Ioctl name.
   * @arg: Ioctl argument.
   */
  long int v4l2_compat_ioctl32(struct file *file, unsigned int cmd,
  			     unsigned long arg);
bec43661b   Hans Verkuil   V4L/DVB (10135): ...
664
  #endif
35ea11ff8   Hans Verkuil   V4L/DVB (8430): v...
665

bba65c132   Mauro Carvalho Chehab   [media] v4l2-ioct...
666
667
668
669
670
671
672
673
  /**
   * typedef v4l2_kioctl - Typedef used to pass an ioctl handler.
   *
   * @file: Pointer to struct &file.
   * @cmd: Ioctl name.
   * @arg: Ioctl argument.
   */
  typedef long (*v4l2_kioctl)(struct file *file, unsigned int cmd, void *arg);
08af245de   Hans Verkuil   [media] V4L: remo...
674

bba65c132   Mauro Carvalho Chehab   [media] v4l2-ioct...
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
  /**
   * video_usercopy - copies data from/to userspace memory when an ioctl is
   *	issued.
   *
   * @file: Pointer to struct &file.
   * @cmd: Ioctl name.
   * @arg: Ioctl argument.
   * @func: function that will handle the ioctl
   *
   * .. note::
   *
   *    This routine should be used only inside the V4L2 core.
   */
  long int video_usercopy(struct file *file, unsigned int cmd,
  			unsigned long int arg, v4l2_kioctl func);
35ea11ff8   Hans Verkuil   V4L/DVB (8430): v...
690

bba65c132   Mauro Carvalho Chehab   [media] v4l2-ioct...
691
692
693
694
695
696
697
698
699
700
701
702
  /**
   * video_ioctl2 - Handles a V4L2 ioctl.
   *
   * @file: Pointer to struct &file.
   * @cmd: Ioctl name.
   * @arg: Ioctl argument.
   *
   * Method used to hancle an ioctl. Should be used to fill the
   * &v4l2_ioctl_ops.unlocked_ioctl on all V4L2 drivers.
   */
  long int video_ioctl2(struct file *file,
  		      unsigned int cmd, unsigned long int arg);
8a522c916   Mauro Carvalho Chehab   V4L/DVB (9331): R...
703

35ea11ff8   Hans Verkuil   V4L/DVB (8430): v...
704
  #endif /* _V4L2_IOCTL_H */