diff options
-rw-r--r-- | drivers/media/video/videodev.c | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/drivers/media/video/videodev.c b/drivers/media/video/videodev.c index 26e7ea252a0e..479a0675cf60 100644 --- a/drivers/media/video/videodev.c +++ b/drivers/media/video/videodev.c | |||
@@ -1283,9 +1283,29 @@ static int __video_do_ioctl(struct inode *inode, struct file *file, | |||
1283 | case VIDIOC_G_PARM: | 1283 | case VIDIOC_G_PARM: |
1284 | { | 1284 | { |
1285 | struct v4l2_streamparm *p=arg; | 1285 | struct v4l2_streamparm *p=arg; |
1286 | if (!vfd->vidioc_g_parm) | 1286 | if (vfd->vidioc_g_parm) { |
1287 | break; | 1287 | ret=vfd->vidioc_g_parm(file, fh, p); |
1288 | ret=vfd->vidioc_g_parm(file, fh, p); | 1288 | } else { |
1289 | struct v4l2_standard s; | ||
1290 | |||
1291 | if (!vfd->tvnormsize) { | ||
1292 | printk (KERN_WARNING "%s: no TV norms defined!\n", | ||
1293 | vfd->name); | ||
1294 | break; | ||
1295 | } | ||
1296 | |||
1297 | if (p->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) | ||
1298 | return -EINVAL; | ||
1299 | |||
1300 | v4l2_video_std_construct(&s, vfd->tvnorms[vfd->current_norm].id, | ||
1301 | vfd->tvnorms[vfd->current_norm].name); | ||
1302 | |||
1303 | memset(p,0,sizeof(*p)); | ||
1304 | |||
1305 | p->parm.capture.timeperframe = s.frameperiod; | ||
1306 | ret=0; | ||
1307 | } | ||
1308 | |||
1289 | dbgarg (cmd, "type=%d\n", p->type); | 1309 | dbgarg (cmd, "type=%d\n", p->type); |
1290 | break; | 1310 | break; |
1291 | } | 1311 | } |