aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <m.chehab@samsung.com>2014-03-03 14:28:39 -0500
committerMauro Carvalho Chehab <m.chehab@samsung.com>2014-03-04 12:43:59 -0500
commit02bc1f5574e7324c03c49b3d2892e9e404d777be (patch)
treeaff7ef1639517a687d4b12b189c1c7473aa6228b /drivers/media
parent6cff36b23b66f437be904407601117fc74071db3 (diff)
[media] em28xx: add support for Kworld UB435-Q version 3
This device is close to Kworld UB435-Q, but it uses a different tuner. Add support for it. Tested with both 8VSB and 256QAM modulations. Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/usb/em28xx/Kconfig1
-rw-r--r--drivers/media/usb/em28xx/em28xx-cards.c23
-rw-r--r--drivers/media/usb/em28xx/em28xx-dvb.c36
-rw-r--r--drivers/media/usb/em28xx/em28xx.h1
4 files changed, 61 insertions, 0 deletions
diff --git a/drivers/media/usb/em28xx/Kconfig b/drivers/media/usb/em28xx/Kconfig
index 7fb02875a1e6..d23a912096f7 100644
--- a/drivers/media/usb/em28xx/Kconfig
+++ b/drivers/media/usb/em28xx/Kconfig
@@ -53,6 +53,7 @@ config VIDEO_EM28XX_DVB
53 select DVB_MB86A20S if MEDIA_SUBDRV_AUTOSELECT 53 select DVB_MB86A20S if MEDIA_SUBDRV_AUTOSELECT
54 select MEDIA_TUNER_QT1010 if MEDIA_SUBDRV_AUTOSELECT 54 select MEDIA_TUNER_QT1010 if MEDIA_SUBDRV_AUTOSELECT
55 select MEDIA_TUNER_TDA18271 if MEDIA_SUBDRV_AUTOSELECT 55 select MEDIA_TUNER_TDA18271 if MEDIA_SUBDRV_AUTOSELECT
56 select MEDIA_TUNER_TDA18212 if MEDIA_SUBDRV_AUTOSELECT
56 select DVB_M88DS3103 if MEDIA_SUBDRV_AUTOSELECT 57 select DVB_M88DS3103 if MEDIA_SUBDRV_AUTOSELECT
57 select MEDIA_TUNER_M88TS2022 if MEDIA_SUBDRV_AUTOSELECT 58 select MEDIA_TUNER_M88TS2022 if MEDIA_SUBDRV_AUTOSELECT
58 select DVB_DRX39XYJ if MEDIA_SUBDRV_AUTOSELECT 59 select DVB_DRX39XYJ if MEDIA_SUBDRV_AUTOSELECT
diff --git a/drivers/media/usb/em28xx/em28xx-cards.c b/drivers/media/usb/em28xx/em28xx-cards.c
index 138659b23cbb..5cd2df14bf1a 100644
--- a/drivers/media/usb/em28xx/em28xx-cards.c
+++ b/drivers/media/usb/em28xx/em28xx-cards.c
@@ -189,6 +189,14 @@ static struct em28xx_reg_seq kworld_a340_digital[] = {
189 { -1, -1, -1, -1}, 189 { -1, -1, -1, -1},
190}; 190};
191 191
192static struct em28xx_reg_seq kworld_ub435q_v3_digital[] = {
193 {EM2874_R80_GPIO_P0_CTRL, 0xff, 0xff, 100},
194 {EM2874_R80_GPIO_P0_CTRL, 0xfe, 0xff, 100},
195 {EM2874_R80_GPIO_P0_CTRL, 0xbe, 0xff, 100},
196 {EM2874_R80_GPIO_P0_CTRL, 0xfe, 0xff, 100},
197 { -1, -1, -1, -1},
198};
199
192/* Pinnacle Hybrid Pro eb1a:2881 */ 200/* Pinnacle Hybrid Pro eb1a:2881 */
193static struct em28xx_reg_seq pinnacle_hybrid_pro_analog[] = { 201static struct em28xx_reg_seq pinnacle_hybrid_pro_analog[] = {
194 {EM2820_R08_GPIO_CTRL, 0xfd, ~EM_GPIO_4, 10}, 202 {EM2820_R08_GPIO_CTRL, 0xfd, ~EM_GPIO_4, 10},
@@ -2139,6 +2147,19 @@ struct em28xx_board em28xx_boards[] = {
2139 .tuner_gpio = default_tuner_gpio, 2147 .tuner_gpio = default_tuner_gpio,
2140 .def_i2c_bus = 1, 2148 .def_i2c_bus = 1,
2141 }, 2149 },
2150 /*
2151 * 1b80:e34c KWorld USB ATSC TV Stick UB435-Q V3
2152 * Empia EM2874B + LG DT3305 + NXP TDA18271HDC2
2153 */
2154 [EM2874_BOARD_KWORLD_UB435Q_V3] = {
2155 .name = "KWorld USB ATSC TV Stick UB435-Q V3",
2156 .tuner_type = TUNER_ABSENT,
2157 .has_dvb = 1,
2158 .tuner_gpio = kworld_ub435q_v3_digital,
2159 .def_i2c_bus = 1,
2160 .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE |
2161 EM28XX_I2C_FREQ_100_KHZ,
2162 },
2142 [EM2874_BOARD_PCTV_HD_MINI_80E] = { 2163 [EM2874_BOARD_PCTV_HD_MINI_80E] = {
2143 .name = "Pinnacle PCTV HD Mini", 2164 .name = "Pinnacle PCTV HD Mini",
2144 .tuner_type = TUNER_ABSENT, 2165 .tuner_type = TUNER_ABSENT,
@@ -2325,6 +2346,8 @@ struct usb_device_id em28xx_id_table[] = {
2325 .driver_info = EM2870_BOARD_KWORLD_A340 }, 2346 .driver_info = EM2870_BOARD_KWORLD_A340 },
2326 { USB_DEVICE(0x1b80, 0xe346), 2347 { USB_DEVICE(0x1b80, 0xe346),
2327 .driver_info = EM2874_BOARD_KWORLD_UB435Q_V2 }, 2348 .driver_info = EM2874_BOARD_KWORLD_UB435Q_V2 },
2349 { USB_DEVICE(0x1b80, 0xe34c),
2350 .driver_info = EM2874_BOARD_KWORLD_UB435Q_V3 },
2328 { USB_DEVICE(0x2013, 0x024f), 2351 { USB_DEVICE(0x2013, 0x024f),
2329 .driver_info = EM28174_BOARD_PCTV_290E }, 2352 .driver_info = EM28174_BOARD_PCTV_290E },
2330 { USB_DEVICE(0x2013, 0x024c), 2353 { USB_DEVICE(0x2013, 0x024c),
diff --git a/drivers/media/usb/em28xx/em28xx-dvb.c b/drivers/media/usb/em28xx/em28xx-dvb.c
index a63a3a2fbd55..d4986bdfbdc3 100644
--- a/drivers/media/usb/em28xx/em28xx-dvb.c
+++ b/drivers/media/usb/em28xx/em28xx-dvb.c
@@ -49,6 +49,7 @@
49#include "tda18271c2dd.h" 49#include "tda18271c2dd.h"
50#include "drxk.h" 50#include "drxk.h"
51#include "tda10071.h" 51#include "tda10071.h"
52#include "tda18212.h"
52#include "a8293.h" 53#include "a8293.h"
53#include "qt1010.h" 54#include "qt1010.h"
54#include "mb86a20s.h" 55#include "mb86a20s.h"
@@ -320,6 +321,18 @@ static struct lgdt3305_config em2874_lgdt3305_dev = {
320 .qam_if_khz = 4000, 321 .qam_if_khz = 4000,
321}; 322};
322 323
324static struct lgdt3305_config em2874_lgdt3305_nogate_dev = {
325 .i2c_addr = 0x0e,
326 .demod_chip = LGDT3305,
327 .spectral_inversion = 1,
328 .deny_i2c_rptr = 1,
329 .mpeg_mode = LGDT3305_MPEG_SERIAL,
330 .tpclk_edge = LGDT3305_TPCLK_FALLING_EDGE,
331 .tpvalid_polarity = LGDT3305_TP_VALID_HIGH,
332 .vsb_if_khz = 3600,
333 .qam_if_khz = 3600,
334};
335
323static struct s921_config sharp_isdbt = { 336static struct s921_config sharp_isdbt = {
324 .demod_address = 0x30 >> 1 337 .demod_address = 0x30 >> 1
325}; 338};
@@ -356,6 +369,12 @@ static struct tda18271_config kworld_ub435q_v2_config = {
356 .gate = TDA18271_GATE_DIGITAL, 369 .gate = TDA18271_GATE_DIGITAL,
357}; 370};
358 371
372static struct tda18212_config kworld_ub435q_v3_config = {
373 .i2c_address = 0x60,
374 .if_atsc_vsb = 3600,
375 .if_atsc_qam = 3600,
376};
377
359static struct zl10353_config em28xx_zl10353_xc3028_no_i2c_gate = { 378static struct zl10353_config em28xx_zl10353_xc3028_no_i2c_gate = {
360 .demod_address = (0x1e >> 1), 379 .demod_address = (0x1e >> 1),
361 .no_tuner = 1, 380 .no_tuner = 1,
@@ -1389,6 +1408,23 @@ static int em28xx_dvb_init(struct em28xx *dev)
1389 goto out_free; 1408 goto out_free;
1390 } 1409 }
1391 break; 1410 break;
1411 case EM2874_BOARD_KWORLD_UB435Q_V3:
1412 dvb->fe[0] = dvb_attach(lgdt3305_attach,
1413 &em2874_lgdt3305_nogate_dev,
1414 &dev->i2c_adap[dev->def_i2c_bus]);
1415 if (!dvb->fe[0]) {
1416 result = -EINVAL;
1417 goto out_free;
1418 }
1419
1420 /* Attach the demodulator. */
1421 if (!dvb_attach(tda18212_attach, dvb->fe[0],
1422 &dev->i2c_adap[dev->def_i2c_bus],
1423 &kworld_ub435q_v3_config)) {
1424 result = -EINVAL;
1425 goto out_free;
1426 }
1427 break;
1392 case EM2874_BOARD_PCTV_HD_MINI_80E: 1428 case EM2874_BOARD_PCTV_HD_MINI_80E:
1393 dvb->fe[0] = dvb_attach(drx39xxj_attach, &dev->i2c_adap[dev->def_i2c_bus]); 1429 dvb->fe[0] = dvb_attach(drx39xxj_attach, &dev->i2c_adap[dev->def_i2c_bus]);
1394 if (dvb->fe[0] != NULL) { 1430 if (dvb->fe[0] != NULL) {
diff --git a/drivers/media/usb/em28xx/em28xx.h b/drivers/media/usb/em28xx/em28xx.h
index 90e7cec389fb..3b08556376e3 100644
--- a/drivers/media/usb/em28xx/em28xx.h
+++ b/drivers/media/usb/em28xx/em28xx.h
@@ -138,6 +138,7 @@
138#define EM2874_BOARD_KWORLD_UB435Q_V2 90 138#define EM2874_BOARD_KWORLD_UB435Q_V2 90
139#define EM2765_BOARD_SPEEDLINK_VAD_LAPLACE 91 139#define EM2765_BOARD_SPEEDLINK_VAD_LAPLACE 91
140#define EM28178_BOARD_PCTV_461E 92 140#define EM28178_BOARD_PCTV_461E 92
141#define EM2874_BOARD_KWORLD_UB435Q_V3 93
141 142
142/* Limits minimum and default number of buffers */ 143/* Limits minimum and default number of buffers */
143#define EM28XX_MIN_BUF 4 144#define EM28XX_MIN_BUF 4