diff options
-rw-r--r-- | drivers/media/video/videodev.c | 35 | ||||
-rw-r--r-- | include/media/v4l2-dev.h | 10 |
2 files changed, 36 insertions, 9 deletions
diff --git a/drivers/media/video/videodev.c b/drivers/media/video/videodev.c index 4d58b55095d7..83106bba100d 100644 --- a/drivers/media/video/videodev.c +++ b/drivers/media/video/videodev.c | |||
@@ -840,8 +840,8 @@ static int __video_do_ioctl(struct inode *inode, struct file *file, | |||
840 | ret=vfd->vidioc_enum_fmt_vbi(file, fh, f); | 840 | ret=vfd->vidioc_enum_fmt_vbi(file, fh, f); |
841 | break; | 841 | break; |
842 | case V4L2_BUF_TYPE_SLICED_VBI_OUTPUT: | 842 | case V4L2_BUF_TYPE_SLICED_VBI_OUTPUT: |
843 | if (vfd->vidioc_enum_fmt_vbi_output) | 843 | if (vfd->vidioc_enum_fmt_sliced_vbi_output) |
844 | ret=vfd->vidioc_enum_fmt_vbi_output(file, | 844 | ret = vfd->vidioc_enum_fmt_sliced_vbi_output(file, |
845 | fh, f); | 845 | fh, f); |
846 | break; | 846 | break; |
847 | case V4L2_BUF_TYPE_SLICED_VBI_CAPTURE: | 847 | case V4L2_BUF_TYPE_SLICED_VBI_CAPTURE: |
@@ -905,8 +905,8 @@ static int __video_do_ioctl(struct inode *inode, struct file *file, | |||
905 | ret=vfd->vidioc_g_fmt_vbi(file, fh, f); | 905 | ret=vfd->vidioc_g_fmt_vbi(file, fh, f); |
906 | break; | 906 | break; |
907 | case V4L2_BUF_TYPE_SLICED_VBI_OUTPUT: | 907 | case V4L2_BUF_TYPE_SLICED_VBI_OUTPUT: |
908 | if (vfd->vidioc_g_fmt_vbi_output) | 908 | if (vfd->vidioc_g_fmt_sliced_vbi_output) |
909 | ret=vfd->vidioc_g_fmt_vbi_output(file, fh, f); | 909 | ret = vfd->vidioc_g_fmt_sliced_vbi_output(file, fh, f); |
910 | break; | 910 | break; |
911 | case V4L2_BUF_TYPE_SLICED_VBI_CAPTURE: | 911 | case V4L2_BUF_TYPE_SLICED_VBI_CAPTURE: |
912 | if (vfd->vidioc_g_fmt_vbi_capture) | 912 | if (vfd->vidioc_g_fmt_vbi_capture) |
@@ -957,8 +957,8 @@ static int __video_do_ioctl(struct inode *inode, struct file *file, | |||
957 | ret=vfd->vidioc_s_fmt_vbi(file, fh, f); | 957 | ret=vfd->vidioc_s_fmt_vbi(file, fh, f); |
958 | break; | 958 | break; |
959 | case V4L2_BUF_TYPE_SLICED_VBI_OUTPUT: | 959 | case V4L2_BUF_TYPE_SLICED_VBI_OUTPUT: |
960 | if (vfd->vidioc_s_fmt_vbi_output) | 960 | if (vfd->vidioc_s_fmt_sliced_vbi_output) |
961 | ret=vfd->vidioc_s_fmt_vbi_output(file, fh, f); | 961 | ret = vfd->vidioc_s_fmt_sliced_vbi_output(file, fh, f); |
962 | break; | 962 | break; |
963 | case V4L2_BUF_TYPE_SLICED_VBI_CAPTURE: | 963 | case V4L2_BUF_TYPE_SLICED_VBI_CAPTURE: |
964 | if (vfd->vidioc_s_fmt_vbi_capture) | 964 | if (vfd->vidioc_s_fmt_vbi_capture) |
@@ -1009,8 +1009,8 @@ static int __video_do_ioctl(struct inode *inode, struct file *file, | |||
1009 | ret=vfd->vidioc_try_fmt_vbi(file, fh, f); | 1009 | ret=vfd->vidioc_try_fmt_vbi(file, fh, f); |
1010 | break; | 1010 | break; |
1011 | case V4L2_BUF_TYPE_SLICED_VBI_OUTPUT: | 1011 | case V4L2_BUF_TYPE_SLICED_VBI_OUTPUT: |
1012 | if (vfd->vidioc_try_fmt_vbi_output) | 1012 | if (vfd->vidioc_try_fmt_sliced_vbi_output) |
1013 | ret=vfd->vidioc_try_fmt_vbi_output(file, | 1013 | ret = vfd->vidioc_try_fmt_sliced_vbi_output(file, |
1014 | fh, f); | 1014 | fh, f); |
1015 | break; | 1015 | break; |
1016 | case V4L2_BUF_TYPE_SLICED_VBI_CAPTURE: | 1016 | case V4L2_BUF_TYPE_SLICED_VBI_CAPTURE: |
@@ -1297,6 +1297,25 @@ static int __video_do_ioctl(struct inode *inode, struct file *file, | |||
1297 | } | 1297 | } |
1298 | 1298 | ||
1299 | /* ------ output switching ---------- */ | 1299 | /* ------ output switching ---------- */ |
1300 | case VIDIOC_ENUMOUTPUT: | ||
1301 | { | ||
1302 | struct v4l2_output *p = arg; | ||
1303 | int i = p->index; | ||
1304 | |||
1305 | if (!vfd->vidioc_enum_output) | ||
1306 | break; | ||
1307 | memset(p, 0, sizeof(*p)); | ||
1308 | p->index = i; | ||
1309 | |||
1310 | ret = vfd->vidioc_enum_output(file, fh, p); | ||
1311 | if (!ret) | ||
1312 | dbgarg(cmd, "index=%d, name=%s, type=%d, " | ||
1313 | "audioset=%d, " | ||
1314 | "modulator=%d, std=%08Lx\n", | ||
1315 | p->index, p->name, p->type, p->audioset, | ||
1316 | p->modulator, (unsigned long long)p->std); | ||
1317 | break; | ||
1318 | } | ||
1300 | case VIDIOC_G_OUTPUT: | 1319 | case VIDIOC_G_OUTPUT: |
1301 | { | 1320 | { |
1302 | unsigned int *i = arg; | 1321 | unsigned int *i = arg; |
diff --git a/include/media/v4l2-dev.h b/include/media/v4l2-dev.h index 8a40f481d899..f14181fae6ce 100644 --- a/include/media/v4l2-dev.h +++ b/include/media/v4l2-dev.h | |||
@@ -132,6 +132,8 @@ struct video_device | |||
132 | struct v4l2_fmtdesc *f); | 132 | struct v4l2_fmtdesc *f); |
133 | int (*vidioc_enum_fmt_vbi_output) (struct file *file, void *fh, | 133 | int (*vidioc_enum_fmt_vbi_output) (struct file *file, void *fh, |
134 | struct v4l2_fmtdesc *f); | 134 | struct v4l2_fmtdesc *f); |
135 | int (*vidioc_enum_fmt_sliced_vbi_output) (struct file *file, void *fh, | ||
136 | struct v4l2_fmtdesc *f); | ||
135 | int (*vidioc_enum_fmt_type_private)(struct file *file, void *fh, | 137 | int (*vidioc_enum_fmt_type_private)(struct file *file, void *fh, |
136 | struct v4l2_fmtdesc *f); | 138 | struct v4l2_fmtdesc *f); |
137 | 139 | ||
@@ -144,6 +146,8 @@ struct video_device | |||
144 | struct v4l2_format *f); | 146 | struct v4l2_format *f); |
145 | int (*vidioc_g_fmt_vbi_output) (struct file *file, void *fh, | 147 | int (*vidioc_g_fmt_vbi_output) (struct file *file, void *fh, |
146 | struct v4l2_format *f); | 148 | struct v4l2_format *f); |
149 | int (*vidioc_g_fmt_sliced_vbi_output) (struct file *file, void *fh, | ||
150 | struct v4l2_format *f); | ||
147 | int (*vidioc_g_fmt_vbi_capture)(struct file *file, void *fh, | 151 | int (*vidioc_g_fmt_vbi_capture)(struct file *file, void *fh, |
148 | struct v4l2_format *f); | 152 | struct v4l2_format *f); |
149 | int (*vidioc_g_fmt_video_output)(struct file *file, void *fh, | 153 | int (*vidioc_g_fmt_video_output)(struct file *file, void *fh, |
@@ -163,6 +167,8 @@ struct video_device | |||
163 | struct v4l2_format *f); | 167 | struct v4l2_format *f); |
164 | int (*vidioc_s_fmt_vbi_output) (struct file *file, void *fh, | 168 | int (*vidioc_s_fmt_vbi_output) (struct file *file, void *fh, |
165 | struct v4l2_format *f); | 169 | struct v4l2_format *f); |
170 | int (*vidioc_s_fmt_sliced_vbi_output) (struct file *file, void *fh, | ||
171 | struct v4l2_format *f); | ||
166 | int (*vidioc_s_fmt_vbi_capture)(struct file *file, void *fh, | 172 | int (*vidioc_s_fmt_vbi_capture)(struct file *file, void *fh, |
167 | struct v4l2_format *f); | 173 | struct v4l2_format *f); |
168 | int (*vidioc_s_fmt_video_output)(struct file *file, void *fh, | 174 | int (*vidioc_s_fmt_video_output)(struct file *file, void *fh, |
@@ -181,6 +187,8 @@ struct video_device | |||
181 | struct v4l2_format *f); | 187 | struct v4l2_format *f); |
182 | int (*vidioc_try_fmt_vbi_output) (struct file *file, void *fh, | 188 | int (*vidioc_try_fmt_vbi_output) (struct file *file, void *fh, |
183 | struct v4l2_format *f); | 189 | struct v4l2_format *f); |
190 | int (*vidioc_try_fmt_sliced_vbi_output) (struct file *file, void *fh, | ||
191 | struct v4l2_format *f); | ||
184 | int (*vidioc_try_fmt_vbi_capture)(struct file *file, void *fh, | 192 | int (*vidioc_try_fmt_vbi_capture)(struct file *file, void *fh, |
185 | struct v4l2_format *f); | 193 | struct v4l2_format *f); |
186 | int (*vidioc_try_fmt_video_output)(struct file *file, void *fh, | 194 | int (*vidioc_try_fmt_video_output)(struct file *file, void *fh, |
@@ -225,7 +233,7 @@ struct video_device | |||
225 | int (*vidioc_s_input) (struct file *file, void *fh, unsigned int i); | 233 | int (*vidioc_s_input) (struct file *file, void *fh, unsigned int i); |
226 | 234 | ||
227 | /* Output handling */ | 235 | /* Output handling */ |
228 | int (*vidioc_enumoutput) (struct file *file, void *fh, | 236 | int (*vidioc_enum_output) (struct file *file, void *fh, |
229 | struct v4l2_output *a); | 237 | struct v4l2_output *a); |
230 | int (*vidioc_g_output) (struct file *file, void *fh, unsigned int *i); | 238 | int (*vidioc_g_output) (struct file *file, void *fh, unsigned int *i); |
231 | int (*vidioc_s_output) (struct file *file, void *fh, unsigned int i); | 239 | int (*vidioc_s_output) (struct file *file, void *fh, unsigned int i); |