aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/video/em28xx/Kconfig1
-rw-r--r--drivers/media/video/em28xx/em28xx-cards.c66
-rw-r--r--drivers/media/video/em28xx/em28xx-dvb.c16
-rw-r--r--drivers/media/video/em28xx/em28xx.h2
4 files changed, 81 insertions, 4 deletions
diff --git a/drivers/media/video/em28xx/Kconfig b/drivers/media/video/em28xx/Kconfig
index 66aefd6eef55..8d38c5fdece0 100644
--- a/drivers/media/video/em28xx/Kconfig
+++ b/drivers/media/video/em28xx/Kconfig
@@ -37,6 +37,7 @@ config VIDEO_EM28XX_DVB
37 select DVB_LGDT330X if !DVB_FE_CUSTOMISE 37 select DVB_LGDT330X if !DVB_FE_CUSTOMISE
38 select DVB_ZL10353 if !DVB_FE_CUSTOMISE 38 select DVB_ZL10353 if !DVB_FE_CUSTOMISE
39 select DVB_TDA10023 if !DVB_FE_CUSTOMISE 39 select DVB_TDA10023 if !DVB_FE_CUSTOMISE
40 select DVB_S921 if !DVB_FE_CUSTOMISE
40 select VIDEOBUF_DVB 41 select VIDEOBUF_DVB
41 ---help--- 42 ---help---
42 This adds support for DVB cards based on the 43 This adds support for DVB cards based on the
diff --git a/drivers/media/video/em28xx/em28xx-cards.c b/drivers/media/video/em28xx/em28xx-cards.c
index f7e9168157a5..24caa8512ba8 100644
--- a/drivers/media/video/em28xx/em28xx-cards.c
+++ b/drivers/media/video/em28xx/em28xx-cards.c
@@ -268,6 +268,20 @@ static struct em28xx_reg_seq dikom_dk300_digital[] = {
268}; 268};
269 269
270 270
271/* Reset for the most [digital] boards */
272static struct em28xx_reg_seq leadership_digital[] = {
273 {EM2874_R80_GPIO, 0x70, 0xff, 10},
274 { -1, -1, -1, -1},
275};
276
277static struct em28xx_reg_seq leadership_reset[] = {
278 {EM2874_R80_GPIO, 0xf0, 0xff, 10},
279 {EM2874_R80_GPIO, 0xb0, 0xff, 10},
280 {EM2874_R80_GPIO, 0xf0, 0xff, 10},
281 { -1, -1, -1, -1},
282};
283
284
271/* 285/*
272 * Board definitions 286 * Board definitions
273 */ 287 */
@@ -1224,6 +1238,19 @@ struct em28xx_board em28xx_boards[] = {
1224 .vmux = SAA7115_COMPOSITE0, 1238 .vmux = SAA7115_COMPOSITE0,
1225 } }, 1239 } },
1226 }, 1240 },
1241
1242 [EM2874_LEADERSHIP_ISDBT] = {
1243 .i2c_speed = EM2874_I2C_SECONDARY_BUS_SELECT |
1244 EM28XX_I2C_CLK_WAIT_ENABLE |
1245 EM28XX_I2C_FREQ_100_KHZ,
1246 .xclk = EM28XX_XCLK_FREQUENCY_10MHZ,
1247 .name = "EM2874 Leadership ISDBT",
1248 .tuner_type = TUNER_ABSENT,
1249 .tuner_gpio = leadership_reset,
1250 .dvb_gpio = leadership_digital,
1251 .has_dvb = 1,
1252 },
1253
1227 [EM2880_BOARD_MSI_DIGIVOX_AD] = { 1254 [EM2880_BOARD_MSI_DIGIVOX_AD] = {
1228 .name = "MSI DigiVox A/D", 1255 .name = "MSI DigiVox A/D",
1229 .valid = EM28XX_BOARD_NOT_VALIDATED, 1256 .valid = EM28XX_BOARD_NOT_VALIDATED,
@@ -1754,6 +1781,8 @@ struct usb_device_id em28xx_id_table[] = {
1754 .driver_info = EM2820_BOARD_UNKNOWN }, 1781 .driver_info = EM2820_BOARD_UNKNOWN },
1755 { USB_DEVICE(0xeb1a, 0x2868), 1782 { USB_DEVICE(0xeb1a, 0x2868),
1756 .driver_info = EM2820_BOARD_UNKNOWN }, 1783 .driver_info = EM2820_BOARD_UNKNOWN },
1784 { USB_DEVICE(0xeb1a, 0x2875),
1785 .driver_info = EM2820_BOARD_UNKNOWN },
1757 { USB_DEVICE(0xeb1a, 0xe300), 1786 { USB_DEVICE(0xeb1a, 0xe300),
1758 .driver_info = EM2861_BOARD_KWORLD_PVRTV_300U }, 1787 .driver_info = EM2861_BOARD_KWORLD_PVRTV_300U },
1759 { USB_DEVICE(0xeb1a, 0xe303), 1788 { USB_DEVICE(0xeb1a, 0xe303),
@@ -1873,6 +1902,7 @@ static struct em28xx_hash_table em28xx_i2c_hash[] = {
1873 {0x77800080, EM2860_BOARD_TVP5150_REFERENCE_DESIGN, TUNER_ABSENT}, 1902 {0x77800080, EM2860_BOARD_TVP5150_REFERENCE_DESIGN, TUNER_ABSENT},
1874 {0xc51200e3, EM2820_BOARD_GADMEI_TVR200, TUNER_LG_PAL_NEW_TAPC}, 1903 {0xc51200e3, EM2820_BOARD_GADMEI_TVR200, TUNER_LG_PAL_NEW_TAPC},
1875 {0x4ba50080, EM2861_BOARD_GADMEI_UTV330PLUS, TUNER_TNF_5335MF}, 1904 {0x4ba50080, EM2861_BOARD_GADMEI_UTV330PLUS, TUNER_TNF_5335MF},
1905 {0x6b800080, EM2874_LEADERSHIP_ISDBT, TUNER_ABSENT},
1876}; 1906};
1877 1907
1878/* I2C possible address to saa7115, tvp5150, msp3400, tvaudio */ 1908/* I2C possible address to saa7115, tvp5150, msp3400, tvaudio */
@@ -2430,8 +2460,36 @@ void em28xx_card_setup(struct em28xx *dev)
2430 dev->board.is_webcam = 0; 2460 dev->board.is_webcam = 0;
2431 else 2461 else
2432 dev->progressive = 1; 2462 dev->progressive = 1;
2433 } else 2463 }
2434 em28xx_set_model(dev); 2464
2465 if (!dev->board.is_webcam) {
2466 switch (dev->model) {
2467 case EM2820_BOARD_UNKNOWN:
2468 case EM2800_BOARD_UNKNOWN:
2469 /*
2470 * The K-WORLD DVB-T 310U is detected as an MSI Digivox AD.
2471 *
2472 * This occurs because they share identical USB vendor and
2473 * product IDs.
2474 *
2475 * What we do here is look up the EEPROM hash of the K-WORLD
2476 * and if it is found then we decide that we do not have
2477 * a DIGIVOX and reset the device to the K-WORLD instead.
2478 *
2479 * This solution is only valid if they do not share eeprom
2480 * hash identities which has not been determined as yet.
2481 */
2482 if (em28xx_hint_board(dev) < 0)
2483 em28xx_errdev("Board not discovered\n");
2484 else {
2485 em28xx_set_model(dev);
2486 em28xx_pre_card_setup(dev);
2487 }
2488 break;
2489 default:
2490 em28xx_set_model(dev);
2491 }
2492 }
2435 2493
2436 em28xx_info("Identified as %s (card=%d)\n", 2494 em28xx_info("Identified as %s (card=%d)\n",
2437 dev->board.name, dev->model); 2495 dev->board.name, dev->model);
@@ -2749,8 +2807,8 @@ static int em28xx_init_dev(struct em28xx **devhandle, struct usb_device *udev,
2749 em28xx_pre_card_setup(dev); 2807 em28xx_pre_card_setup(dev);
2750 2808
2751 if (!dev->board.is_em2800) { 2809 if (!dev->board.is_em2800) {
2752 /* Sets I2C speed to 100 KHz */ 2810 /* Resets I2C speed */
2753 retval = em28xx_write_reg(dev, EM28XX_R06_I2C_CLK, 0x40); 2811 em28xx_write_reg(dev, EM28XX_R06_I2C_CLK, dev->board.i2c_speed);
2754 if (retval < 0) { 2812 if (retval < 0) {
2755 em28xx_errdev("%s: em28xx_write_regs_req failed!" 2813 em28xx_errdev("%s: em28xx_write_regs_req failed!"
2756 " retval [%d]\n", 2814 " retval [%d]\n",
diff --git a/drivers/media/video/em28xx/em28xx-dvb.c b/drivers/media/video/em28xx/em28xx-dvb.c
index 3ac8d3025fea..c7c04bf712aa 100644
--- a/drivers/media/video/em28xx/em28xx-dvb.c
+++ b/drivers/media/video/em28xx/em28xx-dvb.c
@@ -37,6 +37,7 @@
37#include "mt352_priv.h" /* FIXME */ 37#include "mt352_priv.h" /* FIXME */
38#include "tda1002x.h" 38#include "tda1002x.h"
39#include "tda18271.h" 39#include "tda18271.h"
40#include "s921.h"
40 41
41MODULE_DESCRIPTION("driver for em28xx based DVB cards"); 42MODULE_DESCRIPTION("driver for em28xx based DVB cards");
42MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@infradead.org>"); 43MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@infradead.org>");
@@ -245,6 +246,10 @@ static struct lgdt3305_config em2870_lgdt3304_dev = {
245 .qam_if_khz = 4000, 246 .qam_if_khz = 4000,
246}; 247};
247 248
249static struct s921_config sharp_isdbt = {
250 .demod_address = 0x30 >> 1
251};
252
248static struct zl10353_config em28xx_zl10353_with_xc3028 = { 253static struct zl10353_config em28xx_zl10353_with_xc3028 = {
249 .demod_address = (0x1e >> 1), 254 .demod_address = (0x1e >> 1),
250 .no_tuner = 1, 255 .no_tuner = 1,
@@ -481,6 +486,7 @@ static int dvb_init(struct em28xx *dev)
481 486
482 if (!dev->board.has_dvb) { 487 if (!dev->board.has_dvb) {
483 /* This device does not support the extension */ 488 /* This device does not support the extension */
489 printk(KERN_INFO "em28xx_dvb: This device does not support the extension\n");
484 return 0; 490 return 0;
485 } 491 }
486 492
@@ -496,6 +502,16 @@ static int dvb_init(struct em28xx *dev)
496 em28xx_set_mode(dev, EM28XX_DIGITAL_MODE); 502 em28xx_set_mode(dev, EM28XX_DIGITAL_MODE);
497 /* init frontend */ 503 /* init frontend */
498 switch (dev->model) { 504 switch (dev->model) {
505 case EM2874_LEADERSHIP_ISDBT:
506 dvb->frontend = dvb_attach(s921_attach,
507 &sharp_isdbt, &dev->i2c_adap);
508
509 if (!dvb->frontend) {
510 result = -EINVAL;
511 goto out_free;
512 }
513
514 break;
499 case EM2883_BOARD_HAUPPAUGE_WINTV_HVR_850: 515 case EM2883_BOARD_HAUPPAUGE_WINTV_HVR_850:
500 case EM2883_BOARD_HAUPPAUGE_WINTV_HVR_950: 516 case EM2883_BOARD_HAUPPAUGE_WINTV_HVR_950:
501 case EM2880_BOARD_PINNACLE_PCTV_HD_PRO: 517 case EM2880_BOARD_PINNACLE_PCTV_HD_PRO:
diff --git a/drivers/media/video/em28xx/em28xx.h b/drivers/media/video/em28xx/em28xx.h
index 6a75e6a4fc21..6a48043a7b92 100644
--- a/drivers/media/video/em28xx/em28xx.h
+++ b/drivers/media/video/em28xx/em28xx.h
@@ -117,6 +117,8 @@
117#define EM2800_BOARD_VC211A 74 117#define EM2800_BOARD_VC211A 74
118#define EM2882_BOARD_DIKOM_DK300 75 118#define EM2882_BOARD_DIKOM_DK300 75
119#define EM2870_BOARD_KWORLD_A340 76 119#define EM2870_BOARD_KWORLD_A340 76
120#define EM2874_LEADERSHIP_ISDBT 77
121
120 122
121/* Limits minimum and default number of buffers */ 123/* Limits minimum and default number of buffers */
122#define EM28XX_MIN_BUF 4 124#define EM28XX_MIN_BUF 4