diff options
Diffstat (limited to 'drivers/media/video/em28xx/em28xx-video.c')
-rw-r--r-- | drivers/media/video/em28xx/em28xx-video.c | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/drivers/media/video/em28xx/em28xx-video.c b/drivers/media/video/em28xx/em28xx-video.c index cf7cdf9ef617..9286090817cd 100644 --- a/drivers/media/video/em28xx/em28xx-video.c +++ b/drivers/media/video/em28xx/em28xx-video.c | |||
@@ -3,7 +3,7 @@ | |||
3 | 3 | ||
4 | Copyright (C) 2005 Ludovico Cavedon <cavedon@sssup.it> | 4 | Copyright (C) 2005 Ludovico Cavedon <cavedon@sssup.it> |
5 | Markus Rechberger <mrechberger@gmail.com> | 5 | Markus Rechberger <mrechberger@gmail.com> |
6 | Mauro Carvalho Chehab <mchehab@brturbo.com.br> | 6 | Mauro Carvalho Chehab <mchehab@infradead.org> |
7 | Sascha Sommer <saschasommer@freenet.de> | 7 | Sascha Sommer <saschasommer@freenet.de> |
8 | 8 | ||
9 | Some parts based on SN9C10x PC Camera Controllers GPL driver made | 9 | Some parts based on SN9C10x PC Camera Controllers GPL driver made |
@@ -42,7 +42,7 @@ | |||
42 | 42 | ||
43 | #define DRIVER_AUTHOR "Ludovico Cavedon <cavedon@sssup.it>, " \ | 43 | #define DRIVER_AUTHOR "Ludovico Cavedon <cavedon@sssup.it>, " \ |
44 | "Markus Rechberger <mrechberger@gmail.com>, " \ | 44 | "Markus Rechberger <mrechberger@gmail.com>, " \ |
45 | "Mauro Carvalho Chehab <mchehab@brturbo.com.br>, " \ | 45 | "Mauro Carvalho Chehab <mchehab@infradead.org>, " \ |
46 | "Sascha Sommer <saschasommer@freenet.de>" | 46 | "Sascha Sommer <saschasommer@freenet.de>" |
47 | 47 | ||
48 | #define DRIVER_NAME "em28xx" | 48 | #define DRIVER_NAME "em28xx" |
@@ -170,8 +170,12 @@ static int em28xx_config(struct em28xx *dev) | |||
170 | static void em28xx_config_i2c(struct em28xx *dev) | 170 | static 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 | ||
207 | static void video_mux(struct em28xx *dev, int index) | 211 | static 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; |