diff options
Diffstat (limited to 'drivers/media/common/saa7146_video.c')
-rw-r--r-- | drivers/media/common/saa7146_video.c | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/drivers/media/common/saa7146_video.c b/drivers/media/common/saa7146_video.c index 8dd4d15ca36d..1d961023b837 100644 --- a/drivers/media/common/saa7146_video.c +++ b/drivers/media/common/saa7146_video.c | |||
@@ -150,23 +150,23 @@ static int try_win(struct saa7146_dev *dev, struct v4l2_window *win) | |||
150 | maxh = vv->standard->v_max_out; | 150 | maxh = vv->standard->v_max_out; |
151 | 151 | ||
152 | if (V4L2_FIELD_ANY == field) { | 152 | if (V4L2_FIELD_ANY == field) { |
153 | field = (win->w.height > maxh/2) | 153 | field = (win->w.height > maxh/2) |
154 | ? V4L2_FIELD_INTERLACED | 154 | ? V4L2_FIELD_INTERLACED |
155 | : V4L2_FIELD_TOP; | 155 | : V4L2_FIELD_TOP; |
156 | } | 156 | } |
157 | switch (field) { | 157 | switch (field) { |
158 | case V4L2_FIELD_TOP: | 158 | case V4L2_FIELD_TOP: |
159 | case V4L2_FIELD_BOTTOM: | 159 | case V4L2_FIELD_BOTTOM: |
160 | case V4L2_FIELD_ALTERNATE: | 160 | case V4L2_FIELD_ALTERNATE: |
161 | maxh = maxh / 2; | 161 | maxh = maxh / 2; |
162 | break; | 162 | break; |
163 | case V4L2_FIELD_INTERLACED: | 163 | case V4L2_FIELD_INTERLACED: |
164 | break; | 164 | break; |
165 | default: { | 165 | default: { |
166 | DEB_D(("no known field mode '%d'.\n",field)); | 166 | DEB_D(("no known field mode '%d'.\n",field)); |
167 | return -EINVAL; | 167 | return -EINVAL; |
168 | } | ||
168 | } | 169 | } |
169 | } | ||
170 | 170 | ||
171 | win->field = field; | 171 | win->field = field; |
172 | if (win->w.width > maxw) | 172 | if (win->w.width > maxw) |
@@ -887,7 +887,7 @@ int saa7146_video_do_ioctl(struct inode *inode, struct file *file, unsigned int | |||
887 | 887 | ||
888 | DEB_EE(("VIDIOC_QUERYCAP\n")); | 888 | DEB_EE(("VIDIOC_QUERYCAP\n")); |
889 | 889 | ||
890 | strcpy(cap->driver, "saa7146 v4l2"); | 890 | strcpy(cap->driver, "saa7146 v4l2"); |
891 | strlcpy(cap->card, dev->ext->name, sizeof(cap->card)); | 891 | strlcpy(cap->card, dev->ext->name, sizeof(cap->card)); |
892 | sprintf(cap->bus_info,"PCI:%s", pci_name(dev->pci)); | 892 | sprintf(cap->bus_info,"PCI:%s", pci_name(dev->pci)); |
893 | cap->version = SAA7146_VERSION_CODE; | 893 | cap->version = SAA7146_VERSION_CODE; |
@@ -1011,19 +1011,19 @@ int saa7146_video_do_ioctl(struct inode *inode, struct file *file, unsigned int | |||
1011 | err = set_control(fh,arg); | 1011 | err = set_control(fh,arg); |
1012 | return err; | 1012 | return err; |
1013 | } | 1013 | } |
1014 | case VIDIOC_G_PARM: | 1014 | case VIDIOC_G_PARM: |
1015 | { | 1015 | { |
1016 | struct v4l2_streamparm *parm = arg; | 1016 | struct v4l2_streamparm *parm = arg; |
1017 | if( parm->type != V4L2_BUF_TYPE_VIDEO_CAPTURE ) { | 1017 | if( parm->type != V4L2_BUF_TYPE_VIDEO_CAPTURE ) { |
1018 | return -EINVAL; | 1018 | return -EINVAL; |
1019 | } | 1019 | } |
1020 | memset(&parm->parm.capture,0,sizeof(struct v4l2_captureparm)); | 1020 | memset(&parm->parm.capture,0,sizeof(struct v4l2_captureparm)); |
1021 | parm->parm.capture.readbuffers = 1; | 1021 | parm->parm.capture.readbuffers = 1; |
1022 | // fixme: only for PAL! | 1022 | // fixme: only for PAL! |
1023 | parm->parm.capture.timeperframe.numerator = 1; | 1023 | parm->parm.capture.timeperframe.numerator = 1; |
1024 | parm->parm.capture.timeperframe.denominator = 25; | 1024 | parm->parm.capture.timeperframe.denominator = 25; |
1025 | return 0; | 1025 | return 0; |
1026 | } | 1026 | } |
1027 | case VIDIOC_G_FMT: | 1027 | case VIDIOC_G_FMT: |
1028 | { | 1028 | { |
1029 | struct v4l2_format *f = arg; | 1029 | struct v4l2_format *f = arg; |
@@ -1383,7 +1383,7 @@ static struct videobuf_queue_ops video_qops = { | |||
1383 | 1383 | ||
1384 | static void video_init(struct saa7146_dev *dev, struct saa7146_vv *vv) | 1384 | static void video_init(struct saa7146_dev *dev, struct saa7146_vv *vv) |
1385 | { | 1385 | { |
1386 | INIT_LIST_HEAD(&vv->video_q.queue); | 1386 | INIT_LIST_HEAD(&vv->video_q.queue); |
1387 | 1387 | ||
1388 | init_timer(&vv->video_q.timeout); | 1388 | init_timer(&vv->video_q.timeout); |
1389 | vv->video_q.timeout.function = saa7146_buffer_timeout; | 1389 | vv->video_q.timeout.function = saa7146_buffer_timeout; |