aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2013-02-28 08:35:56 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2013-03-19 14:13:50 -0400
commit4159d01bea38ee82f6e49383b7e73e328c118755 (patch)
tree3bb882ea02e348b7777d875c879dcf5f30bd4ad6 /drivers/media
parent401f6a2729988c7229c3a78bba0d2f73851e3f51 (diff)
[media] em28xx: Add ISDB support for c3tech Digital duo
This is an hybrid board. However, for analog, it requires a new driver for saa7136. So, for now, let's just add support for Digital TV. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/usb/em28xx/Kconfig1
-rw-r--r--drivers/media/usb/em28xx/em28xx-cards.c24
-rw-r--r--drivers/media/usb/em28xx/em28xx-dvb.c26
-rw-r--r--drivers/media/usb/em28xx/em28xx.h1
4 files changed, 52 insertions, 0 deletions
diff --git a/drivers/media/usb/em28xx/Kconfig b/drivers/media/usb/em28xx/Kconfig
index c754a80a8d8b..ca5ee6aceb62 100644
--- a/drivers/media/usb/em28xx/Kconfig
+++ b/drivers/media/usb/em28xx/Kconfig
@@ -46,6 +46,7 @@ config VIDEO_EM28XX_DVB
46 select DVB_A8293 if MEDIA_SUBDRV_AUTOSELECT 46 select DVB_A8293 if MEDIA_SUBDRV_AUTOSELECT
47 select DVB_MT352 if MEDIA_SUBDRV_AUTOSELECT 47 select DVB_MT352 if MEDIA_SUBDRV_AUTOSELECT
48 select DVB_S5H1409 if MEDIA_SUBDRV_AUTOSELECT 48 select DVB_S5H1409 if MEDIA_SUBDRV_AUTOSELECT
49 select DVB_MB86A20S if MEDIA_SUBDRV_AUTOSELECT
49 select MEDIA_TUNER_QT1010 if MEDIA_SUBDRV_AUTOSELECT 50 select MEDIA_TUNER_QT1010 if MEDIA_SUBDRV_AUTOSELECT
50 select MEDIA_TUNER_TDA18271 if MEDIA_SUBDRV_AUTOSELECT 51 select MEDIA_TUNER_TDA18271 if MEDIA_SUBDRV_AUTOSELECT
51 ---help--- 52 ---help---
diff --git a/drivers/media/usb/em28xx/em28xx-cards.c b/drivers/media/usb/em28xx/em28xx-cards.c
index 6e62b72376b0..46fff5c3335b 100644
--- a/drivers/media/usb/em28xx/em28xx-cards.c
+++ b/drivers/media/usb/em28xx/em28xx-cards.c
@@ -345,6 +345,18 @@ static struct em28xx_reg_seq pctv_460e[] = {
345 { -1, -1, -1, -1}, 345 { -1, -1, -1, -1},
346}; 346};
347 347
348static struct em28xx_reg_seq c3tech_digital_duo_digital[] = {
349 {EM2874_R80_GPIO, 0xff, 0xff, 10},
350 {EM2874_R80_GPIO, 0xfd, 0xff, 10}, /* xc5000 reset */
351 {EM2874_R80_GPIO, 0xf9, 0xff, 35},
352 {EM2874_R80_GPIO, 0xfd, 0xff, 10},
353 {EM2874_R80_GPIO, 0xff, 0xff, 10},
354 {EM2874_R80_GPIO, 0xfe, 0xff, 10},
355 {EM2874_R80_GPIO, 0xbe, 0xff, 10},
356 {EM2874_R80_GPIO, 0xfe, 0xff, 20},
357 { -1, -1, -1, -1},
358};
359
348#if 0 360#if 0
349static struct em28xx_reg_seq hauppauge_930c_gpio[] = { 361static struct em28xx_reg_seq hauppauge_930c_gpio[] = {
350 {EM2874_R80_GPIO, 0x6f, 0xff, 10}, 362 {EM2874_R80_GPIO, 0x6f, 0xff, 10},
@@ -978,6 +990,16 @@ struct em28xx_board em28xx_boards[] = {
978 .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE | 990 .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE |
979 EM28XX_I2C_FREQ_400_KHZ, 991 EM28XX_I2C_FREQ_400_KHZ,
980 }, 992 },
993 [EM2884_BOARD_C3TECH_DIGITAL_DUO] = {
994 .name = "C3 Tech Digital Duo HDTV/SDTV USB",
995 .has_dvb = 1,
996 /* FIXME: Add analog support - need a saa7136 driver */
997 .tuner_type = TUNER_ABSENT, /* Digital-only TDA18271HD */
998 .ir_codes = RC_MAP_EMPTY,
999 .def_i2c_bus = 1,
1000 .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE,
1001 .dvb_gpio = c3tech_digital_duo_digital,
1002 },
981 [EM2884_BOARD_CINERGY_HTC_STICK] = { 1003 [EM2884_BOARD_CINERGY_HTC_STICK] = {
982 .name = "Terratec Cinergy HTC Stick", 1004 .name = "Terratec Cinergy HTC Stick",
983 .has_dvb = 1, 1005 .has_dvb = 1,
@@ -2144,6 +2166,8 @@ struct usb_device_id em28xx_id_table[] = {
2144 .driver_info = EM28174_BOARD_PCTV_460E }, 2166 .driver_info = EM28174_BOARD_PCTV_460E },
2145 { USB_DEVICE(0x2040, 0x1605), 2167 { USB_DEVICE(0x2040, 0x1605),
2146 .driver_info = EM2884_BOARD_HAUPPAUGE_WINTV_HVR_930C }, 2168 .driver_info = EM2884_BOARD_HAUPPAUGE_WINTV_HVR_930C },
2169 { USB_DEVICE(0x1b80, 0xe755),
2170 .driver_info = EM2884_BOARD_C3TECH_DIGITAL_DUO },
2147 { USB_DEVICE(0xeb1a, 0x5006), 2171 { USB_DEVICE(0xeb1a, 0x5006),
2148 .driver_info = EM2860_BOARD_HT_VIDBOX_NW03 }, 2172 .driver_info = EM2860_BOARD_HT_VIDBOX_NW03 },
2149 { USB_DEVICE(0x1b80, 0xe309), /* Sveon STV40 */ 2173 { USB_DEVICE(0x1b80, 0xe309), /* Sveon STV40 */
diff --git a/drivers/media/usb/em28xx/em28xx-dvb.c b/drivers/media/usb/em28xx/em28xx-dvb.c
index 98b95be3be6e..42a6a2696224 100644
--- a/drivers/media/usb/em28xx/em28xx-dvb.c
+++ b/drivers/media/usb/em28xx/em28xx-dvb.c
@@ -50,6 +50,7 @@
50#include "tda10071.h" 50#include "tda10071.h"
51#include "a8293.h" 51#include "a8293.h"
52#include "qt1010.h" 52#include "qt1010.h"
53#include "mb86a20s.h"
53 54
54MODULE_DESCRIPTION("driver for em28xx based DVB cards"); 55MODULE_DESCRIPTION("driver for em28xx based DVB cards");
55MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@infradead.org>"); 56MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@infradead.org>");
@@ -766,9 +767,25 @@ static struct zl10353_config em28xx_zl10353_no_i2c_gate_dev = {
766}; 767};
767static struct qt1010_config em28xx_qt1010_config = { 768static struct qt1010_config em28xx_qt1010_config = {
768 .i2c_address = 0x62 769 .i2c_address = 0x62
770};
771
772static const struct mb86a20s_config c3tech_duo_mb86a20s_config = {
773 .demod_address = 0x10,
774 .is_serial = true,
775};
776
777static struct tda18271_std_map mb86a20s_tda18271_config = {
778 .dvbt_6 = { .if_freq = 4000, .agc_mode = 3, .std = 4,
779 .if_lvl = 1, .rfagc_top = 0x37, },
780};
769 781
782static struct tda18271_config c3tech_duo_tda18271_config = {
783 .std_map = &mb86a20s_tda18271_config,
784 .gate = TDA18271_GATE_DIGITAL,
785 .small_i2c = TDA18271_03_BYTE_CHUNK_INIT,
770}; 786};
771 787
788
772/* ------------------------------------------------------------------ */ 789/* ------------------------------------------------------------------ */
773 790
774static int em28xx_attach_xc3028(u8 addr, struct em28xx *dev) 791static int em28xx_attach_xc3028(u8 addr, struct em28xx *dev)
@@ -1177,6 +1194,15 @@ static int em28xx_dvb_init(struct em28xx *dev)
1177 dvb->fe[0]->ops.i2c_gate_ctrl(dvb->fe[0], 0); 1194 dvb->fe[0]->ops.i2c_gate_ctrl(dvb->fe[0], 0);
1178 1195
1179 break; 1196 break;
1197 case EM2884_BOARD_C3TECH_DIGITAL_DUO:
1198 dvb->fe[0] = dvb_attach(mb86a20s_attach,
1199 &c3tech_duo_mb86a20s_config,
1200 &dev->i2c_adap[dev->def_i2c_bus]);
1201 if (dvb->fe[0] != NULL)
1202 dvb_attach(tda18271_attach, dvb->fe[0], 0x60,
1203 &dev->i2c_adap[dev->def_i2c_bus],
1204 &c3tech_duo_tda18271_config);
1205 break;
1180 case EM28174_BOARD_PCTV_460E: 1206 case EM28174_BOARD_PCTV_460E:
1181 /* attach demod */ 1207 /* attach demod */
1182 dvb->fe[0] = dvb_attach(tda10071_attach, 1208 dvb->fe[0] = dvb_attach(tda10071_attach,
diff --git a/drivers/media/usb/em28xx/em28xx.h b/drivers/media/usb/em28xx/em28xx.h
index f6ac1df83816..4c667fd1661d 100644
--- a/drivers/media/usb/em28xx/em28xx.h
+++ b/drivers/media/usb/em28xx/em28xx.h
@@ -129,6 +129,7 @@
129#define EM2884_BOARD_PCTV_510E 85 129#define EM2884_BOARD_PCTV_510E 85
130#define EM2884_BOARD_PCTV_520E 86 130#define EM2884_BOARD_PCTV_520E 86
131#define EM2884_BOARD_TERRATEC_HTC_USB_XS 87 131#define EM2884_BOARD_TERRATEC_HTC_USB_XS 87
132#define EM2884_BOARD_C3TECH_DIGITAL_DUO 88
132 133
133/* Limits minimum and default number of buffers */ 134/* Limits minimum and default number of buffers */
134#define EM28XX_MIN_BUF 4 135#define EM28XX_MIN_BUF 4