| 
									
										
										
										
											2008-07-20 08:12:02 -03:00
										 |  |  | /*
 | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  *	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>
 | 
					
						
							|  |  |  | #include <linux/mutex.h>
 | 
					
						
							|  |  |  | #include <linux/compiler.h> /* need __user */
 | 
					
						
							|  |  |  | #include <linux/videodev2.h>
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-03-27 11:02:10 -03:00
										 |  |  | struct v4l2_fh; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-07-21 02:57:38 -03:00
										 |  |  | struct v4l2_ioctl_ops { | 
					
						
							|  |  |  | 	/* ioctl callbacks */ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	/* VIDIOC_QUERYCAP handler */ | 
					
						
							|  |  |  | 	int (*vidioc_querycap)(struct file *file, void *fh, struct v4l2_capability *cap); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	/* Priority handling */ | 
					
						
							|  |  |  | 	int (*vidioc_g_priority)   (struct file *file, void *fh, | 
					
						
							|  |  |  | 				    enum v4l2_priority *p); | 
					
						
							|  |  |  | 	int (*vidioc_s_priority)   (struct file *file, void *fh, | 
					
						
							|  |  |  | 				    enum v4l2_priority p); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	/* VIDIOC_ENUM_FMT handlers */ | 
					
						
							|  |  |  | 	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); | 
					
						
							| 
									
										
										
										
											2010-12-23 04:15:27 -03:00
										 |  |  | 	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); | 
					
						
							| 
									
										
										
										
											2013-12-14 13:10:20 -03:00
										 |  |  | 	int (*vidioc_enum_fmt_sdr_cap)     (struct file *file, void *fh, | 
					
						
							|  |  |  | 					    struct v4l2_fmtdesc *f); | 
					
						
							| 
									
										
										
										
											2008-07-21 02:57:38 -03:00
										 |  |  | 
 | 
					
						
							|  |  |  | 	/* VIDIOC_G_FMT handlers */ | 
					
						
							|  |  |  | 	int (*vidioc_g_fmt_vid_cap)    (struct file *file, void *fh, | 
					
						
							|  |  |  | 					struct v4l2_format *f); | 
					
						
							|  |  |  | 	int (*vidioc_g_fmt_vid_overlay)(struct file *file, void *fh, | 
					
						
							|  |  |  | 					struct v4l2_format *f); | 
					
						
							|  |  |  | 	int (*vidioc_g_fmt_vid_out)    (struct file *file, void *fh, | 
					
						
							|  |  |  | 					struct v4l2_format *f); | 
					
						
							|  |  |  | 	int (*vidioc_g_fmt_vid_out_overlay)(struct file *file, void *fh, | 
					
						
							|  |  |  | 					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); | 
					
						
							|  |  |  | 	int (*vidioc_g_fmt_sliced_vbi_cap)(struct file *file, void *fh, | 
					
						
							|  |  |  | 					struct v4l2_format *f); | 
					
						
							|  |  |  | 	int (*vidioc_g_fmt_sliced_vbi_out)(struct file *file, void *fh, | 
					
						
							|  |  |  | 					struct v4l2_format *f); | 
					
						
							| 
									
										
										
										
											2010-12-23 04:15:27 -03:00
										 |  |  | 	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); | 
					
						
							| 
									
										
										
										
											2013-12-14 13:10:20 -03:00
										 |  |  | 	int (*vidioc_g_fmt_sdr_cap)    (struct file *file, void *fh, | 
					
						
							|  |  |  | 					struct v4l2_format *f); | 
					
						
							| 
									
										
										
										
											2008-07-21 02:57:38 -03:00
										 |  |  | 
 | 
					
						
							|  |  |  | 	/* VIDIOC_S_FMT handlers */ | 
					
						
							|  |  |  | 	int (*vidioc_s_fmt_vid_cap)    (struct file *file, void *fh, | 
					
						
							|  |  |  | 					struct v4l2_format *f); | 
					
						
							|  |  |  | 	int (*vidioc_s_fmt_vid_overlay)(struct file *file, void *fh, | 
					
						
							|  |  |  | 					struct v4l2_format *f); | 
					
						
							|  |  |  | 	int (*vidioc_s_fmt_vid_out)    (struct file *file, void *fh, | 
					
						
							|  |  |  | 					struct v4l2_format *f); | 
					
						
							|  |  |  | 	int (*vidioc_s_fmt_vid_out_overlay)(struct file *file, void *fh, | 
					
						
							|  |  |  | 					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); | 
					
						
							|  |  |  | 	int (*vidioc_s_fmt_sliced_vbi_cap)(struct file *file, void *fh, | 
					
						
							|  |  |  | 					struct v4l2_format *f); | 
					
						
							|  |  |  | 	int (*vidioc_s_fmt_sliced_vbi_out)(struct file *file, void *fh, | 
					
						
							|  |  |  | 					struct v4l2_format *f); | 
					
						
							| 
									
										
										
										
											2010-12-23 04:15:27 -03:00
										 |  |  | 	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); | 
					
						
							| 
									
										
										
										
											2013-12-14 13:10:20 -03:00
										 |  |  | 	int (*vidioc_s_fmt_sdr_cap)    (struct file *file, void *fh, | 
					
						
							|  |  |  | 					struct v4l2_format *f); | 
					
						
							| 
									
										
										
										
											2008-07-21 02:57:38 -03:00
										 |  |  | 
 | 
					
						
							|  |  |  | 	/* VIDIOC_TRY_FMT handlers */ | 
					
						
							|  |  |  | 	int (*vidioc_try_fmt_vid_cap)    (struct file *file, void *fh, | 
					
						
							|  |  |  | 					  struct v4l2_format *f); | 
					
						
							|  |  |  | 	int (*vidioc_try_fmt_vid_overlay)(struct file *file, void *fh, | 
					
						
							|  |  |  | 					  struct v4l2_format *f); | 
					
						
							|  |  |  | 	int (*vidioc_try_fmt_vid_out)    (struct file *file, void *fh, | 
					
						
							|  |  |  | 					  struct v4l2_format *f); | 
					
						
							|  |  |  | 	int (*vidioc_try_fmt_vid_out_overlay)(struct file *file, void *fh, | 
					
						
							|  |  |  | 					  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); | 
					
						
							|  |  |  | 	int (*vidioc_try_fmt_sliced_vbi_cap)(struct file *file, void *fh, | 
					
						
							|  |  |  | 					  struct v4l2_format *f); | 
					
						
							|  |  |  | 	int (*vidioc_try_fmt_sliced_vbi_out)(struct file *file, void *fh, | 
					
						
							|  |  |  | 					  struct v4l2_format *f); | 
					
						
							| 
									
										
										
										
											2010-12-23 04:15:27 -03:00
										 |  |  | 	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); | 
					
						
							| 
									
										
										
										
											2013-12-14 13:10:20 -03:00
										 |  |  | 	int (*vidioc_try_fmt_sdr_cap)    (struct file *file, void *fh, | 
					
						
							|  |  |  | 					  struct v4l2_format *f); | 
					
						
							| 
									
										
										
										
											2008-07-21 02:57:38 -03:00
										 |  |  | 
 | 
					
						
							|  |  |  | 	/* Buffer handlers */ | 
					
						
							|  |  |  | 	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); | 
					
						
							| 
									
										
										
										
											2012-06-14 11:32:23 -03:00
										 |  |  | 	int (*vidioc_expbuf)  (struct file *file, void *fh, | 
					
						
							|  |  |  | 				struct v4l2_exportbuffer *e); | 
					
						
							| 
									
										
										
										
											2008-07-21 02:57:38 -03:00
										 |  |  | 	int (*vidioc_dqbuf)   (struct file *file, void *fh, struct v4l2_buffer *b); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-09-28 11:34:06 -03:00
										 |  |  | 	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); | 
					
						
							| 
									
										
										
										
											2008-07-21 02:57:38 -03:00
										 |  |  | 
 | 
					
						
							|  |  |  | 	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, | 
					
						
							| 
									
										
										
										
											2012-09-04 10:26:45 -03:00
										 |  |  | 				const struct v4l2_framebuffer *a); | 
					
						
							| 
									
										
										
										
											2008-07-21 02:57:38 -03:00
										 |  |  | 
 | 
					
						
							|  |  |  | 		/* Stream on/off */ | 
					
						
							|  |  |  | 	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
 | 
					
						
							|  |  |  | 			ENUMSTD is handled by videodev.c | 
					
						
							|  |  |  | 		 */ | 
					
						
							|  |  |  | 	int (*vidioc_g_std) (struct file *file, void *fh, v4l2_std_id *norm); | 
					
						
							| 
									
										
										
										
											2013-03-15 06:10:40 -03:00
										 |  |  | 	int (*vidioc_s_std) (struct file *file, void *fh, v4l2_std_id norm); | 
					
						
							| 
									
										
										
										
											2008-07-21 02:57:38 -03:00
										 |  |  | 	int (*vidioc_querystd) (struct file *file, void *fh, v4l2_std_id *a); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 		/* Input handling */ | 
					
						
							|  |  |  | 	int (*vidioc_enum_input)(struct file *file, void *fh, | 
					
						
							|  |  |  | 				 struct v4l2_input *inp); | 
					
						
							|  |  |  | 	int (*vidioc_g_input)   (struct file *file, void *fh, unsigned int *i); | 
					
						
							|  |  |  | 	int (*vidioc_s_input)   (struct file *file, void *fh, unsigned int i); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 		/* Output handling */ | 
					
						
							|  |  |  | 	int (*vidioc_enum_output) (struct file *file, void *fh, | 
					
						
							|  |  |  | 				  struct v4l2_output *a); | 
					
						
							|  |  |  | 	int (*vidioc_g_output)   (struct file *file, void *fh, unsigned int *i); | 
					
						
							|  |  |  | 	int (*vidioc_s_output)   (struct file *file, void *fh, unsigned int i); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 		/* Control handling */ | 
					
						
							|  |  |  | 	int (*vidioc_queryctrl)        (struct file *file, void *fh, | 
					
						
							|  |  |  | 					struct v4l2_queryctrl *a); | 
					
						
							| 
									
										
										
										
											2014-06-10 04:22:06 -03:00
										 |  |  | 	int (*vidioc_query_ext_ctrl)   (struct file *file, void *fh, | 
					
						
							|  |  |  | 					struct v4l2_query_ext_ctrl *a); | 
					
						
							| 
									
										
										
										
											2008-07-21 02:57:38 -03:00
										 |  |  | 	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); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	/* Audio ioctls */ | 
					
						
							|  |  |  | 	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, | 
					
						
							| 
									
										
										
										
											2012-09-04 11:59:31 -03:00
										 |  |  | 					const struct v4l2_audio *a); | 
					
						
							| 
									
										
										
										
											2008-07-21 02:57:38 -03:00
										 |  |  | 
 | 
					
						
							|  |  |  | 	/* Audio out ioctls */ | 
					
						
							|  |  |  | 	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, | 
					
						
							| 
									
										
										
										
											2012-09-04 12:03:49 -03:00
										 |  |  | 					const struct v4l2_audioout *a); | 
					
						
							| 
									
										
										
										
											2008-07-21 02:57:38 -03:00
										 |  |  | 	int (*vidioc_g_modulator)      (struct file *file, void *fh, | 
					
						
							|  |  |  | 					struct v4l2_modulator *a); | 
					
						
							|  |  |  | 	int (*vidioc_s_modulator)      (struct file *file, void *fh, | 
					
						
							| 
									
										
										
										
											2012-09-04 12:08:47 -03:00
										 |  |  | 					const struct v4l2_modulator *a); | 
					
						
							| 
									
										
										
										
											2008-07-21 02:57:38 -03:00
										 |  |  | 	/* Crop ioctls */ | 
					
						
							|  |  |  | 	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, | 
					
						
							| 
									
										
										
										
											2012-09-05 05:10:48 -03:00
										 |  |  | 					const struct v4l2_crop *a); | 
					
						
							| 
									
										
										
										
											2011-08-10 10:37:47 -03:00
										 |  |  | 	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); | 
					
						
							| 
									
										
										
										
											2008-07-21 02:57:38 -03:00
										 |  |  | 	/* Compression ioctls */ | 
					
						
							|  |  |  | 	int (*vidioc_g_jpegcomp)       (struct file *file, void *fh, | 
					
						
							|  |  |  | 					struct v4l2_jpegcompression *a); | 
					
						
							|  |  |  | 	int (*vidioc_s_jpegcomp)       (struct file *file, void *fh, | 
					
						
							| 
									
										
										
										
											2012-09-17 05:05:25 -03:00
										 |  |  | 					const struct v4l2_jpegcompression *a); | 
					
						
							| 
									
										
										
										
											2008-07-21 02:57:38 -03:00
										 |  |  | 	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); | 
					
						
							| 
									
										
										
										
											2011-11-24 09:53:43 -03:00
										 |  |  | 	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); | 
					
						
							| 
									
										
										
										
											2008-07-21 02:57:38 -03:00
										 |  |  | 
 | 
					
						
							|  |  |  | 	/* Stream type-dependent parameter ioctls */ | 
					
						
							|  |  |  | 	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); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	/* Tuner ioctls */ | 
					
						
							|  |  |  | 	int (*vidioc_g_tuner)          (struct file *file, void *fh, | 
					
						
							|  |  |  | 					struct v4l2_tuner *a); | 
					
						
							|  |  |  | 	int (*vidioc_s_tuner)          (struct file *file, void *fh, | 
					
						
							| 
									
										
										
										
											2013-03-15 06:10:06 -03:00
										 |  |  | 					const struct v4l2_tuner *a); | 
					
						
							| 
									
										
										
										
											2008-07-21 02:57:38 -03:00
										 |  |  | 	int (*vidioc_g_frequency)      (struct file *file, void *fh, | 
					
						
							|  |  |  | 					struct v4l2_frequency *a); | 
					
						
							|  |  |  | 	int (*vidioc_s_frequency)      (struct file *file, void *fh, | 
					
						
							| 
									
										
										
										
											2013-03-19 04:09:26 -03:00
										 |  |  | 					const struct v4l2_frequency *a); | 
					
						
							| 
									
										
										
										
											2012-07-05 06:37:08 -03:00
										 |  |  | 	int (*vidioc_enum_freq_bands) (struct file *file, void *fh, | 
					
						
							|  |  |  | 				    struct v4l2_frequency_band *band); | 
					
						
							| 
									
										
										
										
											2008-07-21 02:57:38 -03:00
										 |  |  | 
 | 
					
						
							|  |  |  | 	/* Sliced VBI cap */ | 
					
						
							|  |  |  | 	int (*vidioc_g_sliced_vbi_cap) (struct file *file, void *fh, | 
					
						
							|  |  |  | 					struct v4l2_sliced_vbi_cap *a); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	/* Log status ioctl */ | 
					
						
							|  |  |  | 	int (*vidioc_log_status)       (struct file *file, void *fh); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	int (*vidioc_s_hw_freq_seek)   (struct file *file, void *fh, | 
					
						
							| 
									
										
										
										
											2012-09-14 07:41:18 -03:00
										 |  |  | 					const struct v4l2_hw_freq_seek *a); | 
					
						
							| 
									
										
										
										
											2008-07-21 02:57:38 -03:00
										 |  |  | 
 | 
					
						
							|  |  |  | 	/* Debugging ioctls */ | 
					
						
							|  |  |  | #ifdef CONFIG_VIDEO_ADV_DEBUG
 | 
					
						
							|  |  |  | 	int (*vidioc_g_register)       (struct file *file, void *fh, | 
					
						
							| 
									
										
										
										
											2008-12-30 07:14:19 -03:00
										 |  |  | 					struct v4l2_dbg_register *reg); | 
					
						
							| 
									
										
										
										
											2008-07-21 02:57:38 -03:00
										 |  |  | 	int (*vidioc_s_register)       (struct file *file, void *fh, | 
					
						
							| 
									
										
										
										
											2013-03-24 08:28:46 -03:00
										 |  |  | 					const struct v4l2_dbg_register *reg); | 
					
						
							| 
									
										
										
										
											2008-07-21 02:57:38 -03:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2013-04-06 06:16:58 -03:00
										 |  |  | 	int (*vidioc_g_chip_info)      (struct file *file, void *fh, | 
					
						
							|  |  |  | 					struct v4l2_dbg_chip_info *chip); | 
					
						
							| 
									
										
										
										
											2013-03-27 08:04:23 -03:00
										 |  |  | #endif
 | 
					
						
							| 
									
										
										
										
											2013-03-18 12:16:34 -03:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-11-11 21:13:47 -03:00
										 |  |  | 	int (*vidioc_enum_framesizes)   (struct file *file, void *fh, | 
					
						
							|  |  |  | 					 struct v4l2_frmsizeenum *fsize); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	int (*vidioc_enum_frameintervals) (struct file *file, void *fh, | 
					
						
							|  |  |  | 					   struct v4l2_frmivalenum *fival); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-19 12:00:31 -03:00
										 |  |  | 	/* DV Timings IOCTLs */ | 
					
						
							|  |  |  | 	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); | 
					
						
							| 
									
										
										
										
											2012-05-15 08:06:44 -03:00
										 |  |  | 	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); | 
					
						
							| 
									
										
										
										
											2014-03-07 07:18:37 -03:00
										 |  |  | 	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); | 
					
						
							| 
									
										
										
										
											2009-11-19 12:00:31 -03:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-03-27 11:02:10 -03:00
										 |  |  | 	int (*vidioc_subscribe_event)  (struct v4l2_fh *fh, | 
					
						
							| 
									
										
										
										
											2012-09-04 11:46:09 -03:00
										 |  |  | 					const struct v4l2_event_subscription *sub); | 
					
						
							| 
									
										
										
										
											2010-03-27 11:02:10 -03:00
										 |  |  | 	int (*vidioc_unsubscribe_event)(struct v4l2_fh *fh, | 
					
						
							| 
									
										
										
										
											2012-09-04 11:46:09 -03:00
										 |  |  | 					const struct v4l2_event_subscription *sub); | 
					
						
							| 
									
										
										
										
											2010-03-27 11:02:10 -03:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-07-21 02:57:38 -03:00
										 |  |  | 	/* For other private ioctls */ | 
					
						
							| 
									
										
										
										
											2008-12-30 07:04:34 -03:00
										 |  |  | 	long (*vidioc_default)	       (struct file *file, void *fh, | 
					
						
							| 
									
										
										
										
											2013-03-26 08:04:52 -03:00
										 |  |  | 					bool valid_prio, unsigned int cmd, void *arg); | 
					
						
							| 
									
										
										
										
											2008-07-21 02:57:38 -03:00
										 |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-07-20 20:26:54 -03:00
										 |  |  | /* v4l debugging and diagnostics */ | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-12-01 10:10:44 -03:00
										 |  |  | /* 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
 | 
					
						
							| 
									
										
										
										
											2008-07-20 20:26:54 -03:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-07-20 08:12:02 -03:00
										 |  |  | /*  Video standard functions  */ | 
					
						
							|  |  |  | extern const char *v4l2_norm_to_name(v4l2_std_id id); | 
					
						
							| 
									
										
										
										
											2009-03-04 01:21:02 -03:00
										 |  |  | extern void v4l2_video_std_frame_period(int id, struct v4l2_fract *frameperiod); | 
					
						
							| 
									
										
										
										
											2008-07-20 08:12:02 -03:00
										 |  |  | extern int v4l2_video_std_construct(struct v4l2_standard *vs, | 
					
						
							|  |  |  | 				    int id, const char *name); | 
					
						
							| 
									
										
										
										
											2012-06-22 06:38:06 -03:00
										 |  |  | /* Prints the ioctl in a human-readable format. If prefix != NULL,
 | 
					
						
							|  |  |  |    then do printk(KERN_DEBUG "%s: ", prefix) first. */ | 
					
						
							|  |  |  | extern void v4l_printk_ioctl(const char *prefix, unsigned int cmd); | 
					
						
							| 
									
										
										
										
											2008-07-20 08:12:02 -03:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-06-22 07:29:35 -03:00
										 |  |  | /* Internal use only: get the mutex (if any) that we need to lock for the
 | 
					
						
							|  |  |  |    given command. */ | 
					
						
							|  |  |  | struct video_device; | 
					
						
							|  |  |  | extern struct mutex *v4l2_ioctl_get_lock(struct video_device *vdev, unsigned cmd); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-07-20 08:12:02 -03:00
										 |  |  | /* names for fancy debug output */ | 
					
						
							|  |  |  | extern const char *v4l2_field_names[]; | 
					
						
							|  |  |  | extern const char *v4l2_type_names[]; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-12-30 06:58:20 -03:00
										 |  |  | #ifdef CONFIG_COMPAT
 | 
					
						
							| 
									
										
										
										
											2008-07-20 08:12:02 -03:00
										 |  |  | /* 32 Bits compatibility layer for 64 bits processors */ | 
					
						
							| 
									
										
										
										
											2008-12-30 06:42:40 -03:00
										 |  |  | extern long v4l2_compat_ioctl32(struct file *file, unsigned int cmd, | 
					
						
							| 
									
										
										
										
											2008-07-20 08:12:02 -03:00
										 |  |  | 				unsigned long arg); | 
					
						
							| 
									
										
										
										
											2008-12-30 06:58:20 -03:00
										 |  |  | #endif
 | 
					
						
							| 
									
										
										
										
											2008-07-20 08:12:02 -03:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-12-24 10:33:19 -03:00
										 |  |  | typedef long (*v4l2_kioctl)(struct file *file, | 
					
						
							|  |  |  | 		unsigned int cmd, void *arg); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-07-20 08:12:02 -03:00
										 |  |  | /* Include support for obsoleted stuff */ | 
					
						
							| 
									
										
										
										
											2008-12-30 07:04:34 -03:00
										 |  |  | extern long video_usercopy(struct file *file, unsigned int cmd, | 
					
						
							| 
									
										
										
										
											2008-11-01 08:25:11 -03:00
										 |  |  | 				unsigned long arg, v4l2_kioctl func); | 
					
						
							| 
									
										
										
										
											2008-07-20 08:12:02 -03:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-10-21 11:58:39 -03:00
										 |  |  | /* Standard handlers for V4L ioctl's */ | 
					
						
							| 
									
										
										
										
											2008-12-30 07:04:34 -03:00
										 |  |  | extern long video_ioctl2(struct file *file, | 
					
						
							| 
									
										
										
										
											2008-10-21 11:58:39 -03:00
										 |  |  | 			unsigned int cmd, unsigned long arg); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-07-20 08:12:02 -03:00
										 |  |  | #endif /* _V4L2_IOCTL_H */
 |