aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/media/dvb/dvb-usb/Kconfig2
-rw-r--r--drivers/media/dvb/dvb-usb/dib0700_devices.c95
-rw-r--r--drivers/media/dvb/dvb-usb/dvb-usb-ids.h2
3 files changed, 99 insertions, 0 deletions
diff --git a/drivers/media/dvb/dvb-usb/Kconfig b/drivers/media/dvb/dvb-usb/Kconfig
index 64fa1d182347..b899d509adf6 100644
--- a/drivers/media/dvb/dvb-usb/Kconfig
+++ b/drivers/media/dvb/dvb-usb/Kconfig
@@ -73,11 +73,13 @@ config DVB_USB_DIB0700
73 select DVB_DIB7000M if !DVB_FE_CUSTOMISE 73 select DVB_DIB7000M if !DVB_FE_CUSTOMISE
74 select DVB_DIB3000MC if !DVB_FE_CUSTOMISE 74 select DVB_DIB3000MC if !DVB_FE_CUSTOMISE
75 select DVB_S5H1411 if !DVB_FE_CUSTOMISE 75 select DVB_S5H1411 if !DVB_FE_CUSTOMISE
76 select DVB_LGDT3305 if !DVB_FE_CUSTOMISE
76 select DVB_TUNER_DIB0070 if !DVB_FE_CUSTOMISE 77 select DVB_TUNER_DIB0070 if !DVB_FE_CUSTOMISE
77 select MEDIA_TUNER_MT2060 if !MEDIA_TUNER_CUSTOMIZE 78 select MEDIA_TUNER_MT2060 if !MEDIA_TUNER_CUSTOMIZE
78 select MEDIA_TUNER_MT2266 if !MEDIA_TUNER_CUSTOMIZE 79 select MEDIA_TUNER_MT2266 if !MEDIA_TUNER_CUSTOMIZE
79 select MEDIA_TUNER_XC2028 if !MEDIA_TUNER_CUSTOMIZE 80 select MEDIA_TUNER_XC2028 if !MEDIA_TUNER_CUSTOMIZE
80 select MEDIA_TUNER_XC5000 if !MEDIA_TUNER_CUSTOMIZE 81 select MEDIA_TUNER_XC5000 if !MEDIA_TUNER_CUSTOMIZE
82 select MEDIA_TUNER_MXL5007T if !MEDIA_TUNER_CUSTOMIZE
81 help 83 help
82 Support for USB2.0/1.1 DVB receivers based on the DiB0700 USB bridge. The 84 Support for USB2.0/1.1 DVB receivers based on the DiB0700 USB bridge. The
83 USB bridge is also present in devices having the DiB7700 DVB-T-USB 85 USB bridge is also present in devices having the DiB7700 DVB-T-USB
diff --git a/drivers/media/dvb/dvb-usb/dib0700_devices.c b/drivers/media/dvb/dvb-usb/dib0700_devices.c
index 8877215cb243..1dba4ea96756 100644
--- a/drivers/media/dvb/dvb-usb/dib0700_devices.c
+++ b/drivers/media/dvb/dvb-usb/dib0700_devices.c
@@ -17,6 +17,8 @@
17#include "xc5000.h" 17#include "xc5000.h"
18#include "s5h1411.h" 18#include "s5h1411.h"
19#include "dib0070.h" 19#include "dib0070.h"
20#include "lgdt3305.h"
21#include "mxl5007t.h"
20 22
21static int force_lna_activation; 23static int force_lna_activation;
22module_param(force_lna_activation, int, 0644); 24module_param(force_lna_activation, int, 0644);
@@ -1370,6 +1372,72 @@ static int xc5000_tuner_attach(struct dvb_usb_adapter *adap)
1370 == NULL ? -ENODEV : 0; 1372 == NULL ? -ENODEV : 0;
1371} 1373}
1372 1374
1375static struct lgdt3305_config hcw_lgdt3305_config = {
1376 .i2c_addr = 0x0e,
1377 .mpeg_mode = LGDT3305_MPEG_PARALLEL,
1378 .tpclk_edge = LGDT3305_TPCLK_FALLING_EDGE,
1379 .tpvalid_polarity = LGDT3305_TP_VALID_LOW,
1380 .deny_i2c_rptr = 0,
1381 .spectral_inversion = 1,
1382 .qam_if_khz = 6000,
1383 .vsb_if_khz = 6000,
1384 .usref_8vsb = 0x0500,
1385};
1386
1387static struct mxl5007t_config hcw_mxl5007t_config = {
1388 .xtal_freq_hz = MxL_XTAL_25_MHZ,
1389 .if_freq_hz = MxL_IF_6_MHZ,
1390 .invert_if = 1,
1391};
1392
1393/* TIGER-ATSC map:
1394 GPIO0 - LNA_CTR (H: LNA power enabled, L: LNA power disabled)
1395 GPIO1 - ANT_SEL (H: VPA, L: MCX)
1396 GPIO4 - SCL2
1397 GPIO6 - EN_TUNER
1398 GPIO7 - SDA2
1399 GPIO10 - DEM_RST
1400
1401 MXL is behind LG's i2c repeater. LG is on SCL2/SDA2 gpios on the DIB
1402 */
1403static int lgdt3305_frontend_attach(struct dvb_usb_adapter *adap)
1404{
1405 struct dib0700_state *st = adap->dev->priv;
1406
1407 /* Make use of the new i2c functions from FW 1.20 */
1408 st->fw_use_new_i2c_api = 1;
1409
1410 st->disable_streaming_master_mode = 1;
1411
1412 /* fe power enable */
1413 dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 0);
1414 msleep(30);
1415 dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 1);
1416 msleep(30);
1417
1418 /* demod reset */
1419 dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 1);
1420 msleep(30);
1421 dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 0);
1422 msleep(30);
1423 dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 1);
1424 msleep(30);
1425
1426 adap->fe = dvb_attach(lgdt3305_attach,
1427 &hcw_lgdt3305_config,
1428 &adap->dev->i2c_adap);
1429
1430 return adap->fe == NULL ? -ENODEV : 0;
1431}
1432
1433static int mxl5007t_tuner_attach(struct dvb_usb_adapter *adap)
1434{
1435 return dvb_attach(mxl5007t_attach, adap->fe,
1436 &adap->dev->i2c_adap, 0x60,
1437 &hcw_mxl5007t_config) == NULL ? -ENODEV : 0;
1438}
1439
1440
1373/* DVB-USB and USB stuff follows */ 1441/* DVB-USB and USB stuff follows */
1374struct usb_device_id dib0700_usb_id_table[] = { 1442struct usb_device_id dib0700_usb_id_table[] = {
1375/* 0 */ { USB_DEVICE(USB_VID_DIBCOM, USB_PID_DIBCOM_STK7700P) }, 1443/* 0 */ { USB_DEVICE(USB_VID_DIBCOM, USB_PID_DIBCOM_STK7700P) },
@@ -1421,6 +1489,8 @@ struct usb_device_id dib0700_usb_id_table[] = {
1421 USB_PID_TERRATEC_CINERGY_DT_XS_DIVERSITY_2) }, 1489 USB_PID_TERRATEC_CINERGY_DT_XS_DIVERSITY_2) },
1422 { USB_DEVICE(USB_VID_SONY, USB_PID_SONY_PLAYTV) }, 1490 { USB_DEVICE(USB_VID_SONY, USB_PID_SONY_PLAYTV) },
1423/* 45 */{ USB_DEVICE(USB_VID_YUAN, USB_PID_YUAN_PD378S) }, 1491/* 45 */{ USB_DEVICE(USB_VID_YUAN, USB_PID_YUAN_PD378S) },
1492 { USB_DEVICE(USB_VID_HAUPPAUGE, USB_PID_HAUPPAUGE_TIGER_ATSC) },
1493 { USB_DEVICE(USB_VID_HAUPPAUGE, USB_PID_HAUPPAUGE_TIGER_ATSC_B210) },
1424 { 0 } /* Terminating entry */ 1494 { 0 } /* Terminating entry */
1425}; 1495};
1426MODULE_DEVICE_TABLE(usb, dib0700_usb_id_table); 1496MODULE_DEVICE_TABLE(usb, dib0700_usb_id_table);
@@ -1796,6 +1866,31 @@ struct dvb_usb_device_properties dib0700_devices[] = {
1796 .rc_key_map = dib0700_rc_keys, 1866 .rc_key_map = dib0700_rc_keys,
1797 .rc_key_map_size = ARRAY_SIZE(dib0700_rc_keys), 1867 .rc_key_map_size = ARRAY_SIZE(dib0700_rc_keys),
1798 .rc_query = dib0700_rc_query 1868 .rc_query = dib0700_rc_query
1869 }, { DIB0700_DEFAULT_DEVICE_PROPERTIES,
1870 .num_adapters = 1,
1871 .adapter = {
1872 {
1873 .frontend_attach = lgdt3305_frontend_attach,
1874 .tuner_attach = mxl5007t_tuner_attach,
1875
1876 DIB0700_DEFAULT_STREAMING_CONFIG(0x02),
1877
1878 .size_of_priv = sizeof(struct
1879 dib0700_adapter_state),
1880 },
1881 },
1882
1883 .num_device_descs = 2,
1884 .devices = {
1885 { "Hauppauge ATSC MiniCard (B200)",
1886 { &dib0700_usb_id_table[46], NULL },
1887 { NULL },
1888 },
1889 { "Hauppauge ATSC MiniCard (B210)",
1890 { &dib0700_usb_id_table[47], NULL },
1891 { NULL },
1892 },
1893 },
1799 }, 1894 },
1800}; 1895};
1801 1896
diff --git a/drivers/media/dvb/dvb-usb/dvb-usb-ids.h b/drivers/media/dvb/dvb-usb/dvb-usb-ids.h
index 6d70576ad3db..3dfb271741f6 100644
--- a/drivers/media/dvb/dvb-usb/dvb-usb-ids.h
+++ b/drivers/media/dvb/dvb-usb/dvb-usb-ids.h
@@ -151,6 +151,8 @@
151#define USB_PID_HAUPPAUGE_MYTV_T 0x7080 151#define USB_PID_HAUPPAUGE_MYTV_T 0x7080
152#define USB_PID_HAUPPAUGE_NOVA_TD_STICK 0x9580 152#define USB_PID_HAUPPAUGE_NOVA_TD_STICK 0x9580
153#define USB_PID_HAUPPAUGE_NOVA_TD_STICK_52009 0x5200 153#define USB_PID_HAUPPAUGE_NOVA_TD_STICK_52009 0x5200
154#define USB_PID_HAUPPAUGE_TIGER_ATSC 0xb200
155#define USB_PID_HAUPPAUGE_TIGER_ATSC_B210 0xb210
154#define USB_PID_AVERMEDIA_EXPRESS 0xb568 156#define USB_PID_AVERMEDIA_EXPRESS 0xb568
155#define USB_PID_AVERMEDIA_VOLAR 0xa807 157#define USB_PID_AVERMEDIA_VOLAR 0xa807
156#define USB_PID_AVERMEDIA_VOLAR_2 0xb808 158#define USB_PID_AVERMEDIA_VOLAR_2 0xb808