aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/em28xx/em28xx-video.c
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2006-04-02 12:35:00 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2006-06-25 00:57:38 -0400
commitc7c0b34c27bbf0671807e902fbfea6270c8f138d (patch)
tree2d44aae2ae76ee47ca12262967ac5711bcc047b6 /drivers/media/video/em28xx/em28xx-video.c
parentb7f8292c96463810edfecff70dd4631d47e5a36b (diff)
V4L/DVB (3712): Fix video input setting of em28xx, use _INT_S_VIDEO_ROUTING in tvp5150
- Use new routing input defines in em28xx-cards.c - Fix S-Video settings for tvp5150-based cards (input was copied from saa7115 based cards and worked only because S-Video was selected in the default: case) - Replace VIDIOC_S_INPUT by VIDIOC_INT_S_VIDEO_ROUTING in em28xx-video.c - Remove the now obsolete VIDIOC_S_INPUT handler in saa7115.c - Add VIDIOC_INT_G/S_VIDEO_ROUTING in tvp5150.c - Add new media/tvp5150.h with the routing defines. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/em28xx/em28xx-video.c')
-rw-r--r--drivers/media/video/em28xx/em28xx-video.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/drivers/media/video/em28xx/em28xx-video.c b/drivers/media/video/em28xx/em28xx-video.c
index cf7cdf9ef617..1a0062b649a8 100644
--- a/drivers/media/video/em28xx/em28xx-video.c
+++ b/drivers/media/video/em28xx/em28xx-video.c
@@ -170,8 +170,12 @@ static int em28xx_config(struct em28xx *dev)
170static void em28xx_config_i2c(struct em28xx *dev) 170static void em28xx_config_i2c(struct em28xx *dev)
171{ 171{
172 struct v4l2_frequency f; 172 struct v4l2_frequency f;
173 struct v4l2_routing route;
174
175 route.input = INPUT(dev->ctl_input)->vmux;
176 route.output = 0;
173 em28xx_i2c_call_clients(dev, VIDIOC_INT_RESET, NULL); 177 em28xx_i2c_call_clients(dev, VIDIOC_INT_RESET, NULL);
174 em28xx_i2c_call_clients(dev, VIDIOC_S_INPUT, &dev->ctl_input); 178 em28xx_i2c_call_clients(dev, VIDIOC_INT_S_VIDEO_ROUTING, &route);
175 em28xx_i2c_call_clients(dev, VIDIOC_STREAMON, NULL); 179 em28xx_i2c_call_clients(dev, VIDIOC_STREAMON, NULL);
176 180
177 /* configure tuner */ 181 /* configure tuner */
@@ -206,19 +210,19 @@ static void em28xx_empty_framequeues(struct em28xx *dev)
206 210
207static void video_mux(struct em28xx *dev, int index) 211static void video_mux(struct em28xx *dev, int index)
208{ 212{
209 int input, ainput; 213 int ainput;
214 struct v4l2_routing route;
210 215
211 input = INPUT(index)->vmux; 216 route.input = INPUT(index)->vmux;
217 route.output = 0;
212 dev->ctl_input = index; 218 dev->ctl_input = index;
213 dev->ctl_ainput = INPUT(index)->amux; 219 dev->ctl_ainput = INPUT(index)->amux;
214 220
215 em28xx_i2c_call_clients(dev, VIDIOC_S_INPUT, &input); 221 em28xx_i2c_call_clients(dev, VIDIOC_INT_S_VIDEO_ROUTING, &route);
216 222
217 em28xx_videodbg("Setting input index=%d, vmux=%d, amux=%d\n",index,input,dev->ctl_ainput); 223 em28xx_videodbg("Setting input index=%d, vmux=%d, amux=%d\n",index,route.input,dev->ctl_ainput);
218 224
219 if (dev->has_msp34xx) { 225 if (dev->has_msp34xx) {
220 struct v4l2_routing route;
221
222 if (dev->i2s_speed) 226 if (dev->i2s_speed)
223 em28xx_i2c_call_clients(dev, VIDIOC_INT_I2S_CLOCK_FREQ, &dev->i2s_speed); 227 em28xx_i2c_call_clients(dev, VIDIOC_INT_I2S_CLOCK_FREQ, &dev->i2s_speed);
224 route.input = dev->ctl_ainput; 228 route.input = dev->ctl_ainput;