aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAndrea.Amorosi76@gmail.com <Andrea.Amorosi76@gmail.com>2010-02-09 15:53:38 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-02-26 13:10:57 -0500
commit7ca7ef6011e92b52a365ddc78f6668e01793c572 (patch)
tree74cb19fc4e03435403b90aa6144438849574132a /drivers
parent62bdbb735c0415c2ffdddc2269a860a76f7f716a (diff)
V4L/DVB: em28xx: add Dikom DK300 hybrid USB tuner
Adds digital and analogue tv support for Dikom DK300 hybrid usb card. Not working: remote controller To be done: it seems that with the proposed patch the digital demodulator remains activated if the tuner is switched from digital to analogue mode. Workaround is to unplug and replug the device when switching from digital to analogue. If someone can explain how to verify the gpio settings using the usbsnoop, the above issue perhaps can be resolved. Signed-off-by: Andrea Amorosi <Andrea.Amorosi76@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/video/em28xx/em28xx-cards.c48
-rw-r--r--drivers/media/video/em28xx/em28xx-dvb.c1
-rw-r--r--drivers/media/video/em28xx/em28xx.h1
3 files changed, 50 insertions, 0 deletions
diff --git a/drivers/media/video/em28xx/em28xx-cards.c b/drivers/media/video/em28xx/em28xx-cards.c
index 62ca31d44b56..48d7f7e284ad 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
@@ -1440,6 +1446,21 @@ struct em28xx_board em28xx_boards[] = {
1440 .gpio = hauppauge_wintv_hvr_900_analog, 1446 .gpio = hauppauge_wintv_hvr_900_analog,
1441 } }, 1447 } },
1442 }, 1448 },
1449 [EM2882_BOARD_DIKOM_DK300] = {
1450 .name = "Dikom DK300",
1451 .tuner_type = TUNER_XC2028,
1452 .tuner_gpio = default_tuner_gpio,
1453 .decoder = EM28XX_TVP5150,
1454 .mts_firmware = 1,
1455 .has_dvb = 1,
1456 .dvb_gpio = dikom_dk300_digital,
1457 .input = { {
1458 .type = EM28XX_VMUX_TELEVISION,
1459 .vmux = TVP5150_COMPOSITE0,
1460 .amux = EM28XX_AMUX_VIDEO,
1461 .gpio = default_analog,
1462 } },
1463 },
1443 [EM2883_BOARD_KWORLD_HYBRID_330U] = { 1464 [EM2883_BOARD_KWORLD_HYBRID_330U] = {
1444 .name = "Kworld PlusTV HD Hybrid 330", 1465 .name = "Kworld PlusTV HD Hybrid 330",
1445 .tuner_type = TUNER_XC2028, 1466 .tuner_type = TUNER_XC2028,
@@ -1760,6 +1781,7 @@ static struct em28xx_hash_table em28xx_eeprom_hash[] = {
1760 {0xcee44a99, EM2882_BOARD_EVGA_INDTUBE, TUNER_XC2028}, 1781 {0xcee44a99, EM2882_BOARD_EVGA_INDTUBE, TUNER_XC2028},
1761 {0xb8846b20, EM2881_BOARD_PINNACLE_HYBRID_PRO, TUNER_XC2028}, 1782 {0xb8846b20, EM2881_BOARD_PINNACLE_HYBRID_PRO, TUNER_XC2028},
1762 {0x63f653bd, EM2870_BOARD_REDDO_DVB_C_USB_BOX, TUNER_ABSENT}, 1783 {0x63f653bd, EM2870_BOARD_REDDO_DVB_C_USB_BOX, TUNER_ABSENT},
1784 {0x4e913442, EM2882_BOARD_DIKOM_DK300, TUNER_XC2028},
1763}; 1785};
1764 1786
1765/* I2C devicelist hash table for devices with generic USB IDs */ 1787/* I2C devicelist hash table for devices with generic USB IDs */
@@ -2112,6 +2134,7 @@ static void em28xx_setup_xc3028(struct em28xx *dev, struct xc2028_ctrl *ctl)
2112 ctl->demod = XC3028_FE_DEFAULT; 2134 ctl->demod = XC3028_FE_DEFAULT;
2113 break; 2135 break;
2114 case EM2883_BOARD_KWORLD_HYBRID_330U: 2136 case EM2883_BOARD_KWORLD_HYBRID_330U:
2137 case EM2882_BOARD_DIKOM_DK300:
2115 ctl->demod = XC3028_FE_CHINA; 2138 ctl->demod = XC3028_FE_CHINA;
2116 ctl->fname = XC2028_DEFAULT_FIRMWARE; 2139 ctl->fname = XC2028_DEFAULT_FIRMWARE;
2117 break; 2140 break;
@@ -2397,6 +2420,31 @@ void em28xx_card_setup(struct em28xx *dev)
2397 em28xx_gpio_set(dev, dev->board.tuner_gpio); 2420 em28xx_gpio_set(dev, dev->board.tuner_gpio);
2398 em28xx_set_mode(dev, EM28XX_ANALOG_MODE); 2421 em28xx_set_mode(dev, EM28XX_ANALOG_MODE);
2399 break; 2422 break;
2423
2424/*
2425 * The Dikom DK300 is detected as an Kworld VS-DVB-T 323UR.
2426 *
2427 * This occurs because they share identical USB vendor and
2428 * product IDs.
2429 *
2430 * What we do here is look up the EEPROM hash of the Dikom
2431 * and if it is found then we decide that we do not have
2432 * a Kworld and reset the device to the Dikom instead.
2433 *
2434 * This solution is only valid if they do not share eeprom
2435 * hash identities which has not been determined as yet.
2436 */
2437 case EM2882_BOARD_KWORLD_VS_DVBT:
2438 if (!em28xx_hint_board(dev))
2439 em28xx_set_model(dev);
2440
2441 /* In cases where we had to use a board hint, the call to
2442 em28xx_set_mode() in em28xx_pre_card_setup() was a no-op,
2443 so make the call now so the analog GPIOs are set properly
2444 before probing the i2c bus. */
2445 em28xx_gpio_set(dev, dev->board.tuner_gpio);
2446 em28xx_set_mode(dev, EM28XX_ANALOG_MODE);
2447 break;
2400 } 2448 }
2401 2449
2402#if defined(CONFIG_MODULES) && defined(MODULE) 2450#if defined(CONFIG_MODULES) && defined(MODULE)
diff --git a/drivers/media/video/em28xx/em28xx-dvb.c b/drivers/media/video/em28xx/em28xx-dvb.c
index 6b0a4953ab0e..fcf8c10eac45 100644
--- a/drivers/media/video/em28xx/em28xx-dvb.c
+++ b/drivers/media/video/em28xx/em28xx-dvb.c
@@ -503,6 +503,7 @@ static int dvb_init(struct em28xx *dev)
503 break; 503 break;
504 case EM2880_BOARD_TERRATEC_HYBRID_XS: 504 case EM2880_BOARD_TERRATEC_HYBRID_XS:
505 case EM2881_BOARD_PINNACLE_HYBRID_PRO: 505 case EM2881_BOARD_PINNACLE_HYBRID_PRO:
506 case EM2882_BOARD_DIKOM_DK300:
506 dvb->frontend = dvb_attach(zl10353_attach, 507 dvb->frontend = dvb_attach(zl10353_attach,
507 &em28xx_zl10353_xc3028_no_i2c_gate, 508 &em28xx_zl10353_xc3028_no_i2c_gate,
508 &dev->i2c_adap); 509 &dev->i2c_adap);
diff --git a/drivers/media/video/em28xx/em28xx.h b/drivers/media/video/em28xx/em28xx.h
index 0cb8d151cd0b..ba6fe5daff84 100644
--- a/drivers/media/video/em28xx/em28xx.h
+++ b/drivers/media/video/em28xx/em28xx.h
@@ -111,6 +111,7 @@
111#define EM2861_BOARD_GADMEI_UTV330PLUS 72 111#define EM2861_BOARD_GADMEI_UTV330PLUS 72
112#define EM2870_BOARD_REDDO_DVB_C_USB_BOX 73 112#define EM2870_BOARD_REDDO_DVB_C_USB_BOX 73
113#define EM2800_BOARD_VC211A 74 113#define EM2800_BOARD_VC211A 74
114#define EM2882_BOARD_DIKOM_DK300 75
114 115
115/* Limits minimum and default number of buffers */ 116/* Limits minimum and default number of buffers */
116#define EM28XX_MIN_BUF 4 117#define EM28XX_MIN_BUF 4