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.c80
1 files changed, 73 insertions, 7 deletions
diff --git a/drivers/media/video/em28xx/em28xx-cards.c b/drivers/media/video/em28xx/em28xx-cards.c
index 25100001ffff..ecbcefb08739 100644
--- a/drivers/media/video/em28xx/em28xx-cards.c
+++ b/drivers/media/video/em28xx/em28xx-cards.c
@@ -232,6 +232,12 @@ static struct em28xx_reg_seq vc211a_enable[] = {
232 { -1, -1, -1, -1}, 232 { -1, -1, -1, -1},
233}; 233};
234 234
235static struct em28xx_reg_seq dikom_dk300_digital[] = {
236 {EM28XX_R08_GPIO, 0x6e, ~EM_GPIO_4, 10},
237 {EM2880_R04_GPO, 0x08, 0xff, 10},
238 { -1, -1, -1, -1},
239};
240
235 241
236/* 242/*
237 * Board definitions 243 * Board definitions
@@ -461,21 +467,30 @@ struct em28xx_board em28xx_boards[] = {
461 .name = "Leadtek Winfast USB II Deluxe", 467 .name = "Leadtek Winfast USB II Deluxe",
462 .valid = EM28XX_BOARD_NOT_VALIDATED, 468 .valid = EM28XX_BOARD_NOT_VALIDATED,
463 .tuner_type = TUNER_PHILIPS_FM1216ME_MK3, 469 .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
464 .tda9887_conf = TDA9887_PRESENT, 470 .has_ir_i2c = 1,
471 .tvaudio_addr = 0x58,
472 .tda9887_conf = TDA9887_PRESENT |
473 TDA9887_PORT2_ACTIVE |
474 TDA9887_QSS,
465 .decoder = EM28XX_SAA711X, 475 .decoder = EM28XX_SAA711X,
476 .adecoder = EM28XX_TVAUDIO,
466 .input = { { 477 .input = { {
467 .type = EM28XX_VMUX_TELEVISION, 478 .type = EM28XX_VMUX_TELEVISION,
468 .vmux = SAA7115_COMPOSITE2, 479 .vmux = SAA7115_COMPOSITE4,
469 .amux = EM28XX_AMUX_VIDEO, 480 .amux = EM28XX_AMUX_AUX,
470 }, { 481 }, {
471 .type = EM28XX_VMUX_COMPOSITE1, 482 .type = EM28XX_VMUX_COMPOSITE1,
472 .vmux = SAA7115_COMPOSITE0, 483 .vmux = SAA7115_COMPOSITE5,
473 .amux = EM28XX_AMUX_LINE_IN, 484 .amux = EM28XX_AMUX_LINE_IN,
474 }, { 485 }, {
475 .type = EM28XX_VMUX_SVIDEO, 486 .type = EM28XX_VMUX_SVIDEO,
476 .vmux = SAA7115_COMPOSITE0, 487 .vmux = SAA7115_SVIDEO3,
477 .amux = EM28XX_AMUX_LINE_IN, 488 .amux = EM28XX_AMUX_LINE_IN,
478 } }, 489 } },
490 .radio = {
491 .type = EM28XX_RADIO,
492 .amux = EM28XX_AMUX_AUX,
493 }
479 }, 494 },
480 [EM2820_BOARD_VIDEOLOGY_20K14XUSB] = { 495 [EM2820_BOARD_VIDEOLOGY_20K14XUSB] = {
481 .name = "Videology 20K14XUSB USB2.0", 496 .name = "Videology 20K14XUSB USB2.0",
@@ -730,11 +745,12 @@ struct em28xx_board em28xx_boards[] = {
730 745
731 [EM2880_BOARD_TERRATEC_HYBRID_XS_FR] = { 746 [EM2880_BOARD_TERRATEC_HYBRID_XS_FR] = {
732 .name = "Terratec Hybrid XS Secam", 747 .name = "Terratec Hybrid XS Secam",
733 .valid = EM28XX_BOARD_NOT_VALIDATED,
734 .has_msp34xx = 1, 748 .has_msp34xx = 1,
735 .tuner_type = TUNER_XC2028, 749 .tuner_type = TUNER_XC2028,
736 .tuner_gpio = default_tuner_gpio, 750 .tuner_gpio = default_tuner_gpio,
737 .decoder = EM28XX_TVP5150, 751 .decoder = EM28XX_TVP5150,
752 .has_dvb = 1,
753 .dvb_gpio = default_digital,
738 .input = { { 754 .input = { {
739 .type = EM28XX_VMUX_TELEVISION, 755 .type = EM28XX_VMUX_TELEVISION,
740 .vmux = TVP5150_COMPOSITE0, 756 .vmux = TVP5150_COMPOSITE0,
@@ -1265,6 +1281,7 @@ struct em28xx_board em28xx_boards[] = {
1265 .decoder = EM28XX_SAA711X, 1281 .decoder = EM28XX_SAA711X,
1266 .has_dvb = 1, 1282 .has_dvb = 1,
1267 .dvb_gpio = em2882_kworld_315u_digital, 1283 .dvb_gpio = em2882_kworld_315u_digital,
1284 .ir_codes = &ir_codes_kworld_315u_table,
1268 .xclk = EM28XX_XCLK_FREQUENCY_12MHZ, 1285 .xclk = EM28XX_XCLK_FREQUENCY_12MHZ,
1269 .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE, 1286 .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE,
1270 /* Analog mode - still not ready */ 1287 /* Analog mode - still not ready */
@@ -1431,6 +1448,21 @@ struct em28xx_board em28xx_boards[] = {
1431 .gpio = hauppauge_wintv_hvr_900_analog, 1448 .gpio = hauppauge_wintv_hvr_900_analog,
1432 } }, 1449 } },
1433 }, 1450 },
1451 [EM2882_BOARD_DIKOM_DK300] = {
1452 .name = "Dikom DK300",
1453 .tuner_type = TUNER_XC2028,
1454 .tuner_gpio = default_tuner_gpio,
1455 .decoder = EM28XX_TVP5150,
1456 .mts_firmware = 1,
1457 .has_dvb = 1,
1458 .dvb_gpio = dikom_dk300_digital,
1459 .input = { {
1460 .type = EM28XX_VMUX_TELEVISION,
1461 .vmux = TVP5150_COMPOSITE0,
1462 .amux = EM28XX_AMUX_VIDEO,
1463 .gpio = default_analog,
1464 } },
1465 },
1434 [EM2883_BOARD_KWORLD_HYBRID_330U] = { 1466 [EM2883_BOARD_KWORLD_HYBRID_330U] = {
1435 .name = "Kworld PlusTV HD Hybrid 330", 1467 .name = "Kworld PlusTV HD Hybrid 330",
1436 .tuner_type = TUNER_XC2028, 1468 .tuner_type = TUNER_XC2028,
@@ -1751,6 +1783,7 @@ static struct em28xx_hash_table em28xx_eeprom_hash[] = {
1751 {0xcee44a99, EM2882_BOARD_EVGA_INDTUBE, TUNER_XC2028}, 1783 {0xcee44a99, EM2882_BOARD_EVGA_INDTUBE, TUNER_XC2028},
1752 {0xb8846b20, EM2881_BOARD_PINNACLE_HYBRID_PRO, TUNER_XC2028}, 1784 {0xb8846b20, EM2881_BOARD_PINNACLE_HYBRID_PRO, TUNER_XC2028},
1753 {0x63f653bd, EM2870_BOARD_REDDO_DVB_C_USB_BOX, TUNER_ABSENT}, 1785 {0x63f653bd, EM2870_BOARD_REDDO_DVB_C_USB_BOX, TUNER_ABSENT},
1786 {0x4e913442, EM2882_BOARD_DIKOM_DK300, TUNER_XC2028},
1754}; 1787};
1755 1788
1756/* I2C devicelist hash table for devices with generic USB IDs */ 1789/* I2C devicelist hash table for devices with generic USB IDs */
@@ -2103,6 +2136,7 @@ static void em28xx_setup_xc3028(struct em28xx *dev, struct xc2028_ctrl *ctl)
2103 ctl->demod = XC3028_FE_DEFAULT; 2136 ctl->demod = XC3028_FE_DEFAULT;
2104 break; 2137 break;
2105 case EM2883_BOARD_KWORLD_HYBRID_330U: 2138 case EM2883_BOARD_KWORLD_HYBRID_330U:
2139 case EM2882_BOARD_DIKOM_DK300:
2106 ctl->demod = XC3028_FE_CHINA; 2140 ctl->demod = XC3028_FE_CHINA;
2107 ctl->fname = XC2028_DEFAULT_FIRMWARE; 2141 ctl->fname = XC2028_DEFAULT_FIRMWARE;
2108 break; 2142 break;
@@ -2259,9 +2293,12 @@ static int em28xx_hint_board(struct em28xx *dev)
2259/* ----------------------------------------------------------------------- */ 2293/* ----------------------------------------------------------------------- */
2260void em28xx_register_i2c_ir(struct em28xx *dev) 2294void em28xx_register_i2c_ir(struct em28xx *dev)
2261{ 2295{
2296 /* Leadtek winfast tv USBII deluxe can find a non working IR-device */
2297 /* at address 0x18, so if that address is needed for another board in */
2298 /* the future, please put it after 0x1f. */
2262 struct i2c_board_info info; 2299 struct i2c_board_info info;
2263 const unsigned short addr_list[] = { 2300 const unsigned short addr_list[] = {
2264 0x30, 0x47, I2C_CLIENT_END 2301 0x1f, 0x30, 0x47, I2C_CLIENT_END
2265 }; 2302 };
2266 2303
2267 if (disable_ir) 2304 if (disable_ir)
@@ -2288,6 +2325,10 @@ void em28xx_register_i2c_ir(struct em28xx *dev)
2288 dev->init_data.ir_codes = &ir_codes_rc5_hauppauge_new_table; 2325 dev->init_data.ir_codes = &ir_codes_rc5_hauppauge_new_table;
2289 dev->init_data.get_key = em28xx_get_key_em_haup; 2326 dev->init_data.get_key = em28xx_get_key_em_haup;
2290 dev->init_data.name = "i2c IR (EM2840 Hauppauge)"; 2327 dev->init_data.name = "i2c IR (EM2840 Hauppauge)";
2328 case EM2820_BOARD_LEADTEK_WINFAST_USBII_DELUXE:
2329 dev->init_data.ir_codes = &ir_codes_winfast_usbii_deluxe_table;;
2330 dev->init_data.get_key = em28xx_get_key_winfast_usbii_deluxe;
2331 dev->init_data.name = "i2c IR (EM2820 Winfast TV USBII Deluxe)";
2291 break; 2332 break;
2292 } 2333 }
2293 2334
@@ -2381,6 +2422,31 @@ void em28xx_card_setup(struct em28xx *dev)
2381 em28xx_gpio_set(dev, dev->board.tuner_gpio); 2422 em28xx_gpio_set(dev, dev->board.tuner_gpio);
2382 em28xx_set_mode(dev, EM28XX_ANALOG_MODE); 2423 em28xx_set_mode(dev, EM28XX_ANALOG_MODE);
2383 break; 2424 break;
2425
2426/*
2427 * The Dikom DK300 is detected as an Kworld VS-DVB-T 323UR.
2428 *
2429 * This occurs because they share identical USB vendor and
2430 * product IDs.
2431 *
2432 * What we do here is look up the EEPROM hash of the Dikom
2433 * and if it is found then we decide that we do not have
2434 * a Kworld and reset the device to the Dikom instead.
2435 *
2436 * This solution is only valid if they do not share eeprom
2437 * hash identities which has not been determined as yet.
2438 */
2439 case EM2882_BOARD_KWORLD_VS_DVBT:
2440 if (!em28xx_hint_board(dev))
2441 em28xx_set_model(dev);
2442
2443 /* In cases where we had to use a board hint, the call to
2444 em28xx_set_mode() in em28xx_pre_card_setup() was a no-op,
2445 so make the call now so the analog GPIOs are set properly
2446 before probing the i2c bus. */
2447 em28xx_gpio_set(dev, dev->board.tuner_gpio);
2448 em28xx_set_mode(dev, EM28XX_ANALOG_MODE);
2449 break;
2384 } 2450 }
2385 2451
2386#if defined(CONFIG_MODULES) && defined(MODULE) 2452#if defined(CONFIG_MODULES) && defined(MODULE)