diff options
Diffstat (limited to 'drivers/media/dvb/ngene')
-rw-r--r-- | drivers/media/dvb/ngene/ngene-core.c | 52 |
1 files changed, 51 insertions, 1 deletions
diff --git a/drivers/media/dvb/ngene/ngene-core.c b/drivers/media/dvb/ngene/ngene-core.c index 34eaedf65eea..ae1f6127f142 100644 --- a/drivers/media/dvb/ngene/ngene-core.c +++ b/drivers/media/dvb/ngene/ngene-core.c | |||
@@ -46,6 +46,8 @@ | |||
46 | #include "stv6110x.h" | 46 | #include "stv6110x.h" |
47 | #include "stv090x.h" | 47 | #include "stv090x.h" |
48 | #include "lnbh24.h" | 48 | #include "lnbh24.h" |
49 | #include "lgdt330x.h" | ||
50 | #include "mt2131.h" | ||
49 | 51 | ||
50 | static int one_adapter = 1; | 52 | static int one_adapter = 1; |
51 | module_param(one_adapter, int, 0444); | 53 | module_param(one_adapter, int, 0444); |
@@ -513,11 +515,12 @@ static int ngene_command_gpio_set(struct ngene *dev, u8 select, u8 level) | |||
513 | 515 | ||
514 | /****************************************************************************/ | 516 | /****************************************************************************/ |
515 | 517 | ||
516 | static u8 TSFeatureDecoderSetup[8 * 4] = { | 518 | static u8 TSFeatureDecoderSetup[8 * 5] = { |
517 | 0x42, 0x00, 0x00, 0x02, 0x02, 0xbc, 0x00, 0x00, | 519 | 0x42, 0x00, 0x00, 0x02, 0x02, 0xbc, 0x00, 0x00, |
518 | 0x40, 0x06, 0x00, 0x02, 0x02, 0xbc, 0x00, 0x00, /* DRXH */ | 520 | 0x40, 0x06, 0x00, 0x02, 0x02, 0xbc, 0x00, 0x00, /* DRXH */ |
519 | 0x71, 0x07, 0x00, 0x02, 0x02, 0xbc, 0x00, 0x00, /* DRXHser */ | 521 | 0x71, 0x07, 0x00, 0x02, 0x02, 0xbc, 0x00, 0x00, /* DRXHser */ |
520 | 0x72, 0x06, 0x00, 0x02, 0x02, 0xbc, 0x00, 0x00, /* S2ser */ | 522 | 0x72, 0x06, 0x00, 0x02, 0x02, 0xbc, 0x00, 0x00, /* S2ser */ |
523 | 0x40, 0x07, 0x00, 0x02, 0x02, 0xbc, 0x00, 0x00, /* LGDT3303 */ | ||
521 | }; | 524 | }; |
522 | 525 | ||
523 | /* Set NGENE I2S Config to 16 bit packed */ | 526 | /* Set NGENE I2S Config to 16 bit packed */ |
@@ -1696,6 +1699,34 @@ static int demod_attach_stv0900(struct ngene_channel *chan) | |||
1696 | return 0; | 1699 | return 0; |
1697 | } | 1700 | } |
1698 | 1701 | ||
1702 | static struct lgdt330x_config aver_m780 = { | ||
1703 | .demod_address = 0xb2 >> 1, | ||
1704 | .demod_chip = LGDT3303, | ||
1705 | .serial_mpeg = 0x00, /* PARALLEL */ | ||
1706 | .clock_polarity_flip = 1, | ||
1707 | }; | ||
1708 | |||
1709 | static struct mt2131_config m780_tunerconfig = { | ||
1710 | 0xc0 >> 1 | ||
1711 | }; | ||
1712 | |||
1713 | /* A single func to attach the demo and tuner, rather than | ||
1714 | * use two sep funcs like the current design mandates. | ||
1715 | */ | ||
1716 | static int demod_attach_lg330x(struct ngene_channel *chan) | ||
1717 | { | ||
1718 | chan->fe = dvb_attach(lgdt330x_attach, &aver_m780, &chan->i2c_adapter); | ||
1719 | if (chan->fe == NULL) { | ||
1720 | printk(KERN_ERR DEVICE_NAME ": No LGDT330x found!\n"); | ||
1721 | return -ENODEV; | ||
1722 | } | ||
1723 | |||
1724 | dvb_attach(mt2131_attach, chan->fe, &chan->i2c_adapter, | ||
1725 | &m780_tunerconfig, 0); | ||
1726 | |||
1727 | return (chan->fe) ? 0 : -ENODEV; | ||
1728 | } | ||
1729 | |||
1699 | /****************************************************************************/ | 1730 | /****************************************************************************/ |
1700 | /****************************************************************************/ | 1731 | /****************************************************************************/ |
1701 | /****************************************************************************/ | 1732 | /****************************************************************************/ |
@@ -1961,6 +1992,24 @@ static struct ngene_info ngene_info_cineS2v5 = { | |||
1961 | .fw_version = 15, | 1992 | .fw_version = 15, |
1962 | }; | 1993 | }; |
1963 | 1994 | ||
1995 | static struct ngene_info ngene_info_m780 = { | ||
1996 | .type = NGENE_APP, | ||
1997 | .name = "Aver M780 ATSC/QAM-B", | ||
1998 | |||
1999 | /* Channel 0 is analog, which is currently unsupported */ | ||
2000 | .io_type = { NGENE_IO_NONE, NGENE_IO_TSIN }, | ||
2001 | .demod_attach = { NULL, demod_attach_lg330x }, | ||
2002 | |||
2003 | /* Ensure these are NULL else the frame will call them (as funcs) */ | ||
2004 | .tuner_attach = { 0, 0, 0, 0 }, | ||
2005 | .fe_config = { NULL, &aver_m780 }, | ||
2006 | .avf = { 0 }, | ||
2007 | |||
2008 | /* A custom electrical interface config for the demod to bridge */ | ||
2009 | .tsf = { 4, 4 }, | ||
2010 | .fw_version = 15, | ||
2011 | }; | ||
2012 | |||
1964 | /****************************************************************************/ | 2013 | /****************************************************************************/ |
1965 | 2014 | ||
1966 | 2015 | ||
@@ -1982,6 +2031,7 @@ static const struct pci_device_id ngene_id_tbl[] __devinitdata = { | |||
1982 | NGENE_ID(0x18c3, 0xdb01, ngene_info_satixS2), | 2031 | NGENE_ID(0x18c3, 0xdb01, ngene_info_satixS2), |
1983 | NGENE_ID(0x18c3, 0xdb02, ngene_info_satixS2v2), | 2032 | NGENE_ID(0x18c3, 0xdb02, ngene_info_satixS2v2), |
1984 | NGENE_ID(0x18c3, 0xdd00, ngene_info_cineS2v5), | 2033 | NGENE_ID(0x18c3, 0xdd00, ngene_info_cineS2v5), |
2034 | NGENE_ID(0x1461, 0x062e, ngene_info_m780), | ||
1985 | {0} | 2035 | {0} |
1986 | }; | 2036 | }; |
1987 | MODULE_DEVICE_TABLE(pci, ngene_id_tbl); | 2037 | MODULE_DEVICE_TABLE(pci, ngene_id_tbl); |