aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/em28xx/em28xx-cards.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/em28xx/em28xx-cards.c')
-rw-r--r--drivers/media/video/em28xx/em28xx-cards.c72
1 files changed, 57 insertions, 15 deletions
diff --git a/drivers/media/video/em28xx/em28xx-cards.c b/drivers/media/video/em28xx/em28xx-cards.c
index 58f7b4194a0d..4e22fc4889e1 100644
--- a/drivers/media/video/em28xx/em28xx-cards.c
+++ b/drivers/media/video/em28xx/em28xx-cards.c
@@ -72,6 +72,24 @@ struct em28xx_board em28xx_boards[] = {
72 .amux = 1, 72 .amux = 1,
73 }}, 73 }},
74 }, 74 },
75 [EM2820_BOARD_KWORLD_PVRTV2800RF] = {
76 .name = "Kworld PVR TV 2800 RF",
77 .is_em2800 = 0,
78 .vchannels = 2,
79 .norm = VIDEO_MODE_PAL,
80 .tda9887_conf = TDA9887_PRESENT,
81 .has_tuner = 1,
82 .decoder = EM28XX_SAA7113,
83 .input = {{
84 .type = EM28XX_VMUX_COMPOSITE1,
85 .vmux = 0,
86 .amux = 1,
87 },{
88 .type = EM28XX_VMUX_SVIDEO,
89 .vmux = 9,
90 .amux = 1,
91 }},
92 },
75 [EM2820_BOARD_TERRATEC_CINERGY_250] = { 93 [EM2820_BOARD_TERRATEC_CINERGY_250] = {
76 .name = "Terratec Cinergy 250 USB", 94 .name = "Terratec Cinergy 250 USB",
77 .vchannels = 3, 95 .vchannels = 3,
@@ -83,7 +101,7 @@ struct em28xx_board em28xx_boards[] = {
83 .input = {{ 101 .input = {{
84 .type = EM28XX_VMUX_TELEVISION, 102 .type = EM28XX_VMUX_TELEVISION,
85 .vmux = 2, 103 .vmux = 2,
86 .amux = 0, 104 .amux = 1,
87 },{ 105 },{
88 .type = EM28XX_VMUX_COMPOSITE1, 106 .type = EM28XX_VMUX_COMPOSITE1,
89 .vmux = 0, 107 .vmux = 0,
@@ -257,27 +275,51 @@ struct usb_device_id em28xx_id_table [] = {
257 { }, 275 { },
258}; 276};
259 277
278void em28xx_pre_card_setup(struct em28xx *dev)
279{
280 /* request some modules */
281 switch(dev->model){
282 case EM2880_BOARD_TERRATEC_PRODIGY_XS:
283 case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900:
284 case EM2880_BOARD_TERRATEC_HYBRID_XS:
285 {
286 em28xx_write_regs_req(dev, 0x00, 0x08, "\x7d", 1); // reset through GPIO?
287 break;
288 }
289 }
290}
291
260void em28xx_card_setup(struct em28xx *dev) 292void em28xx_card_setup(struct em28xx *dev)
261{ 293{
262 /* request some modules */ 294 /* request some modules */
263 if (dev->model == EM2820_BOARD_HAUPPAUGE_WINTV_USB_2) { 295 switch(dev->model){
264 struct tveeprom tv; 296 case EM2820_BOARD_HAUPPAUGE_WINTV_USB_2:
297 {
298 struct tveeprom tv;
265#ifdef CONFIG_MODULES 299#ifdef CONFIG_MODULES
266 request_module("tveeprom"); 300 request_module("tveeprom");
267 request_module("ir-kbd-i2c"); 301 request_module("ir-kbd-i2c");
268 request_module("msp3400"); 302 request_module("msp3400");
269#endif 303#endif
270 /* Call first TVeeprom */ 304 /* Call first TVeeprom */
305
306 dev->i2c_client.addr = 0xa0 >> 1;
307 tveeprom_hauppauge_analog(&dev->i2c_client, &tv, dev->eedata);
271 308
272 dev->i2c_client.addr = 0xa0 >> 1; 309 dev->tuner_type= tv.tuner_type;
273 tveeprom_hauppauge_analog(&dev->i2c_client, &tv, dev->eedata); 310 if (tv.audio_processor == AUDIO_CHIP_MSP34XX) {
311 dev->i2s_speed=2048000;
312 dev->has_msp34xx=1;
313 } else
314 dev->has_msp34xx=0;
315 break;
316 }
317 case EM2820_BOARD_KWORLD_PVRTV2800RF:
318 {
319 em28xx_write_regs_req(dev,0x00,0x08, "\xf9", 1); // GPIO enables sound on KWORLD PVR TV 2800RF
320 break;
321 }
274 322
275 dev->tuner_type= tv.tuner_type;
276 if (tv.audio_processor == AUDIO_CHIP_MSP34XX) {
277 dev->i2s_speed=2048000;
278 dev->has_msp34xx=1;
279 } else
280 dev->has_msp34xx=0;
281 } 323 }
282} 324}
283 325