summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2008-05-28 00:31:43 +0200
committerHans Verkuil <hverkuil@xs4all.nl>2008-05-28 00:31:43 +0200
commit6e4b5e2932a7b9c24f308ca4d33e525e85ad9276 (patch)
treec9d46cb8b4d371bf90d0acae25b564e1cd2105c7
parentdb9c8e1db5a3ac5b6012c4371bcf3b1a00190d0e (diff)
downloadmediapointer-dvb-s2-6e4b5e2932a7b9c24f308ca4d33e525e85ad9276.tar.gz
mediapointer-dvb-s2-6e4b5e2932a7b9c24f308ca4d33e525e85ad9276.tar.bz2
videodev: add missing vidioc_try_fmt_sliced_vbi_output and VIDIOC_ENUMOUTPUT handling
From: Hans Verkuil <hverkuil@xs4all.nl> There was no vidioc_try_fmt_sliced_vbi_output, instead vidioc_try_fmt_vbi_output was reused. The VIDIOC_ENUMOUTPUT handling was missing altogether, even though the callback existed. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
-rw-r--r--linux/drivers/media/video/videodev.c35
-rw-r--r--linux/include/media/v4l2-dev.h10
2 files changed, 36 insertions, 9 deletions
diff --git a/linux/drivers/media/video/videodev.c b/linux/drivers/media/video/videodev.c
index 4f04a1260..989003733 100644
--- a/linux/drivers/media/video/videodev.c
+++ b/linux/drivers/media/video/videodev.c
@@ -927,8 +927,8 @@ static int __video_do_ioctl(struct inode *inode, struct file *file,
ret=vfd->vidioc_enum_fmt_vbi(file, fh, f);
break;
case V4L2_BUF_TYPE_SLICED_VBI_OUTPUT:
- if (vfd->vidioc_enum_fmt_vbi_output)
- ret=vfd->vidioc_enum_fmt_vbi_output(file,
+ if (vfd->vidioc_enum_fmt_sliced_vbi_output)
+ ret = vfd->vidioc_enum_fmt_sliced_vbi_output(file,
fh, f);
break;
case V4L2_BUF_TYPE_SLICED_VBI_CAPTURE:
@@ -992,8 +992,8 @@ static int __video_do_ioctl(struct inode *inode, struct file *file,
ret=vfd->vidioc_g_fmt_vbi(file, fh, f);
break;
case V4L2_BUF_TYPE_SLICED_VBI_OUTPUT:
- if (vfd->vidioc_g_fmt_vbi_output)
- ret=vfd->vidioc_g_fmt_vbi_output(file, fh, f);
+ if (vfd->vidioc_g_fmt_sliced_vbi_output)
+ ret = vfd->vidioc_g_fmt_sliced_vbi_output(file, fh, f);
break;
case V4L2_BUF_TYPE_SLICED_VBI_CAPTURE:
if (vfd->vidioc_g_fmt_vbi_capture)
@@ -1044,8 +1044,8 @@ static int __video_do_ioctl(struct inode *inode, struct file *file,
ret=vfd->vidioc_s_fmt_vbi(file, fh, f);
break;
case V4L2_BUF_TYPE_SLICED_VBI_OUTPUT:
- if (vfd->vidioc_s_fmt_vbi_output)
- ret=vfd->vidioc_s_fmt_vbi_output(file, fh, f);
+ if (vfd->vidioc_s_fmt_sliced_vbi_output)
+ ret = vfd->vidioc_s_fmt_sliced_vbi_output(file, fh, f);
break;
case V4L2_BUF_TYPE_SLICED_VBI_CAPTURE:
if (vfd->vidioc_s_fmt_vbi_capture)
@@ -1096,8 +1096,8 @@ static int __video_do_ioctl(struct inode *inode, struct file *file,
ret=vfd->vidioc_try_fmt_vbi(file, fh, f);
break;
case V4L2_BUF_TYPE_SLICED_VBI_OUTPUT:
- if (vfd->vidioc_try_fmt_vbi_output)
- ret=vfd->vidioc_try_fmt_vbi_output(file,
+ if (vfd->vidioc_try_fmt_sliced_vbi_output)
+ ret = vfd->vidioc_try_fmt_sliced_vbi_output(file,
fh, f);
break;
case V4L2_BUF_TYPE_SLICED_VBI_CAPTURE:
@@ -1439,6 +1439,25 @@ static int __video_do_ioctl(struct inode *inode, struct file *file,
}
/* ------ output switching ---------- */
+ case VIDIOC_ENUMOUTPUT:
+ {
+ struct v4l2_output *p = arg;
+ int i = p->index;
+
+ if (!vfd->vidioc_enum_output)
+ break;
+ memset(p, 0, sizeof(*p));
+ p->index = i;
+
+ ret = vfd->vidioc_enum_output(file, fh, p);
+ if (!ret)
+ dbgarg(cmd, "index=%d, name=%s, type=%d, "
+ "audioset=%d, "
+ "modulator=%d, std=%08Lx\n",
+ p->index, p->name, p->type, p->audioset,
+ p->modulator, (unsigned long long)p->std);
+ break;
+ }
case VIDIOC_G_OUTPUT:
{
unsigned int *i = arg;
diff --git a/linux/include/media/v4l2-dev.h b/linux/include/media/v4l2-dev.h
index d1ccd701e..2fdd6d2ef 100644
--- a/linux/include/media/v4l2-dev.h
+++ b/linux/include/media/v4l2-dev.h
@@ -148,6 +148,8 @@ struct video_device
struct v4l2_fmtdesc *f);
int (*vidioc_enum_fmt_vbi_output) (struct file *file, void *fh,
struct v4l2_fmtdesc *f);
+ int (*vidioc_enum_fmt_sliced_vbi_output) (struct file *file, void *fh,
+ struct v4l2_fmtdesc *f);
int (*vidioc_enum_fmt_type_private)(struct file *file, void *fh,
struct v4l2_fmtdesc *f);
@@ -160,6 +162,8 @@ struct video_device
struct v4l2_format *f);
int (*vidioc_g_fmt_vbi_output) (struct file *file, void *fh,
struct v4l2_format *f);
+ int (*vidioc_g_fmt_sliced_vbi_output) (struct file *file, void *fh,
+ struct v4l2_format *f);
int (*vidioc_g_fmt_vbi_capture)(struct file *file, void *fh,
struct v4l2_format *f);
int (*vidioc_g_fmt_video_output)(struct file *file, void *fh,
@@ -179,6 +183,8 @@ struct video_device
struct v4l2_format *f);
int (*vidioc_s_fmt_vbi_output) (struct file *file, void *fh,
struct v4l2_format *f);
+ int (*vidioc_s_fmt_sliced_vbi_output) (struct file *file, void *fh,
+ struct v4l2_format *f);
int (*vidioc_s_fmt_vbi_capture)(struct file *file, void *fh,
struct v4l2_format *f);
int (*vidioc_s_fmt_video_output)(struct file *file, void *fh,
@@ -197,6 +203,8 @@ struct video_device
struct v4l2_format *f);
int (*vidioc_try_fmt_vbi_output) (struct file *file, void *fh,
struct v4l2_format *f);
+ int (*vidioc_try_fmt_sliced_vbi_output) (struct file *file, void *fh,
+ struct v4l2_format *f);
int (*vidioc_try_fmt_vbi_capture)(struct file *file, void *fh,
struct v4l2_format *f);
int (*vidioc_try_fmt_video_output)(struct file *file, void *fh,
@@ -241,7 +249,7 @@ struct video_device
int (*vidioc_s_input) (struct file *file, void *fh, unsigned int i);
/* Output handling */
- int (*vidioc_enumoutput) (struct file *file, void *fh,
+ 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);