aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/ngene
diff options
context:
space:
mode:
authorDevin Heitmueller <dheitmueller@kernellabs.com>2010-03-13 14:43:18 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-05-19 11:59:07 -0400
commit0abf26291d95b09eda44453a0c0655a54b8d90f7 (patch)
tree9da3d79244e13ff10004ba7bf1779ae0e20c439b /drivers/media/dvb/ngene
parentfdafc96c9162bdc58192a400bad5b850e185977d (diff)
V4L/DVB: ngene: add initial support for digital side of Avermedia m780
Add ATSC/QAM support for the Avermedia m780. Note that this patch does not include any analog support for the board, as the ngene bridge driver does not yet have analog implemented Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb/ngene')
-rw-r--r--drivers/media/dvb/ngene/ngene-core.c52
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
50static int one_adapter = 1; 52static int one_adapter = 1;
51module_param(one_adapter, int, 0444); 53module_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
516static u8 TSFeatureDecoderSetup[8 * 4] = { 518static 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
1702static 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
1709static 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 */
1716static 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
1995static 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};
1987MODULE_DEVICE_TABLE(pci, ngene_id_tbl); 2037MODULE_DEVICE_TABLE(pci, ngene_id_tbl);