aboutsummaryrefslogtreecommitdiffstats
path: root/include/media/v4l2-dev.h
diff options
context:
space:
mode:
authorDavid Woodhouse <David.Woodhouse@intel.com>2008-07-25 10:40:14 -0400
committerDavid Woodhouse <David.Woodhouse@intel.com>2008-07-25 10:40:14 -0400
commitff877ea80efa2015b6263766f78ee42c2a1b32f9 (patch)
tree85205005c611ab774702148558321c6fb92f1ccd /include/media/v4l2-dev.h
parent30821fee4f0cb3e6d241d9f7ddc37742212e3eb7 (diff)
parentd37e6bf68fc1eb34a4ad21d9ae8890ed37ea80e7 (diff)
Merge branch 'linux-next' of git://git.infradead.org/~dedekind/ubi-2.6
Diffstat (limited to 'include/media/v4l2-dev.h')
-rw-r--r--include/media/v4l2-dev.h83
1 files changed, 46 insertions, 37 deletions
diff --git a/include/media/v4l2-dev.h b/include/media/v4l2-dev.h
index 859f7a6f6f67..33f379b1ecfe 100644
--- a/include/media/v4l2-dev.h
+++ b/include/media/v4l2-dev.h
@@ -59,8 +59,8 @@ enum v4l2_priority v4l2_prio_max(struct v4l2_prio_state *global);
59int v4l2_prio_check(struct v4l2_prio_state *global, enum v4l2_priority *local); 59int v4l2_prio_check(struct v4l2_prio_state *global, enum v4l2_priority *local);
60 60
61/* names for fancy debug output */ 61/* names for fancy debug output */
62extern char *v4l2_field_names[]; 62extern const char *v4l2_field_names[];
63extern char *v4l2_type_names[]; 63extern const char *v4l2_type_names[];
64 64
65/* Compatibility layer interface -- v4l1-compat module */ 65/* Compatibility layer interface -- v4l1-compat module */
66typedef int (*v4l2_kioctl)(struct inode *inode, struct file *file, 66typedef int (*v4l2_kioctl)(struct inode *inode, struct file *file,
@@ -96,6 +96,8 @@ struct video_device
96 int type; /* v4l1 */ 96 int type; /* v4l1 */
97 int type2; /* v4l2 */ 97 int type2; /* v4l2 */
98 int minor; 98 int minor;
99 /* attribute to diferentiate multiple indexs on one physical device */
100 int index;
99 101
100 int debug; /* Activates debug level*/ 102 int debug; /* Activates debug level*/
101 103
@@ -118,74 +120,76 @@ struct video_device
118 enum v4l2_priority p); 120 enum v4l2_priority p);
119 121
120 /* VIDIOC_ENUM_FMT handlers */ 122 /* VIDIOC_ENUM_FMT handlers */
121 int (*vidioc_enum_fmt_cap) (struct file *file, void *fh, 123 int (*vidioc_enum_fmt_vid_cap) (struct file *file, void *fh,
122 struct v4l2_fmtdesc *f); 124 struct v4l2_fmtdesc *f);
123 int (*vidioc_enum_fmt_overlay) (struct file *file, void *fh, 125 int (*vidioc_enum_fmt_vid_overlay) (struct file *file, void *fh,
124 struct v4l2_fmtdesc *f); 126 struct v4l2_fmtdesc *f);
125 int (*vidioc_enum_fmt_vbi) (struct file *file, void *fh, 127 int (*vidioc_enum_fmt_vid_out) (struct file *file, void *fh,
126 struct v4l2_fmtdesc *f); 128 struct v4l2_fmtdesc *f);
127 int (*vidioc_enum_fmt_vbi_capture) (struct file *file, void *fh, 129#if 1
128 struct v4l2_fmtdesc *f); 130 /* deprecated, will be removed in 2.6.28 */
129 int (*vidioc_enum_fmt_video_output)(struct file *file, void *fh, 131 int (*vidioc_enum_fmt_vbi_cap) (struct file *file, void *fh,
130 struct v4l2_fmtdesc *f);
131 int (*vidioc_enum_fmt_output_overlay) (struct file *file, void *fh,
132 struct v4l2_fmtdesc *f);
133 int (*vidioc_enum_fmt_vbi_output) (struct file *file, void *fh,
134 struct v4l2_fmtdesc *f); 132 struct v4l2_fmtdesc *f);
133#endif
135 int (*vidioc_enum_fmt_type_private)(struct file *file, void *fh, 134 int (*vidioc_enum_fmt_type_private)(struct file *file, void *fh,
136 struct v4l2_fmtdesc *f); 135 struct v4l2_fmtdesc *f);
137 136
138 /* VIDIOC_G_FMT handlers */ 137 /* VIDIOC_G_FMT handlers */
139 int (*vidioc_g_fmt_cap) (struct file *file, void *fh, 138 int (*vidioc_g_fmt_vid_cap) (struct file *file, void *fh,
140 struct v4l2_format *f); 139 struct v4l2_format *f);
141 int (*vidioc_g_fmt_overlay) (struct file *file, void *fh, 140 int (*vidioc_g_fmt_vid_overlay)(struct file *file, void *fh,
142 struct v4l2_format *f); 141 struct v4l2_format *f);
143 int (*vidioc_g_fmt_vbi) (struct file *file, void *fh, 142 int (*vidioc_g_fmt_vid_out) (struct file *file, void *fh,
144 struct v4l2_format *f); 143 struct v4l2_format *f);
145 int (*vidioc_g_fmt_vbi_output) (struct file *file, void *fh, 144 int (*vidioc_g_fmt_vid_out_overlay)(struct file *file, void *fh,
146 struct v4l2_format *f); 145 struct v4l2_format *f);
147 int (*vidioc_g_fmt_vbi_capture)(struct file *file, void *fh, 146 int (*vidioc_g_fmt_vbi_cap) (struct file *file, void *fh,
148 struct v4l2_format *f); 147 struct v4l2_format *f);
149 int (*vidioc_g_fmt_video_output)(struct file *file, void *fh, 148 int (*vidioc_g_fmt_vbi_out) (struct file *file, void *fh,
150 struct v4l2_format *f); 149 struct v4l2_format *f);
151 int (*vidioc_g_fmt_output_overlay) (struct file *file, void *fh, 150 int (*vidioc_g_fmt_sliced_vbi_cap)(struct file *file, void *fh,
151 struct v4l2_format *f);
152 int (*vidioc_g_fmt_sliced_vbi_out)(struct file *file, void *fh,
152 struct v4l2_format *f); 153 struct v4l2_format *f);
153 int (*vidioc_g_fmt_type_private)(struct file *file, void *fh, 154 int (*vidioc_g_fmt_type_private)(struct file *file, void *fh,
154 struct v4l2_format *f); 155 struct v4l2_format *f);
155 156
156 /* VIDIOC_S_FMT handlers */ 157 /* VIDIOC_S_FMT handlers */
157 int (*vidioc_s_fmt_cap) (struct file *file, void *fh, 158 int (*vidioc_s_fmt_vid_cap) (struct file *file, void *fh,
158 struct v4l2_format *f); 159 struct v4l2_format *f);
159 160 int (*vidioc_s_fmt_vid_overlay)(struct file *file, void *fh,
160 int (*vidioc_s_fmt_overlay) (struct file *file, void *fh,
161 struct v4l2_format *f); 161 struct v4l2_format *f);
162 int (*vidioc_s_fmt_vbi) (struct file *file, void *fh, 162 int (*vidioc_s_fmt_vid_out) (struct file *file, void *fh,
163 struct v4l2_format *f); 163 struct v4l2_format *f);
164 int (*vidioc_s_fmt_vbi_output) (struct file *file, void *fh, 164 int (*vidioc_s_fmt_vid_out_overlay)(struct file *file, void *fh,
165 struct v4l2_format *f); 165 struct v4l2_format *f);
166 int (*vidioc_s_fmt_vbi_capture)(struct file *file, void *fh, 166 int (*vidioc_s_fmt_vbi_cap) (struct file *file, void *fh,
167 struct v4l2_format *f); 167 struct v4l2_format *f);
168 int (*vidioc_s_fmt_video_output)(struct file *file, void *fh, 168 int (*vidioc_s_fmt_vbi_out) (struct file *file, void *fh,
169 struct v4l2_format *f); 169 struct v4l2_format *f);
170 int (*vidioc_s_fmt_output_overlay) (struct file *file, void *fh, 170 int (*vidioc_s_fmt_sliced_vbi_cap)(struct file *file, void *fh,
171 struct v4l2_format *f);
172 int (*vidioc_s_fmt_sliced_vbi_out)(struct file *file, void *fh,
171 struct v4l2_format *f); 173 struct v4l2_format *f);
172 int (*vidioc_s_fmt_type_private)(struct file *file, void *fh, 174 int (*vidioc_s_fmt_type_private)(struct file *file, void *fh,
173 struct v4l2_format *f); 175 struct v4l2_format *f);
174 176
175 /* VIDIOC_TRY_FMT handlers */ 177 /* VIDIOC_TRY_FMT handlers */
176 int (*vidioc_try_fmt_cap) (struct file *file, void *fh, 178 int (*vidioc_try_fmt_vid_cap) (struct file *file, void *fh,
179 struct v4l2_format *f);
180 int (*vidioc_try_fmt_vid_overlay)(struct file *file, void *fh,
177 struct v4l2_format *f); 181 struct v4l2_format *f);
178 int (*vidioc_try_fmt_overlay) (struct file *file, void *fh, 182 int (*vidioc_try_fmt_vid_out) (struct file *file, void *fh,
179 struct v4l2_format *f); 183 struct v4l2_format *f);
180 int (*vidioc_try_fmt_vbi) (struct file *file, void *fh, 184 int (*vidioc_try_fmt_vid_out_overlay)(struct file *file, void *fh,
181 struct v4l2_format *f); 185 struct v4l2_format *f);
182 int (*vidioc_try_fmt_vbi_output) (struct file *file, void *fh, 186 int (*vidioc_try_fmt_vbi_cap) (struct file *file, void *fh,
183 struct v4l2_format *f); 187 struct v4l2_format *f);
184 int (*vidioc_try_fmt_vbi_capture)(struct file *file, void *fh, 188 int (*vidioc_try_fmt_vbi_out) (struct file *file, void *fh,
185 struct v4l2_format *f); 189 struct v4l2_format *f);
186 int (*vidioc_try_fmt_video_output)(struct file *file, void *fh, 190 int (*vidioc_try_fmt_sliced_vbi_cap)(struct file *file, void *fh,
187 struct v4l2_format *f); 191 struct v4l2_format *f);
188 int (*vidioc_try_fmt_output_overlay)(struct file *file, void *fh, 192 int (*vidioc_try_fmt_sliced_vbi_out)(struct file *file, void *fh,
189 struct v4l2_format *f); 193 struct v4l2_format *f);
190 int (*vidioc_try_fmt_type_private)(struct file *file, void *fh, 194 int (*vidioc_try_fmt_type_private)(struct file *file, void *fh,
191 struct v4l2_format *f); 195 struct v4l2_format *f);
@@ -212,8 +216,9 @@ struct video_device
212 int (*vidioc_streamoff)(struct file *file, void *fh, enum v4l2_buf_type i); 216 int (*vidioc_streamoff)(struct file *file, void *fh, enum v4l2_buf_type i);
213 217
214 /* Standard handling 218 /* Standard handling
215 G_STD and ENUMSTD are handled by videodev.c 219 ENUMSTD is handled by videodev.c
216 */ 220 */
221 int (*vidioc_g_std) (struct file *file, void *fh, v4l2_std_id *norm);
217 int (*vidioc_s_std) (struct file *file, void *fh, v4l2_std_id *norm); 222 int (*vidioc_s_std) (struct file *file, void *fh, v4l2_std_id *norm);
218 int (*vidioc_querystd) (struct file *file, void *fh, v4l2_std_id *a); 223 int (*vidioc_querystd) (struct file *file, void *fh, v4l2_std_id *a);
219 224
@@ -224,7 +229,7 @@ struct video_device
224 int (*vidioc_s_input) (struct file *file, void *fh, unsigned int i); 229 int (*vidioc_s_input) (struct file *file, void *fh, unsigned int i);
225 230
226 /* Output handling */ 231 /* Output handling */
227 int (*vidioc_enumoutput) (struct file *file, void *fh, 232 int (*vidioc_enum_output) (struct file *file, void *fh,
228 struct v4l2_output *a); 233 struct v4l2_output *a);
229 int (*vidioc_g_output) (struct file *file, void *fh, unsigned int *i); 234 int (*vidioc_g_output) (struct file *file, void *fh, unsigned int *i);
230 int (*vidioc_s_output) (struct file *file, void *fh, unsigned int i); 235 int (*vidioc_s_output) (struct file *file, void *fh, unsigned int i);
@@ -306,6 +311,8 @@ struct video_device
306 /* Log status ioctl */ 311 /* Log status ioctl */
307 int (*vidioc_log_status) (struct file *file, void *fh); 312 int (*vidioc_log_status) (struct file *file, void *fh);
308 313
314 int (*vidioc_s_hw_freq_seek) (struct file *file, void *fh,
315 struct v4l2_hw_freq_seek *a);
309 316
310 /* Debugging ioctls */ 317 /* Debugging ioctls */
311#ifdef CONFIG_VIDEO_ADV_DEBUG 318#ifdef CONFIG_VIDEO_ADV_DEBUG
@@ -342,6 +349,8 @@ void *priv;
342 349
343/* Version 2 functions */ 350/* Version 2 functions */
344extern int video_register_device(struct video_device *vfd, int type, int nr); 351extern int video_register_device(struct video_device *vfd, int type, int nr);
352int video_register_device_index(struct video_device *vfd, int type, int nr,
353 int index);
345void video_unregister_device(struct video_device *); 354void video_unregister_device(struct video_device *);
346extern int video_ioctl2(struct inode *inode, struct file *file, 355extern int video_ioctl2(struct inode *inode, struct file *file,
347 unsigned int cmd, unsigned long arg); 356 unsigned int cmd, unsigned long arg);
@@ -366,7 +375,7 @@ video_device_create_file(struct video_device *vfd,
366{ 375{
367 int ret = device_create_file(&vfd->class_dev, attr); 376 int ret = device_create_file(&vfd->class_dev, attr);
368 if (ret < 0) 377 if (ret < 0)
369 printk(KERN_WARNING "%s error: %d\n", __FUNCTION__, ret); 378 printk(KERN_WARNING "%s error: %d\n", __func__, ret);
370 return ret; 379 return ret;
371} 380}
372static inline void 381static inline void