diff options
Diffstat (limited to 'drivers/media/video/em28xx')
-rw-r--r-- | drivers/media/video/em28xx/em28xx-cards.c | 64 | ||||
-rw-r--r-- | drivers/media/video/em28xx/em28xx-core.c | 12 | ||||
-rw-r--r-- | drivers/media/video/em28xx/em28xx-i2c.c | 31 | ||||
-rw-r--r-- | drivers/media/video/em28xx/em28xx-input.c | 8 | ||||
-rw-r--r-- | drivers/media/video/em28xx/em28xx-video.c | 22 | ||||
-rw-r--r-- | drivers/media/video/em28xx/em28xx.h | 8 |
6 files changed, 68 insertions, 77 deletions
diff --git a/drivers/media/video/em28xx/em28xx-cards.c b/drivers/media/video/em28xx/em28xx-cards.c index 3ba3439db580..ed882ebc7b95 100644 --- a/drivers/media/video/em28xx/em28xx-cards.c +++ b/drivers/media/video/em28xx/em28xx-cards.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 | This program is free software; you can redistribute it and/or modify | 9 | This program is free software; you can redistribute it and/or modify |
@@ -29,6 +29,8 @@ | |||
29 | #include <linux/usb.h> | 29 | #include <linux/usb.h> |
30 | #include <media/tuner.h> | 30 | #include <media/tuner.h> |
31 | #include <media/msp3400.h> | 31 | #include <media/msp3400.h> |
32 | #include <media/saa7115.h> | ||
33 | #include <media/tvp5150.h> | ||
32 | #include <media/tveeprom.h> | 34 | #include <media/tveeprom.h> |
33 | #include <media/audiochip.h> | 35 | #include <media/audiochip.h> |
34 | #include <media/v4l2-common.h> | 36 | #include <media/v4l2-common.h> |
@@ -46,11 +48,11 @@ struct em28xx_board em28xx_boards[] = { | |||
46 | .decoder = EM28XX_SAA7113, | 48 | .decoder = EM28XX_SAA7113, |
47 | .input = {{ | 49 | .input = {{ |
48 | .type = EM28XX_VMUX_COMPOSITE1, | 50 | .type = EM28XX_VMUX_COMPOSITE1, |
49 | .vmux = 0, | 51 | .vmux = SAA7115_COMPOSITE0, |
50 | .amux = 1, | 52 | .amux = 1, |
51 | },{ | 53 | },{ |
52 | .type = EM28XX_VMUX_SVIDEO, | 54 | .type = EM28XX_VMUX_SVIDEO, |
53 | .vmux = 9, | 55 | .vmux = SAA7115_SVIDEO3, |
54 | .amux = 1, | 56 | .amux = 1, |
55 | }}, | 57 | }}, |
56 | }, | 58 | }, |
@@ -64,11 +66,11 @@ struct em28xx_board em28xx_boards[] = { | |||
64 | .decoder = EM28XX_SAA7113, | 66 | .decoder = EM28XX_SAA7113, |
65 | .input = {{ | 67 | .input = {{ |
66 | .type = EM28XX_VMUX_COMPOSITE1, | 68 | .type = EM28XX_VMUX_COMPOSITE1, |
67 | .vmux = 0, | 69 | .vmux = SAA7115_COMPOSITE0, |
68 | .amux = 1, | 70 | .amux = 1, |
69 | },{ | 71 | },{ |
70 | .type = EM28XX_VMUX_SVIDEO, | 72 | .type = EM28XX_VMUX_SVIDEO, |
71 | .vmux = 9, | 73 | .vmux = SAA7115_SVIDEO3, |
72 | .amux = 1, | 74 | .amux = 1, |
73 | }}, | 75 | }}, |
74 | }, | 76 | }, |
@@ -82,11 +84,11 @@ struct em28xx_board em28xx_boards[] = { | |||
82 | .decoder = EM28XX_SAA7113, | 84 | .decoder = EM28XX_SAA7113, |
83 | .input = {{ | 85 | .input = {{ |
84 | .type = EM28XX_VMUX_COMPOSITE1, | 86 | .type = EM28XX_VMUX_COMPOSITE1, |
85 | .vmux = 0, | 87 | .vmux = SAA7115_COMPOSITE0, |
86 | .amux = 1, | 88 | .amux = 1, |
87 | },{ | 89 | },{ |
88 | .type = EM28XX_VMUX_SVIDEO, | 90 | .type = EM28XX_VMUX_SVIDEO, |
89 | .vmux = 9, | 91 | .vmux = SAA7115_SVIDEO3, |
90 | .amux = 1, | 92 | .amux = 1, |
91 | }}, | 93 | }}, |
92 | }, | 94 | }, |
@@ -100,15 +102,15 @@ struct em28xx_board em28xx_boards[] = { | |||
100 | .decoder = EM28XX_SAA7113, | 102 | .decoder = EM28XX_SAA7113, |
101 | .input = {{ | 103 | .input = {{ |
102 | .type = EM28XX_VMUX_TELEVISION, | 104 | .type = EM28XX_VMUX_TELEVISION, |
103 | .vmux = 2, | 105 | .vmux = SAA7115_COMPOSITE2, |
104 | .amux = 1, | 106 | .amux = 1, |
105 | },{ | 107 | },{ |
106 | .type = EM28XX_VMUX_COMPOSITE1, | 108 | .type = EM28XX_VMUX_COMPOSITE1, |
107 | .vmux = 0, | 109 | .vmux = SAA7115_COMPOSITE0, |
108 | .amux = 1, | 110 | .amux = 1, |
109 | },{ | 111 | },{ |
110 | .type = EM28XX_VMUX_SVIDEO, | 112 | .type = EM28XX_VMUX_SVIDEO, |
111 | .vmux = 9, | 113 | .vmux = SAA7115_SVIDEO3, |
112 | .amux = 1, | 114 | .amux = 1, |
113 | }}, | 115 | }}, |
114 | }, | 116 | }, |
@@ -122,15 +124,15 @@ struct em28xx_board em28xx_boards[] = { | |||
122 | .decoder = EM28XX_SAA7113, | 124 | .decoder = EM28XX_SAA7113, |
123 | .input = {{ | 125 | .input = {{ |
124 | .type = EM28XX_VMUX_TELEVISION, | 126 | .type = EM28XX_VMUX_TELEVISION, |
125 | .vmux = 2, | 127 | .vmux = SAA7115_COMPOSITE2, |
126 | .amux = 0, | 128 | .amux = 0, |
127 | },{ | 129 | },{ |
128 | .type = EM28XX_VMUX_COMPOSITE1, | 130 | .type = EM28XX_VMUX_COMPOSITE1, |
129 | .vmux = 0, | 131 | .vmux = SAA7115_COMPOSITE0, |
130 | .amux = 1, | 132 | .amux = 1, |
131 | },{ | 133 | },{ |
132 | .type = EM28XX_VMUX_SVIDEO, | 134 | .type = EM28XX_VMUX_SVIDEO, |
133 | .vmux = 9, | 135 | .vmux = SAA7115_SVIDEO3, |
134 | .amux = 1, | 136 | .amux = 1, |
135 | }}, | 137 | }}, |
136 | }, | 138 | }, |
@@ -146,11 +148,11 @@ struct em28xx_board em28xx_boards[] = { | |||
146 | /*FIXME: S-Video not tested */ | 148 | /*FIXME: S-Video not tested */ |
147 | .input = {{ | 149 | .input = {{ |
148 | .type = EM28XX_VMUX_TELEVISION, | 150 | .type = EM28XX_VMUX_TELEVISION, |
149 | .vmux = 0, | 151 | .vmux = TVP5150_COMPOSITE0, |
150 | .amux = MSP_INPUT_DEFAULT, | 152 | .amux = MSP_INPUT_DEFAULT, |
151 | },{ | 153 | },{ |
152 | .type = EM28XX_VMUX_SVIDEO, | 154 | .type = EM28XX_VMUX_SVIDEO, |
153 | .vmux = 2, | 155 | .vmux = TVP5150_SVIDEO, |
154 | .amux = MSP_INPUT(MSP_IN_SCART1, MSP_IN_TUNER1, | 156 | .amux = MSP_INPUT(MSP_IN_SCART1, MSP_IN_TUNER1, |
155 | MSP_DSP_IN_SCART, MSP_DSP_IN_SCART), | 157 | MSP_DSP_IN_SCART, MSP_DSP_IN_SCART), |
156 | }}, | 158 | }}, |
@@ -165,15 +167,15 @@ struct em28xx_board em28xx_boards[] = { | |||
165 | .decoder = EM28XX_SAA7114, | 167 | .decoder = EM28XX_SAA7114, |
166 | .input = {{ | 168 | .input = {{ |
167 | .type = EM28XX_VMUX_TELEVISION, | 169 | .type = EM28XX_VMUX_TELEVISION, |
168 | .vmux = 4, | 170 | .vmux = SAA7115_COMPOSITE4, |
169 | .amux = 0, | 171 | .amux = 0, |
170 | },{ | 172 | },{ |
171 | .type = EM28XX_VMUX_COMPOSITE1, | 173 | .type = EM28XX_VMUX_COMPOSITE1, |
172 | .vmux = 0, | 174 | .vmux = SAA7115_COMPOSITE0, |
173 | .amux = 1, | 175 | .amux = 1, |
174 | },{ | 176 | },{ |
175 | .type = EM28XX_VMUX_SVIDEO, | 177 | .type = EM28XX_VMUX_SVIDEO, |
176 | .vmux = 9, | 178 | .vmux = SAA7115_SVIDEO3, |
177 | .amux = 1, | 179 | .amux = 1, |
178 | }}, | 180 | }}, |
179 | }, | 181 | }, |
@@ -188,15 +190,15 @@ struct em28xx_board em28xx_boards[] = { | |||
188 | .decoder = EM28XX_SAA7113, | 190 | .decoder = EM28XX_SAA7113, |
189 | .input = {{ | 191 | .input = {{ |
190 | .type = EM28XX_VMUX_TELEVISION, | 192 | .type = EM28XX_VMUX_TELEVISION, |
191 | .vmux = 2, | 193 | .vmux = SAA7115_COMPOSITE2, |
192 | .amux = 0, | 194 | .amux = 0, |
193 | },{ | 195 | },{ |
194 | .type = EM28XX_VMUX_COMPOSITE1, | 196 | .type = EM28XX_VMUX_COMPOSITE1, |
195 | .vmux = 0, | 197 | .vmux = SAA7115_COMPOSITE0, |
196 | .amux = 1, | 198 | .amux = 1, |
197 | },{ | 199 | },{ |
198 | .type = EM28XX_VMUX_SVIDEO, | 200 | .type = EM28XX_VMUX_SVIDEO, |
199 | .vmux = 9, | 201 | .vmux = SAA7115_SVIDEO3, |
200 | .amux = 1, | 202 | .amux = 1, |
201 | }}, | 203 | }}, |
202 | }, | 204 | }, |
@@ -211,15 +213,15 @@ struct em28xx_board em28xx_boards[] = { | |||
211 | .decoder = EM28XX_SAA7113, | 213 | .decoder = EM28XX_SAA7113, |
212 | .input = {{ | 214 | .input = {{ |
213 | .type = EM28XX_VMUX_TELEVISION, | 215 | .type = EM28XX_VMUX_TELEVISION, |
214 | .vmux = 2, | 216 | .vmux = SAA7115_COMPOSITE2, |
215 | .amux = 0, | 217 | .amux = 0, |
216 | },{ | 218 | },{ |
217 | .type = EM28XX_VMUX_COMPOSITE1, | 219 | .type = EM28XX_VMUX_COMPOSITE1, |
218 | .vmux = 0, | 220 | .vmux = SAA7115_COMPOSITE0, |
219 | .amux = 1, | 221 | .amux = 1, |
220 | },{ | 222 | },{ |
221 | .type = EM28XX_VMUX_SVIDEO, | 223 | .type = EM28XX_VMUX_SVIDEO, |
222 | .vmux = 9, | 224 | .vmux = SAA7115_SVIDEO3, |
223 | .amux = 1, | 225 | .amux = 1, |
224 | }}, | 226 | }}, |
225 | }, | 227 | }, |
@@ -234,15 +236,15 @@ struct em28xx_board em28xx_boards[] = { | |||
234 | .decoder = EM28XX_SAA7113, | 236 | .decoder = EM28XX_SAA7113, |
235 | .input = {{ | 237 | .input = {{ |
236 | .type = EM28XX_VMUX_TELEVISION, | 238 | .type = EM28XX_VMUX_TELEVISION, |
237 | .vmux = 2, | 239 | .vmux = SAA7115_COMPOSITE2, |
238 | .amux = 0, | 240 | .amux = 0, |
239 | },{ | 241 | },{ |
240 | .type = EM28XX_VMUX_COMPOSITE1, | 242 | .type = EM28XX_VMUX_COMPOSITE1, |
241 | .vmux = 0, | 243 | .vmux = SAA7115_COMPOSITE0, |
242 | .amux = 1, | 244 | .amux = 1, |
243 | },{ | 245 | },{ |
244 | .type = EM28XX_VMUX_SVIDEO, | 246 | .type = EM28XX_VMUX_SVIDEO, |
245 | .vmux = 9, | 247 | .vmux = SAA7115_SVIDEO3, |
246 | .amux = 1, | 248 | .amux = 1, |
247 | }}, | 249 | }}, |
248 | }, | 250 | }, |
@@ -254,11 +256,11 @@ struct em28xx_board em28xx_boards[] = { | |||
254 | .decoder = EM28XX_SAA7113, | 256 | .decoder = EM28XX_SAA7113, |
255 | .input = {{ | 257 | .input = {{ |
256 | .type = EM28XX_VMUX_COMPOSITE1, | 258 | .type = EM28XX_VMUX_COMPOSITE1, |
257 | .vmux = 0, | 259 | .vmux = SAA7115_COMPOSITE0, |
258 | .amux = 1, | 260 | .amux = 1, |
259 | },{ | 261 | },{ |
260 | .type = EM28XX_VMUX_SVIDEO, | 262 | .type = EM28XX_VMUX_SVIDEO, |
261 | .vmux = 9, | 263 | .vmux = SAA7115_SVIDEO3, |
262 | .amux = 1, | 264 | .amux = 1, |
263 | }}, | 265 | }}, |
264 | }, | 266 | }, |
@@ -324,8 +326,4 @@ void em28xx_card_setup(struct em28xx *dev) | |||
324 | } | 326 | } |
325 | } | 327 | } |
326 | 328 | ||
327 | EXPORT_SYMBOL(em28xx_boards); | ||
328 | EXPORT_SYMBOL(em28xx_bcount); | ||
329 | EXPORT_SYMBOL(em28xx_id_table); | ||
330 | |||
331 | MODULE_DEVICE_TABLE (usb, em28xx_id_table); | 329 | MODULE_DEVICE_TABLE (usb, em28xx_id_table); |
diff --git a/drivers/media/video/em28xx/em28xx-core.c b/drivers/media/video/em28xx/em28xx-core.c index e5ee8bceb210..4350cc75b025 100644 --- a/drivers/media/video/em28xx/em28xx-core.c +++ b/drivers/media/video/em28xx/em28xx-core.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 | This program is free software; you can redistribute it and/or modify | 9 | This program is free software; you can redistribute it and/or modify |
@@ -317,8 +317,8 @@ int em28xx_outfmt_set_yuv422(struct em28xx *dev) | |||
317 | return em28xx_write_regs(dev, VINCTRL_REG, "\x11", 1); | 317 | return em28xx_write_regs(dev, VINCTRL_REG, "\x11", 1); |
318 | } | 318 | } |
319 | 319 | ||
320 | int em28xx_accumulator_set(struct em28xx *dev, u8 xmin, u8 xmax, u8 ymin, | 320 | static int em28xx_accumulator_set(struct em28xx *dev, u8 xmin, u8 xmax, |
321 | u8 ymax) | 321 | u8 ymin, u8 ymax) |
322 | { | 322 | { |
323 | em28xx_coredbg("em28xx Scale: (%d,%d)-(%d,%d)\n", xmin, ymin, xmax, ymax); | 323 | em28xx_coredbg("em28xx Scale: (%d,%d)-(%d,%d)\n", xmin, ymin, xmax, ymax); |
324 | 324 | ||
@@ -328,7 +328,7 @@ int em28xx_accumulator_set(struct em28xx *dev, u8 xmin, u8 xmax, u8 ymin, | |||
328 | return em28xx_write_regs(dev, YMAX_REG, &ymax, 1); | 328 | return em28xx_write_regs(dev, YMAX_REG, &ymax, 1); |
329 | } | 329 | } |
330 | 330 | ||
331 | int em28xx_capture_area_set(struct em28xx *dev, u8 hstart, u8 vstart, | 331 | static int em28xx_capture_area_set(struct em28xx *dev, u8 hstart, u8 vstart, |
332 | u16 width, u16 height) | 332 | u16 width, u16 height) |
333 | { | 333 | { |
334 | u8 cwidth = width; | 334 | u8 cwidth = width; |
@@ -345,7 +345,7 @@ int em28xx_capture_area_set(struct em28xx *dev, u8 hstart, u8 vstart, | |||
345 | return em28xx_write_regs(dev, OFLOW_REG, &overflow, 1); | 345 | return em28xx_write_regs(dev, OFLOW_REG, &overflow, 1); |
346 | } | 346 | } |
347 | 347 | ||
348 | int em28xx_scaler_set(struct em28xx *dev, u16 h, u16 v) | 348 | static int em28xx_scaler_set(struct em28xx *dev, u16 h, u16 v) |
349 | { | 349 | { |
350 | u8 mode; | 350 | u8 mode; |
351 | /* the em2800 scaler only supports scaling down to 50% */ | 351 | /* the em2800 scaler only supports scaling down to 50% */ |
@@ -534,7 +534,7 @@ static inline void em28xx_isoc_video_copy(struct em28xx *dev, | |||
534 | * em28xx_isoIrq() | 534 | * em28xx_isoIrq() |
535 | * handles the incoming isoc urbs and fills the frames from our inqueue | 535 | * handles the incoming isoc urbs and fills the frames from our inqueue |
536 | */ | 536 | */ |
537 | void em28xx_isocIrq(struct urb *urb, struct pt_regs *regs) | 537 | static void em28xx_isocIrq(struct urb *urb, struct pt_regs *regs) |
538 | { | 538 | { |
539 | struct em28xx *dev = urb->context; | 539 | struct em28xx *dev = urb->context; |
540 | int i, status; | 540 | int i, status; |
diff --git a/drivers/media/video/em28xx/em28xx-i2c.c b/drivers/media/video/em28xx/em28xx-i2c.c index 5b6cece37aee..d829d8f8c1f6 100644 --- a/drivers/media/video/em28xx/em28xx-i2c.c +++ b/drivers/media/video/em28xx/em28xx-i2c.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 | This program is free software; you can redistribute it and/or modify | 9 | This program is free software; you can redistribute it and/or modify |
@@ -399,17 +399,6 @@ static u32 functionality(struct i2c_adapter *adap) | |||
399 | return I2C_FUNC_SMBUS_EMUL; | 399 | return I2C_FUNC_SMBUS_EMUL; |
400 | } | 400 | } |
401 | 401 | ||
402 | #ifndef I2C_PEC | ||
403 | static void inc_use(struct i2c_adapter *adap) | ||
404 | { | ||
405 | MOD_INC_USE_COUNT; | ||
406 | } | ||
407 | |||
408 | static void dec_use(struct i2c_adapter *adap) | ||
409 | { | ||
410 | MOD_DEC_USE_COUNT; | ||
411 | } | ||
412 | #endif | ||
413 | 402 | ||
414 | static int em28xx_set_tuner(int check_eeprom, struct i2c_client *client) | 403 | static int em28xx_set_tuner(int check_eeprom, struct i2c_client *client) |
415 | { | 404 | { |
@@ -436,9 +425,19 @@ static int attach_inform(struct i2c_client *client) | |||
436 | struct em28xx *dev = client->adapter->algo_data; | 425 | struct em28xx *dev = client->adapter->algo_data; |
437 | 426 | ||
438 | switch (client->addr << 1) { | 427 | switch (client->addr << 1) { |
439 | case 0x86: | 428 | case 0x43: |
429 | case 0x4b: | ||
430 | { | ||
431 | struct tuner_setup tun_setup; | ||
432 | |||
433 | tun_setup.mode_mask = T_ANALOG_TV | T_RADIO; | ||
434 | tun_setup.type = TUNER_TDA9887; | ||
435 | tun_setup.addr = client->addr; | ||
436 | |||
437 | em28xx_i2c_call_clients(dev, TUNER_SET_TYPE_ADDR, &tun_setup); | ||
440 | em28xx_i2c_call_clients(dev, TDA9887_SET_CONFIG, &dev->tda9887_conf); | 438 | em28xx_i2c_call_clients(dev, TDA9887_SET_CONFIG, &dev->tda9887_conf); |
441 | break; | 439 | break; |
440 | } | ||
442 | case 0x42: | 441 | case 0x42: |
443 | dprintk1(1,"attach_inform: saa7114 detected.\n"); | 442 | dprintk1(1,"attach_inform: saa7114 detected.\n"); |
444 | break; | 443 | break; |
@@ -464,6 +463,7 @@ static int attach_inform(struct i2c_client *client) | |||
464 | case 0xba: | 463 | case 0xba: |
465 | dprintk1(1,"attach_inform: tvp5150 detected.\n"); | 464 | dprintk1(1,"attach_inform: tvp5150 detected.\n"); |
466 | break; | 465 | break; |
466 | |||
467 | default: | 467 | default: |
468 | dprintk1(1,"attach inform: detected I2C address %x\n", client->addr << 1); | 468 | dprintk1(1,"attach inform: detected I2C address %x\n", client->addr << 1); |
469 | dev->tuner_addr = client->addr; | 469 | dev->tuner_addr = client->addr; |
@@ -480,12 +480,7 @@ static struct i2c_algorithm em28xx_algo = { | |||
480 | }; | 480 | }; |
481 | 481 | ||
482 | static struct i2c_adapter em28xx_adap_template = { | 482 | static struct i2c_adapter em28xx_adap_template = { |
483 | #ifdef I2C_PEC | ||
484 | .owner = THIS_MODULE, | 483 | .owner = THIS_MODULE, |
485 | #else | ||
486 | .inc_use = inc_use, | ||
487 | .dec_use = dec_use, | ||
488 | #endif | ||
489 | .class = I2C_CLASS_TV_ANALOG, | 484 | .class = I2C_CLASS_TV_ANALOG, |
490 | .name = "em28xx", | 485 | .name = "em28xx", |
491 | .id = I2C_HW_B_EM28XX, | 486 | .id = I2C_HW_B_EM28XX, |
diff --git a/drivers/media/video/em28xx/em28xx-input.c b/drivers/media/video/em28xx/em28xx-input.c index 31e89e4f18be..3ffb5684f127 100644 --- a/drivers/media/video/em28xx/em28xx-input.c +++ b/drivers/media/video/em28xx/em28xx-input.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 | This program is free software; you can redistribute it and/or modify | 9 | This program is free software; you can redistribute it and/or modify |
@@ -105,7 +105,7 @@ static int get_key_em_haup(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw) | |||
105 | return 1; | 105 | return 1; |
106 | } | 106 | } |
107 | 107 | ||
108 | static int get_key_pinnacle_usb(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw) | 108 | static int get_key_pinnacle_usb_grey(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw) |
109 | { | 109 | { |
110 | unsigned char buf[3]; | 110 | unsigned char buf[3]; |
111 | 111 | ||
@@ -148,8 +148,8 @@ void em28xx_set_ir(struct em28xx * dev,struct IR_i2c *ir) | |||
148 | snprintf(ir->c.name, sizeof(ir->c.name), "i2c IR (EM28XX Terratec)"); | 148 | snprintf(ir->c.name, sizeof(ir->c.name), "i2c IR (EM28XX Terratec)"); |
149 | break; | 149 | break; |
150 | case (EM2820_BOARD_PINNACLE_USB_2): | 150 | case (EM2820_BOARD_PINNACLE_USB_2): |
151 | ir->ir_codes = ir_codes_em_pinnacle_usb; | 151 | ir->ir_codes = ir_codes_pinnacle_grey; |
152 | ir->get_key = get_key_pinnacle_usb; | 152 | ir->get_key = get_key_pinnacle_usb_grey; |
153 | snprintf(ir->c.name, sizeof(ir->c.name), "i2c IR (EM28XX Pinnacle PCTV)"); | 153 | snprintf(ir->c.name, sizeof(ir->c.name), "i2c IR (EM28XX Pinnacle PCTV)"); |
154 | break; | 154 | break; |
155 | case (EM2820_BOARD_HAUPPAUGE_WINTV_USB_2): | 155 | case (EM2820_BOARD_HAUPPAUGE_WINTV_USB_2): |
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; |
diff --git a/drivers/media/video/em28xx/em28xx.h b/drivers/media/video/em28xx/em28xx.h index e1ddc2f27a21..d8fcc9e17ac0 100644 --- a/drivers/media/video/em28xx/em28xx.h +++ b/drivers/media/video/em28xx/em28xx.h | |||
@@ -3,7 +3,7 @@ | |||
3 | 3 | ||
4 | Copyright (C) 2005 Markus Rechberger <mrechberger@gmail.com> | 4 | Copyright (C) 2005 Markus Rechberger <mrechberger@gmail.com> |
5 | Ludovico Cavedon <cavedon@sssup.it> | 5 | Ludovico Cavedon <cavedon@sssup.it> |
6 | Mauro Carvalho Chehab <mchehab@brturbo.com.br> | 6 | Mauro Carvalho Chehab <mchehab@infradead.org> |
7 | 7 | ||
8 | Based on the em2800 driver from Sascha Sommer <saschasommer@freenet.de> | 8 | Based on the em2800 driver from Sascha Sommer <saschasommer@freenet.de> |
9 | 9 | ||
@@ -319,13 +319,7 @@ int em28xx_audio_analog_set(struct em28xx *dev); | |||
319 | int em28xx_colorlevels_set_default(struct em28xx *dev); | 319 | int em28xx_colorlevels_set_default(struct em28xx *dev); |
320 | int em28xx_capture_start(struct em28xx *dev, int start); | 320 | int em28xx_capture_start(struct em28xx *dev, int start); |
321 | int em28xx_outfmt_set_yuv422(struct em28xx *dev); | 321 | int em28xx_outfmt_set_yuv422(struct em28xx *dev); |
322 | int em28xx_accumulator_set(struct em28xx *dev, u8 xmin, u8 xmax, u8 ymin, | ||
323 | u8 ymax); | ||
324 | int em28xx_capture_area_set(struct em28xx *dev, u8 hstart, u8 vstart, | ||
325 | u16 width, u16 height); | ||
326 | int em28xx_scaler_set(struct em28xx *dev, u16 h, u16 v); | ||
327 | int em28xx_resolution_set(struct em28xx *dev); | 322 | int em28xx_resolution_set(struct em28xx *dev); |
328 | void em28xx_isocIrq(struct urb *urb, struct pt_regs *regs); | ||
329 | int em28xx_init_isoc(struct em28xx *dev); | 323 | int em28xx_init_isoc(struct em28xx *dev); |
330 | void em28xx_uninit_isoc(struct em28xx *dev); | 324 | void em28xx_uninit_isoc(struct em28xx *dev); |
331 | int em28xx_set_alternate(struct em28xx *dev); | 325 | int em28xx_set_alternate(struct em28xx *dev); |