diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2010-05-08 15:28:51 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-06-01 00:20:30 -0400 |
commit | 475977ac3db72c008f5aaa5f19bd991b72f26e42 (patch) | |
tree | d2c35c26c80b7f7443e5106ad17e75d5fb623e53 /drivers/media/video/ivtv | |
parent | 6c69db9de7a8934bdeb690663fab6fe046203ac4 (diff) |
V4L/DVB: ivtv: convert to use s_mbus_fmt
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/ivtv')
-rw-r--r-- | drivers/media/video/ivtv/ivtv-controls.c | 10 | ||||
-rw-r--r-- | drivers/media/video/ivtv/ivtv-ioctl.c | 6 |
2 files changed, 10 insertions, 6 deletions
diff --git a/drivers/media/video/ivtv/ivtv-controls.c b/drivers/media/video/ivtv/ivtv-controls.c index b59475bfc243..b588e30cbcf0 100644 --- a/drivers/media/video/ivtv/ivtv-controls.c +++ b/drivers/media/video/ivtv/ivtv-controls.c | |||
@@ -267,13 +267,13 @@ int ivtv_s_ext_ctrls(struct file *file, void *fh, struct v4l2_ext_controls *c) | |||
267 | if (p.video_encoding != itv->params.video_encoding) { | 267 | if (p.video_encoding != itv->params.video_encoding) { |
268 | int is_mpeg1 = p.video_encoding == | 268 | int is_mpeg1 = p.video_encoding == |
269 | V4L2_MPEG_VIDEO_ENCODING_MPEG_1; | 269 | V4L2_MPEG_VIDEO_ENCODING_MPEG_1; |
270 | struct v4l2_format fmt; | 270 | struct v4l2_mbus_framefmt fmt; |
271 | 271 | ||
272 | /* fix videodecoder resolution */ | 272 | /* fix videodecoder resolution */ |
273 | fmt.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; | 273 | fmt.width = itv->params.width / (is_mpeg1 ? 2 : 1); |
274 | fmt.fmt.pix.width = itv->params.width / (is_mpeg1 ? 2 : 1); | 274 | fmt.height = itv->params.height; |
275 | fmt.fmt.pix.height = itv->params.height; | 275 | fmt.code = V4L2_MBUS_FMT_FIXED; |
276 | v4l2_subdev_call(itv->sd_video, video, s_fmt, &fmt); | 276 | v4l2_subdev_call(itv->sd_video, video, s_mbus_fmt, &fmt); |
277 | } | 277 | } |
278 | err = cx2341x_update(itv, ivtv_api_func, &itv->params, &p); | 278 | err = cx2341x_update(itv, ivtv_api_func, &itv->params, &p); |
279 | if (!err && itv->params.stream_vbi_fmt != p.stream_vbi_fmt) | 279 | if (!err && itv->params.stream_vbi_fmt != p.stream_vbi_fmt) |
diff --git a/drivers/media/video/ivtv/ivtv-ioctl.c b/drivers/media/video/ivtv/ivtv-ioctl.c index fa9f0d958f96..11ac2fa33ef7 100644 --- a/drivers/media/video/ivtv/ivtv-ioctl.c +++ b/drivers/media/video/ivtv/ivtv-ioctl.c | |||
@@ -569,6 +569,7 @@ static int ivtv_s_fmt_vid_cap(struct file *file, void *fh, struct v4l2_format *f | |||
569 | struct ivtv_open_id *id = fh; | 569 | struct ivtv_open_id *id = fh; |
570 | struct ivtv *itv = id->itv; | 570 | struct ivtv *itv = id->itv; |
571 | struct cx2341x_mpeg_params *p = &itv->params; | 571 | struct cx2341x_mpeg_params *p = &itv->params; |
572 | struct v4l2_mbus_framefmt mbus_fmt; | ||
572 | int ret = ivtv_try_fmt_vid_cap(file, fh, fmt); | 573 | int ret = ivtv_try_fmt_vid_cap(file, fh, fmt); |
573 | int w = fmt->fmt.pix.width; | 574 | int w = fmt->fmt.pix.width; |
574 | int h = fmt->fmt.pix.height; | 575 | int h = fmt->fmt.pix.height; |
@@ -586,7 +587,10 @@ static int ivtv_s_fmt_vid_cap(struct file *file, void *fh, struct v4l2_format *f | |||
586 | p->height = h; | 587 | p->height = h; |
587 | if (p->video_encoding == V4L2_MPEG_VIDEO_ENCODING_MPEG_1) | 588 | if (p->video_encoding == V4L2_MPEG_VIDEO_ENCODING_MPEG_1) |
588 | fmt->fmt.pix.width /= 2; | 589 | fmt->fmt.pix.width /= 2; |
589 | v4l2_subdev_call(itv->sd_video, video, s_fmt, fmt); | 590 | mbus_fmt.width = fmt->fmt.pix.width; |
591 | mbus_fmt.height = h; | ||
592 | mbus_fmt.code = V4L2_MBUS_FMT_FIXED; | ||
593 | v4l2_subdev_call(itv->sd_video, video, s_mbus_fmt, &mbus_fmt); | ||
590 | return ivtv_g_fmt_vid_cap(file, fh, fmt); | 594 | return ivtv_g_fmt_vid_cap(file, fh, fmt); |
591 | } | 595 | } |
592 | 596 | ||