[PATCH] v4l: 868: added support for nxt200x based cards ati hdtv wonder
- Added support for NXT200X based cards (ATI HDTV Wonder) Signed-off-by: Kirk Lapray <kirk.lapray@gmail.com> Signed-off-by: Michael Krufky <mkrufky@m1k.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
committed by
Linus Torvalds
parent
85a2eb07e1
commit
fde6d31e19
@@ -37,6 +37,7 @@ config VIDEO_CX88_DVB_ALL_FRONTENDS
|
|||||||
select DVB_OR51132
|
select DVB_OR51132
|
||||||
select DVB_CX22702
|
select DVB_CX22702
|
||||||
select DVB_LGDT330X
|
select DVB_LGDT330X
|
||||||
|
select DVB_NXT200X
|
||||||
---help---
|
---help---
|
||||||
This builds cx88-dvb with all currently supported frontend
|
This builds cx88-dvb with all currently supported frontend
|
||||||
demodulators. If you wish to tweak your configuration, and
|
demodulators. If you wish to tweak your configuration, and
|
||||||
@@ -79,3 +80,12 @@ config VIDEO_CX88_DVB_LGDT330X
|
|||||||
---help---
|
---help---
|
||||||
This adds ATSC 8VSB and QAM64/256 support for cards based on the
|
This adds ATSC 8VSB and QAM64/256 support for cards based on the
|
||||||
Connexant 2388x chip and the LGDT3302/LGDT3303 demodulator.
|
Connexant 2388x chip and the LGDT3302/LGDT3303 demodulator.
|
||||||
|
|
||||||
|
config VIDEO_CX88_DVB_NXT200X
|
||||||
|
tristate "NXT2002/NXT2004 ATSC Support"
|
||||||
|
default m
|
||||||
|
depends on VIDEO_CX88_DVB && !VIDEO_CX88_DVB_ALL_FRONTENDS
|
||||||
|
select DVB_NXT200X
|
||||||
|
---help---
|
||||||
|
This adds ATSC 8VSB and QAM64/256 support for cards based on the
|
||||||
|
Connexant 2388x chip and the NXT2002/NXT2004 demodulator.
|
||||||
|
@@ -24,3 +24,6 @@ endif
|
|||||||
ifneq ($(CONFIG_DVB_MT352),n)
|
ifneq ($(CONFIG_DVB_MT352),n)
|
||||||
EXTRA_CFLAGS += -DHAVE_MT352=1
|
EXTRA_CFLAGS += -DHAVE_MT352=1
|
||||||
endif
|
endif
|
||||||
|
ifneq ($(CONFIG_DVB_NXT200X),n)
|
||||||
|
EXTRA_CFLAGS += -DHAVE_NXT200X=1
|
||||||
|
endif
|
||||||
|
@@ -851,6 +851,7 @@ struct cx88_board cx88_boards[] = {
|
|||||||
.gpio2 = 0x00000001,
|
.gpio2 = 0x00000001,
|
||||||
.gpio3 = 0x00000000,
|
.gpio3 = 0x00000000,
|
||||||
}},
|
}},
|
||||||
|
.dvb = 1,
|
||||||
},
|
},
|
||||||
[CX88_BOARD_WINFAST_DTV1000] = {
|
[CX88_BOARD_WINFAST_DTV1000] = {
|
||||||
.name = "WinFast DTV1000-T",
|
.name = "WinFast DTV1000-T",
|
||||||
@@ -1212,13 +1213,10 @@ void cx88_card_setup(struct cx88_core *core)
|
|||||||
if (0 == core->i2c_rc) {
|
if (0 == core->i2c_rc) {
|
||||||
/* enable tuner */
|
/* enable tuner */
|
||||||
int i;
|
int i;
|
||||||
u8 buffer[12];
|
u8 buffer [] = { 0x10,0x12,0x13,0x04,0x16,0x00,0x14,0x04,0x017,0x00 };
|
||||||
core->i2c_client.addr = 0x0a;
|
core->i2c_client.addr = 0x0a;
|
||||||
buffer[0] = 0x10; buffer[1] = 0x12; buffer[2] = 0x13; buffer[3] = 0x04;
|
|
||||||
buffer[4] = 0x16; buffer[5] = 0x00; buffer[6] = 0x14; buffer[7] = 0x04;
|
|
||||||
buffer[8] = 0x14; buffer[9] = 0x00; buffer[10] = 0x17; buffer[11] = 0x00;
|
|
||||||
|
|
||||||
for (i = 0; i < 6; i++)
|
for (i = 0; i < 5; i++)
|
||||||
if (2 != i2c_master_send(&core->i2c_client,&buffer[i*2],2))
|
if (2 != i2c_master_send(&core->i2c_client,&buffer[i*2],2))
|
||||||
printk(KERN_WARNING "%s: Unable to enable tuner(%i).\n",
|
printk(KERN_WARNING "%s: Unable to enable tuner(%i).\n",
|
||||||
core->name, i);
|
core->name, i);
|
||||||
|
@@ -45,6 +45,9 @@
|
|||||||
#ifdef HAVE_LGDT330X
|
#ifdef HAVE_LGDT330X
|
||||||
# include "lgdt330x.h"
|
# include "lgdt330x.h"
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef HAVE_NXT200X
|
||||||
|
# include "nxt200x.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
MODULE_DESCRIPTION("driver for cx2388x based DVB cards");
|
MODULE_DESCRIPTION("driver for cx2388x based DVB cards");
|
||||||
MODULE_AUTHOR("Chris Pascoe <c.pascoe@itee.uq.edu.au>");
|
MODULE_AUTHOR("Chris Pascoe <c.pascoe@itee.uq.edu.au>");
|
||||||
@@ -284,6 +287,23 @@ static struct lgdt330x_config fusionhdtv_5_gold = {
|
|||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_NXT200X
|
||||||
|
static int nxt200x_set_ts_param(struct dvb_frontend* fe,
|
||||||
|
int is_punctured)
|
||||||
|
{
|
||||||
|
struct cx8802_dev *dev= fe->dvb->priv;
|
||||||
|
dev->ts_gen_cntrl = is_punctured ? 0x04 : 0x00;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static struct nxt200x_config ati_hdtvwonder = {
|
||||||
|
.demod_address = 0x0a,
|
||||||
|
.pll_address = 0x61,
|
||||||
|
.pll_desc = &dvb_pll_tuv1236d,
|
||||||
|
.set_ts_params = nxt200x_set_ts_param,
|
||||||
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
static int dvb_register(struct cx8802_dev *dev)
|
static int dvb_register(struct cx8802_dev *dev)
|
||||||
{
|
{
|
||||||
/* init struct videobuf_dvb */
|
/* init struct videobuf_dvb */
|
||||||
@@ -384,6 +404,12 @@ static int dvb_register(struct cx8802_dev *dev)
|
|||||||
&dev->core->i2c_adap);
|
&dev->core->i2c_adap);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_NXT200X
|
||||||
|
case CX88_BOARD_ATI_HDTVWONDER:
|
||||||
|
dev->dvb.frontend = nxt200x_attach(&ati_hdtvwonder,
|
||||||
|
&dev->core->i2c_adap);
|
||||||
|
break;
|
||||||
#endif
|
#endif
|
||||||
default:
|
default:
|
||||||
printk("%s: The frontend of your DVB/ATSC card isn't supported yet\n",
|
printk("%s: The frontend of your DVB/ATSC card isn't supported yet\n",
|
||||||
|
@@ -251,7 +251,7 @@ static struct tunertype tuners[] = {
|
|||||||
{ "Philips TD1316 Hybrid Tuner", Philips, PAL,
|
{ "Philips TD1316 Hybrid Tuner", Philips, PAL,
|
||||||
16*160.00,16*442.00,0xa1,0xa2,0xa4,0xc8,623 },
|
16*160.00,16*442.00,0xa1,0xa2,0xa4,0xc8,623 },
|
||||||
{ "Philips TUV1236D ATSC/NTSC dual in", Philips, ATSC,
|
{ "Philips TUV1236D ATSC/NTSC dual in", Philips, ATSC,
|
||||||
16*157.25,16*454.00,0x01,0x02,0x03,0xce,732 },
|
16*157.25,16*454.00,0x01,0x02,0x04,0xce,732 },
|
||||||
};
|
};
|
||||||
|
|
||||||
unsigned const int tuner_count = ARRAY_SIZE(tuners);
|
unsigned const int tuner_count = ARRAY_SIZE(tuners);
|
||||||
@@ -383,9 +383,24 @@ static void default_set_tv_freq(struct i2c_client *c, unsigned int freq)
|
|||||||
/* 0x48 -> ATSC antenna input 2 */
|
/* 0x48 -> ATSC antenna input 2 */
|
||||||
/* 0x00 -> NTSC antenna input 1 */
|
/* 0x00 -> NTSC antenna input 1 */
|
||||||
/* 0x08 -> NTSC antenna input 2 */
|
/* 0x08 -> NTSC antenna input 2 */
|
||||||
|
buffer[0] = 0x14;
|
||||||
|
buffer[1] = 0x00;
|
||||||
|
buffer[2] = 0x17;
|
||||||
|
buffer[3] = 0x00;
|
||||||
config &= ~0x40;
|
config &= ~0x40;
|
||||||
if (t->std & V4L2_STD_ATSC)
|
if (t->std & V4L2_STD_ATSC) {
|
||||||
config |= 0x40;
|
config |= 0x40;
|
||||||
|
buffer[1] = 0x04;
|
||||||
|
}
|
||||||
|
/* set to the correct mode (analog or digital) */
|
||||||
|
u8 tuneraddr;
|
||||||
|
tuneraddr = c->addr;
|
||||||
|
c->addr = 0x0a;
|
||||||
|
if (2 != (rc = i2c_master_send(c,&buffer[0],2)))
|
||||||
|
tuner_warn("i2c i/o error: rc == %d (should be 2)\n",rc);
|
||||||
|
if (2 != (rc = i2c_master_send(c,&buffer[2],2)))
|
||||||
|
tuner_warn("i2c i/o error: rc == %d (should be 2)\n",rc);
|
||||||
|
c->addr = tuneraddr;
|
||||||
/* FIXME: input */
|
/* FIXME: input */
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user