aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/common
diff options
context:
space:
mode:
authorTrent Piepho <xyzzy@speakeasy.org>2009-03-03 23:21:03 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-03-30 11:43:06 -0400
commit717167e8ae13a61649a1faf867279440fee70b56 (patch)
tree11b33390052d7408d96ac684c2f41a89ab3323ed /drivers/media/common
parent51f0b8d57af501624ee55e8ca15d09d5bdc2b0dd (diff)
V4L/DVB (10814): saa7146: some small fixes
vidioc_enum_fmt_vid_overlay() did nothing but call vidioc_enum_fmt_vid_cap(), so just make saa7146_video_ioctl_ops.vidioc_enum_fmt_vid_overlay point to vidioc_enum_fmt_vid_cap() and get ride of vidioc_enum_fmt_vid_overlay(). Have gparm use v4l2_video_std_frame_period to fill in the frame period instead of just assuming PAL. Signed-off-by: Trent Piepho <xyzzy@speakeasy.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/common')
-rw-r--r--drivers/media/common/saa7146_video.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/drivers/media/common/saa7146_video.c b/drivers/media/common/saa7146_video.c
index 8d8cb7ff3478..80352853bb5d 100644
--- a/drivers/media/common/saa7146_video.c
+++ b/drivers/media/common/saa7146_video.c
@@ -576,11 +576,6 @@ static int vidioc_enum_fmt_vid_cap(struct file *file, void *fh, struct v4l2_fmtd
576 return 0; 576 return 0;
577} 577}
578 578
579static int vidioc_enum_fmt_vid_overlay(struct file *file, void *fh, struct v4l2_fmtdesc *f)
580{
581 return vidioc_enum_fmt_vid_cap(file, fh, f);
582}
583
584static int vidioc_queryctrl(struct file *file, void *fh, struct v4l2_queryctrl *c) 579static int vidioc_queryctrl(struct file *file, void *fh, struct v4l2_queryctrl *c)
585{ 580{
586 const struct v4l2_queryctrl *ctrl; 581 const struct v4l2_queryctrl *ctrl;
@@ -725,12 +720,14 @@ static int vidioc_s_ctrl(struct file *file, void *fh, struct v4l2_control *c)
725static int vidioc_g_parm(struct file *file, void *fh, 720static int vidioc_g_parm(struct file *file, void *fh,
726 struct v4l2_streamparm *parm) 721 struct v4l2_streamparm *parm)
727{ 722{
723 struct saa7146_dev *dev = ((struct saa7146_fh *)fh)->dev;
724 struct saa7146_vv *vv = dev->vv_data;
725
728 if (parm->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) 726 if (parm->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
729 return -EINVAL; 727 return -EINVAL;
730 parm->parm.capture.readbuffers = 1; 728 parm->parm.capture.readbuffers = 1;
731 /* fixme: only for PAL! */ 729 v4l2_video_std_frame_period(vv->standard->id,
732 parm->parm.capture.timeperframe.numerator = 1; 730 &parm->parm.capture.timeperframe);
733 parm->parm.capture.timeperframe.denominator = 25;
734 return 0; 731 return 0;
735} 732}
736 733
@@ -1164,7 +1161,7 @@ static int vidiocgmbuf(struct file *file, void *__fh, struct video_mbuf *mbuf)
1164const struct v4l2_ioctl_ops saa7146_video_ioctl_ops = { 1161const struct v4l2_ioctl_ops saa7146_video_ioctl_ops = {
1165 .vidioc_querycap = vidioc_querycap, 1162 .vidioc_querycap = vidioc_querycap,
1166 .vidioc_enum_fmt_vid_cap = vidioc_enum_fmt_vid_cap, 1163 .vidioc_enum_fmt_vid_cap = vidioc_enum_fmt_vid_cap,
1167 .vidioc_enum_fmt_vid_overlay = vidioc_enum_fmt_vid_overlay, 1164 .vidioc_enum_fmt_vid_overlay = vidioc_enum_fmt_vid_cap,
1168 .vidioc_g_fmt_vid_cap = vidioc_g_fmt_vid_cap, 1165 .vidioc_g_fmt_vid_cap = vidioc_g_fmt_vid_cap,
1169 .vidioc_try_fmt_vid_cap = vidioc_try_fmt_vid_cap, 1166 .vidioc_try_fmt_vid_cap = vidioc_try_fmt_vid_cap,
1170 .vidioc_s_fmt_vid_cap = vidioc_s_fmt_vid_cap, 1167 .vidioc_s_fmt_vid_cap = vidioc_s_fmt_vid_cap,