diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-10 18:09:54 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-10 18:09:54 -0400 |
commit | 7ae0dea900b027cd90e8a3e14deca9a19e17638b (patch) | |
tree | 428cbe411bba90f6580ae21338276c949e91f23a /drivers/media/video/ivtv/ivtv-ioctl.c | |
parent | 6c74700fdb8e3bc34c31790384a8ec16c4fefd97 (diff) | |
parent | 560afa7d85bdfb294506afd3032c315e6827824f (diff) |
Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6
* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: (94 commits)
V4L/DVB: tvp7002: fix write to H-PLL Feedback Divider LSB register
V4L/DVB: dvb: siano: free spinlock before schedule()
V4L/DVB: media: video: pvrusb2: remove custom hex_to_bin()
V4L/DVB: drivers: usbvideo: remove custom implementation of hex_to_bin()
V4L/DVB: Report supported QAM modes on bt8xx
V4L/DVB: media: ir-keytable: null dereference in debug code
V4L/DVB: ivtv: convert to the new control framework
V4L/DVB: ivtv: convert gpio subdev to new control framework
V4L/DVB: wm8739: convert to the new control framework
V4L/DVB: cs53l32a: convert to new control framework
V4L/DVB: wm8775: convert to the new control framework
V4L/DVB: cx2341x: convert to the control framework
V4L/DVB: cx25840: convert to the new control framework
V4L/DVB: cx25840/ivtv: replace ugly priv control with s_config
V4L/DVB: saa717x: convert to the new control framework
V4L/DVB: msp3400: convert to the new control framework
V4L/DVB: saa7115: convert to the new control framework
V4L/DVB: v4l2: hook up the new control framework into the core framework
V4L/DVB: Documentation: add v4l2-controls.txt documenting the new controls API
V4L/DVB: v4l2-ctrls: Whitespace cleanups
...
Diffstat (limited to 'drivers/media/video/ivtv/ivtv-ioctl.c')
-rw-r--r-- | drivers/media/video/ivtv/ivtv-ioctl.c | 31 |
1 files changed, 13 insertions, 18 deletions
diff --git a/drivers/media/video/ivtv/ivtv-ioctl.c b/drivers/media/video/ivtv/ivtv-ioctl.c index 11ac2fa33ef7..4eed9123683e 100644 --- a/drivers/media/video/ivtv/ivtv-ioctl.c +++ b/drivers/media/video/ivtv/ivtv-ioctl.c | |||
@@ -162,7 +162,7 @@ int ivtv_set_speed(struct ivtv *itv, int speed) | |||
162 | data[0] |= (speed > 1000 || speed < -1500) ? 0x40000000 : 0; | 162 | data[0] |= (speed > 1000 || speed < -1500) ? 0x40000000 : 0; |
163 | data[1] = (speed < 0); | 163 | data[1] = (speed < 0); |
164 | data[2] = speed < 0 ? 3 : 7; | 164 | data[2] = speed < 0 ? 3 : 7; |
165 | data[3] = itv->params.video_b_frames; | 165 | data[3] = v4l2_ctrl_g_ctrl(itv->cxhdl.video_b_frames); |
166 | data[4] = (speed == 1500 || speed == 500) ? itv->speed_mute_audio : 0; | 166 | data[4] = (speed == 1500 || speed == 500) ? itv->speed_mute_audio : 0; |
167 | data[5] = 0; | 167 | data[5] = 0; |
168 | data[6] = 0; | 168 | data[6] = 0; |
@@ -339,8 +339,8 @@ static int ivtv_g_fmt_vid_cap(struct file *file, void *fh, struct v4l2_format *f | |||
339 | struct ivtv *itv = id->itv; | 339 | struct ivtv *itv = id->itv; |
340 | struct v4l2_pix_format *pixfmt = &fmt->fmt.pix; | 340 | struct v4l2_pix_format *pixfmt = &fmt->fmt.pix; |
341 | 341 | ||
342 | pixfmt->width = itv->params.width; | 342 | pixfmt->width = itv->cxhdl.width; |
343 | pixfmt->height = itv->params.height; | 343 | pixfmt->height = itv->cxhdl.height; |
344 | pixfmt->colorspace = V4L2_COLORSPACE_SMPTE170M; | 344 | pixfmt->colorspace = V4L2_COLORSPACE_SMPTE170M; |
345 | pixfmt->field = V4L2_FIELD_INTERLACED; | 345 | pixfmt->field = V4L2_FIELD_INTERLACED; |
346 | pixfmt->priv = 0; | 346 | pixfmt->priv = 0; |
@@ -568,7 +568,6 @@ static int ivtv_s_fmt_vid_cap(struct file *file, void *fh, struct v4l2_format *f | |||
568 | { | 568 | { |
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; | ||
572 | struct v4l2_mbus_framefmt mbus_fmt; | 571 | struct v4l2_mbus_framefmt mbus_fmt; |
573 | int ret = ivtv_try_fmt_vid_cap(file, fh, fmt); | 572 | int ret = ivtv_try_fmt_vid_cap(file, fh, fmt); |
574 | int w = fmt->fmt.pix.width; | 573 | int w = fmt->fmt.pix.width; |
@@ -577,15 +576,15 @@ static int ivtv_s_fmt_vid_cap(struct file *file, void *fh, struct v4l2_format *f | |||
577 | if (ret) | 576 | if (ret) |
578 | return ret; | 577 | return ret; |
579 | 578 | ||
580 | if (p->width == w && p->height == h) | 579 | if (itv->cxhdl.width == w && itv->cxhdl.height == h) |
581 | return 0; | 580 | return 0; |
582 | 581 | ||
583 | if (atomic_read(&itv->capturing) > 0) | 582 | if (atomic_read(&itv->capturing) > 0) |
584 | return -EBUSY; | 583 | return -EBUSY; |
585 | 584 | ||
586 | p->width = w; | 585 | itv->cxhdl.width = w; |
587 | p->height = h; | 586 | itv->cxhdl.height = h; |
588 | if (p->video_encoding == V4L2_MPEG_VIDEO_ENCODING_MPEG_1) | 587 | if (v4l2_ctrl_g_ctrl(itv->cxhdl.video_encoding) == V4L2_MPEG_VIDEO_ENCODING_MPEG_1) |
589 | fmt->fmt.pix.width /= 2; | 588 | fmt->fmt.pix.width /= 2; |
590 | mbus_fmt.width = fmt->fmt.pix.width; | 589 | mbus_fmt.width = fmt->fmt.pix.width; |
591 | mbus_fmt.height = h; | 590 | mbus_fmt.height = h; |
@@ -1114,9 +1113,10 @@ int ivtv_s_std(struct file *file, void *fh, v4l2_std_id *std) | |||
1114 | 1113 | ||
1115 | itv->std = *std; | 1114 | itv->std = *std; |
1116 | itv->is_60hz = (*std & V4L2_STD_525_60) ? 1 : 0; | 1115 | itv->is_60hz = (*std & V4L2_STD_525_60) ? 1 : 0; |
1117 | itv->params.is_50hz = itv->is_50hz = !itv->is_60hz; | 1116 | itv->is_50hz = !itv->is_60hz; |
1118 | itv->params.width = 720; | 1117 | cx2341x_handler_set_50hz(&itv->cxhdl, itv->is_50hz); |
1119 | itv->params.height = itv->is_50hz ? 576 : 480; | 1118 | itv->cxhdl.width = 720; |
1119 | itv->cxhdl.height = itv->is_50hz ? 576 : 480; | ||
1120 | itv->vbi.count = itv->is_50hz ? 18 : 12; | 1120 | itv->vbi.count = itv->is_50hz ? 18 : 12; |
1121 | itv->vbi.start[0] = itv->is_50hz ? 6 : 10; | 1121 | itv->vbi.start[0] = itv->is_50hz ? 6 : 10; |
1122 | itv->vbi.start[1] = itv->is_50hz ? 318 : 273; | 1122 | itv->vbi.start[1] = itv->is_50hz ? 318 : 273; |
@@ -1157,7 +1157,7 @@ int ivtv_s_std(struct file *file, void *fh, v4l2_std_id *std) | |||
1157 | ivtv_vapi(itv, CX2341X_DEC_SET_STANDARD, 1, itv->is_out_50hz); | 1157 | ivtv_vapi(itv, CX2341X_DEC_SET_STANDARD, 1, itv->is_out_50hz); |
1158 | itv->main_rect.left = itv->main_rect.top = 0; | 1158 | itv->main_rect.left = itv->main_rect.top = 0; |
1159 | itv->main_rect.width = 720; | 1159 | itv->main_rect.width = 720; |
1160 | itv->main_rect.height = itv->params.height; | 1160 | itv->main_rect.height = itv->cxhdl.height; |
1161 | ivtv_vapi(itv, CX2341X_OSD_SET_FRAMEBUFFER_WINDOW, 4, | 1161 | ivtv_vapi(itv, CX2341X_OSD_SET_FRAMEBUFFER_WINDOW, 4, |
1162 | 720, itv->main_rect.height, 0, 0); | 1162 | 720, itv->main_rect.height, 0, 0); |
1163 | yi->main_rect = itv->main_rect; | 1163 | yi->main_rect = itv->main_rect; |
@@ -1554,7 +1554,7 @@ static int ivtv_log_status(struct file *file, void *fh) | |||
1554 | } | 1554 | } |
1555 | IVTV_INFO("Tuner: %s\n", | 1555 | IVTV_INFO("Tuner: %s\n", |
1556 | test_bit(IVTV_F_I_RADIO_USER, &itv->i_flags) ? "Radio" : "TV"); | 1556 | test_bit(IVTV_F_I_RADIO_USER, &itv->i_flags) ? "Radio" : "TV"); |
1557 | cx2341x_log_status(&itv->params, itv->v4l2_dev.name); | 1557 | v4l2_ctrl_handler_log_status(&itv->cxhdl.hdl, itv->v4l2_dev.name); |
1558 | IVTV_INFO("Status flags: 0x%08lx\n", itv->i_flags); | 1558 | IVTV_INFO("Status flags: 0x%08lx\n", itv->i_flags); |
1559 | for (i = 0; i < IVTV_MAX_STREAMS; i++) { | 1559 | for (i = 0; i < IVTV_MAX_STREAMS; i++) { |
1560 | struct ivtv_stream *s = &itv->streams[i]; | 1560 | struct ivtv_stream *s = &itv->streams[i]; |
@@ -1942,11 +1942,6 @@ static const struct v4l2_ioctl_ops ivtv_ioctl_ops = { | |||
1942 | .vidioc_s_register = ivtv_s_register, | 1942 | .vidioc_s_register = ivtv_s_register, |
1943 | #endif | 1943 | #endif |
1944 | .vidioc_default = ivtv_default, | 1944 | .vidioc_default = ivtv_default, |
1945 | .vidioc_queryctrl = ivtv_queryctrl, | ||
1946 | .vidioc_querymenu = ivtv_querymenu, | ||
1947 | .vidioc_g_ext_ctrls = ivtv_g_ext_ctrls, | ||
1948 | .vidioc_s_ext_ctrls = ivtv_s_ext_ctrls, | ||
1949 | .vidioc_try_ext_ctrls = ivtv_try_ext_ctrls, | ||
1950 | .vidioc_subscribe_event = ivtv_subscribe_event, | 1945 | .vidioc_subscribe_event = ivtv_subscribe_event, |
1951 | .vidioc_unsubscribe_event = v4l2_event_unsubscribe, | 1946 | .vidioc_unsubscribe_event = v4l2_event_unsubscribe, |
1952 | }; | 1947 | }; |