aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/ivtv/ivtv-controls.c
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2008-11-29 17:38:23 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-12-30 06:38:44 -0500
commit67ec09fdf5e05d4670b617256c696348b5df080b (patch)
treefdf5f16f9b20280f83ce10e435d557bcb371934f /drivers/media/video/ivtv/ivtv-controls.c
parentca085fb900265b525e3f9fb95fb6d7fd27a302ea (diff)
V4L/DVB (9835): ivtv/ivtvfb: convert to v4l2_device/v4l2_subdev.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/ivtv/ivtv-controls.c')
-rw-r--r--drivers/media/video/ivtv/ivtv-controls.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/media/video/ivtv/ivtv-controls.c b/drivers/media/video/ivtv/ivtv-controls.c
index 48e103be7183..62aa06f5d168 100644
--- a/drivers/media/video/ivtv/ivtv-controls.c
+++ b/drivers/media/video/ivtv/ivtv-controls.c
@@ -63,7 +63,7 @@ int ivtv_queryctrl(struct file *file, void *fh, struct v4l2_queryctrl *qctrl)
63 case V4L2_CID_HUE: 63 case V4L2_CID_HUE:
64 case V4L2_CID_SATURATION: 64 case V4L2_CID_SATURATION:
65 case V4L2_CID_CONTRAST: 65 case V4L2_CID_CONTRAST:
66 if (itv->video_dec_func(itv, VIDIOC_QUERYCTRL, qctrl)) 66 if (v4l2_subdev_call(itv->sd_video, core, queryctrl, qctrl))
67 qctrl->flags |= V4L2_CTRL_FLAG_DISABLED; 67 qctrl->flags |= V4L2_CTRL_FLAG_DISABLED;
68 return 0; 68 return 0;
69 69
@@ -73,7 +73,7 @@ int ivtv_queryctrl(struct file *file, void *fh, struct v4l2_queryctrl *qctrl)
73 case V4L2_CID_AUDIO_BASS: 73 case V4L2_CID_AUDIO_BASS:
74 case V4L2_CID_AUDIO_TREBLE: 74 case V4L2_CID_AUDIO_TREBLE:
75 case V4L2_CID_AUDIO_LOUDNESS: 75 case V4L2_CID_AUDIO_LOUDNESS:
76 if (ivtv_i2c_hw(itv, itv->card->hw_audio_ctrl, VIDIOC_QUERYCTRL, qctrl)) 76 if (v4l2_subdev_call(itv->sd_audio, core, queryctrl, qctrl))
77 qctrl->flags |= V4L2_CTRL_FLAG_DISABLED; 77 qctrl->flags |= V4L2_CTRL_FLAG_DISABLED;
78 return 0; 78 return 0;
79 79
@@ -122,7 +122,7 @@ static int ivtv_s_ctrl(struct ivtv *itv, struct v4l2_control *vctrl)
122 case V4L2_CID_HUE: 122 case V4L2_CID_HUE:
123 case V4L2_CID_SATURATION: 123 case V4L2_CID_SATURATION:
124 case V4L2_CID_CONTRAST: 124 case V4L2_CID_CONTRAST:
125 return itv->video_dec_func(itv, VIDIOC_S_CTRL, vctrl); 125 return v4l2_subdev_call(itv->sd_video, core, s_ctrl, vctrl);
126 126
127 case V4L2_CID_AUDIO_VOLUME: 127 case V4L2_CID_AUDIO_VOLUME:
128 case V4L2_CID_AUDIO_MUTE: 128 case V4L2_CID_AUDIO_MUTE:
@@ -130,7 +130,7 @@ static int ivtv_s_ctrl(struct ivtv *itv, struct v4l2_control *vctrl)
130 case V4L2_CID_AUDIO_BASS: 130 case V4L2_CID_AUDIO_BASS:
131 case V4L2_CID_AUDIO_TREBLE: 131 case V4L2_CID_AUDIO_TREBLE:
132 case V4L2_CID_AUDIO_LOUDNESS: 132 case V4L2_CID_AUDIO_LOUDNESS:
133 return ivtv_i2c_hw(itv, itv->card->hw_audio_ctrl, VIDIOC_S_CTRL, vctrl); 133 return v4l2_subdev_call(itv->sd_audio, core, s_ctrl, vctrl);
134 134
135 default: 135 default:
136 IVTV_DEBUG_IOCTL("invalid control 0x%x\n", vctrl->id); 136 IVTV_DEBUG_IOCTL("invalid control 0x%x\n", vctrl->id);
@@ -147,7 +147,7 @@ static int ivtv_g_ctrl(struct ivtv *itv, struct v4l2_control *vctrl)
147 case V4L2_CID_HUE: 147 case V4L2_CID_HUE:
148 case V4L2_CID_SATURATION: 148 case V4L2_CID_SATURATION:
149 case V4L2_CID_CONTRAST: 149 case V4L2_CID_CONTRAST:
150 return itv->video_dec_func(itv, VIDIOC_G_CTRL, vctrl); 150 return v4l2_subdev_call(itv->sd_video, core, g_ctrl, vctrl);
151 151
152 case V4L2_CID_AUDIO_VOLUME: 152 case V4L2_CID_AUDIO_VOLUME:
153 case V4L2_CID_AUDIO_MUTE: 153 case V4L2_CID_AUDIO_MUTE:
@@ -155,7 +155,7 @@ static int ivtv_g_ctrl(struct ivtv *itv, struct v4l2_control *vctrl)
155 case V4L2_CID_AUDIO_BASS: 155 case V4L2_CID_AUDIO_BASS:
156 case V4L2_CID_AUDIO_TREBLE: 156 case V4L2_CID_AUDIO_TREBLE:
157 case V4L2_CID_AUDIO_LOUDNESS: 157 case V4L2_CID_AUDIO_LOUDNESS:
158 return ivtv_i2c_hw(itv, itv->card->hw_audio_ctrl, VIDIOC_G_CTRL, vctrl); 158 return v4l2_subdev_call(itv->sd_audio, core, g_ctrl, vctrl);
159 default: 159 default:
160 IVTV_DEBUG_IOCTL("invalid control 0x%x\n", vctrl->id); 160 IVTV_DEBUG_IOCTL("invalid control 0x%x\n", vctrl->id);
161 return -EINVAL; 161 return -EINVAL;
@@ -268,7 +268,7 @@ int ivtv_s_ext_ctrls(struct file *file, void *fh, struct v4l2_ext_controls *c)
268 fmt.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; 268 fmt.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
269 fmt.fmt.pix.width = itv->params.width / (is_mpeg1 ? 2 : 1); 269 fmt.fmt.pix.width = itv->params.width / (is_mpeg1 ? 2 : 1);
270 fmt.fmt.pix.height = itv->params.height; 270 fmt.fmt.pix.height = itv->params.height;
271 itv->video_dec_func(itv, VIDIOC_S_FMT, &fmt); 271 v4l2_subdev_call(itv->sd_video, video, s_fmt, &fmt);
272 } 272 }
273 err = cx2341x_update(itv, ivtv_api_func, &itv->params, &p); 273 err = cx2341x_update(itv, ivtv_api_func, &itv->params, &p);
274 if (!err && itv->params.stream_vbi_fmt != p.stream_vbi_fmt) 274 if (!err && itv->params.stream_vbi_fmt != p.stream_vbi_fmt)
@@ -279,7 +279,7 @@ int ivtv_s_ext_ctrls(struct file *file, void *fh, struct v4l2_ext_controls *c)
279 /* The audio clock of the digitizer must match the codec sample 279 /* The audio clock of the digitizer must match the codec sample
280 rate otherwise you get some very strange effects. */ 280 rate otherwise you get some very strange effects. */
281 if (idx < sizeof(freqs)) 281 if (idx < sizeof(freqs))
282 ivtv_call_i2c_clients(itv, VIDIOC_INT_AUDIO_CLOCK_FREQ, &freqs[idx]); 282 ivtv_call_all(itv, audio, s_clock_freq, freqs[idx]);
283 return err; 283 return err;
284 } 284 }
285 return -EINVAL; 285 return -EINVAL;