aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/media/video/cx88/Kconfig10
-rw-r--r--drivers/media/video/cx88/Makefile3
-rw-r--r--drivers/media/video/cx88/cx88-cards.c8
-rw-r--r--drivers/media/video/cx88/cx88-dvb.c26
-rw-r--r--drivers/media/video/tuner-simple.c19
5 files changed, 59 insertions, 7 deletions
diff --git a/drivers/media/video/cx88/Kconfig b/drivers/media/video/cx88/Kconfig
index 3c912152121b..1c9009589d11 100644
--- a/drivers/media/video/cx88/Kconfig
+++ b/drivers/media/video/cx88/Kconfig
@@ -37,6 +37,7 @@ config VIDEO_CX88_DVB_ALL_FRONTENDS
37 select DVB_OR51132 37 select DVB_OR51132
38 select DVB_CX22702 38 select DVB_CX22702
39 select DVB_LGDT330X 39 select DVB_LGDT330X
40 select DVB_NXT200X
40 ---help--- 41 ---help---
41 This builds cx88-dvb with all currently supported frontend 42 This builds cx88-dvb with all currently supported frontend
42 demodulators. If you wish to tweak your configuration, and 43 demodulators. If you wish to tweak your configuration, and
@@ -79,3 +80,12 @@ config VIDEO_CX88_DVB_LGDT330X
79 ---help--- 80 ---help---
80 This adds ATSC 8VSB and QAM64/256 support for cards based on the 81 This adds ATSC 8VSB and QAM64/256 support for cards based on the
81 Connexant 2388x chip and the LGDT3302/LGDT3303 demodulator. 82 Connexant 2388x chip and the LGDT3302/LGDT3303 demodulator.
83
84config VIDEO_CX88_DVB_NXT200X
85 tristate "NXT2002/NXT2004 ATSC Support"
86 default m
87 depends on VIDEO_CX88_DVB && !VIDEO_CX88_DVB_ALL_FRONTENDS
88 select DVB_NXT200X
89 ---help---
90 This adds ATSC 8VSB and QAM64/256 support for cards based on the
91 Connexant 2388x chip and the NXT2002/NXT2004 demodulator.
diff --git a/drivers/media/video/cx88/Makefile b/drivers/media/video/cx88/Makefile
index be1dc66e065f..0df40b773454 100644
--- a/drivers/media/video/cx88/Makefile
+++ b/drivers/media/video/cx88/Makefile
@@ -24,3 +24,6 @@ endif
24ifneq ($(CONFIG_DVB_MT352),n) 24ifneq ($(CONFIG_DVB_MT352),n)
25 EXTRA_CFLAGS += -DHAVE_MT352=1 25 EXTRA_CFLAGS += -DHAVE_MT352=1
26endif 26endif
27ifneq ($(CONFIG_DVB_NXT200X),n)
28 EXTRA_CFLAGS += -DHAVE_NXT200X=1
29endif
diff --git a/drivers/media/video/cx88/cx88-cards.c b/drivers/media/video/cx88/cx88-cards.c
index 504917768794..f20984eb5538 100644
--- a/drivers/media/video/cx88/cx88-cards.c
+++ b/drivers/media/video/cx88/cx88-cards.c
@@ -851,6 +851,7 @@ struct cx88_board cx88_boards[] = {
851 .gpio2 = 0x00000001, 851 .gpio2 = 0x00000001,
852 .gpio3 = 0x00000000, 852 .gpio3 = 0x00000000,
853 }}, 853 }},
854 .dvb = 1,
854 }, 855 },
855 [CX88_BOARD_WINFAST_DTV1000] = { 856 [CX88_BOARD_WINFAST_DTV1000] = {
856 .name = "WinFast DTV1000-T", 857 .name = "WinFast DTV1000-T",
@@ -1212,13 +1213,10 @@ void cx88_card_setup(struct cx88_core *core)
1212 if (0 == core->i2c_rc) { 1213 if (0 == core->i2c_rc) {
1213 /* enable tuner */ 1214 /* enable tuner */
1214 int i; 1215 int i;
1215 u8 buffer[12]; 1216 u8 buffer [] = { 0x10,0x12,0x13,0x04,0x16,0x00,0x14,0x04,0x017,0x00 };
1216 core->i2c_client.addr = 0x0a; 1217 core->i2c_client.addr = 0x0a;
1217 buffer[0] = 0x10; buffer[1] = 0x12; buffer[2] = 0x13; buffer[3] = 0x04;
1218 buffer[4] = 0x16; buffer[5] = 0x00; buffer[6] = 0x14; buffer[7] = 0x04;
1219 buffer[8] = 0x14; buffer[9] = 0x00; buffer[10] = 0x17; buffer[11] = 0x00;
1220 1218
1221 for (i = 0; i < 6; i++) 1219 for (i = 0; i < 5; i++)
1222 if (2 != i2c_master_send(&core->i2c_client,&buffer[i*2],2)) 1220 if (2 != i2c_master_send(&core->i2c_client,&buffer[i*2],2))
1223 printk(KERN_WARNING "%s: Unable to enable tuner(%i).\n", 1221 printk(KERN_WARNING "%s: Unable to enable tuner(%i).\n",
1224 core->name, i); 1222 core->name, i);
diff --git a/drivers/media/video/cx88/cx88-dvb.c b/drivers/media/video/cx88/cx88-dvb.c
index a7a077196fc9..1236cb11d83a 100644
--- a/drivers/media/video/cx88/cx88-dvb.c
+++ b/drivers/media/video/cx88/cx88-dvb.c
@@ -45,6 +45,9 @@
45#ifdef HAVE_LGDT330X 45#ifdef HAVE_LGDT330X
46# include "lgdt330x.h" 46# include "lgdt330x.h"
47#endif 47#endif
48#ifdef HAVE_NXT200X
49# include "nxt200x.h"
50#endif
48 51
49MODULE_DESCRIPTION("driver for cx2388x based DVB cards"); 52MODULE_DESCRIPTION("driver for cx2388x based DVB cards");
50MODULE_AUTHOR("Chris Pascoe <c.pascoe@itee.uq.edu.au>"); 53MODULE_AUTHOR("Chris Pascoe <c.pascoe@itee.uq.edu.au>");
@@ -284,6 +287,23 @@ static struct lgdt330x_config fusionhdtv_5_gold = {
284}; 287};
285#endif 288#endif
286 289
290#ifdef HAVE_NXT200X
291static int nxt200x_set_ts_param(struct dvb_frontend* fe,
292 int is_punctured)
293{
294 struct cx8802_dev *dev= fe->dvb->priv;
295 dev->ts_gen_cntrl = is_punctured ? 0x04 : 0x00;
296 return 0;
297}
298
299static struct nxt200x_config ati_hdtvwonder = {
300 .demod_address = 0x0a,
301 .pll_address = 0x61,
302 .pll_desc = &dvb_pll_tuv1236d,
303 .set_ts_params = nxt200x_set_ts_param,
304};
305#endif
306
287static int dvb_register(struct cx8802_dev *dev) 307static int dvb_register(struct cx8802_dev *dev)
288{ 308{
289 /* init struct videobuf_dvb */ 309 /* init struct videobuf_dvb */
@@ -385,6 +405,12 @@ static int dvb_register(struct cx8802_dev *dev)
385 } 405 }
386 break; 406 break;
387#endif 407#endif
408#ifdef HAVE_NXT200X
409 case CX88_BOARD_ATI_HDTVWONDER:
410 dev->dvb.frontend = nxt200x_attach(&ati_hdtvwonder,
411 &dev->core->i2c_adap);
412 break;
413#endif
388 default: 414 default:
389 printk("%s: The frontend of your DVB/ATSC card isn't supported yet\n", 415 printk("%s: The frontend of your DVB/ATSC card isn't supported yet\n",
390 dev->core->name); 416 dev->core->name);
diff --git a/drivers/media/video/tuner-simple.c b/drivers/media/video/tuner-simple.c
index 84338f1e3038..34ba6d13b586 100644
--- a/drivers/media/video/tuner-simple.c
+++ b/drivers/media/video/tuner-simple.c
@@ -251,7 +251,7 @@ static struct tunertype tuners[] = {
251 { "Philips TD1316 Hybrid Tuner", Philips, PAL, 251 { "Philips TD1316 Hybrid Tuner", Philips, PAL,
252 16*160.00,16*442.00,0xa1,0xa2,0xa4,0xc8,623 }, 252 16*160.00,16*442.00,0xa1,0xa2,0xa4,0xc8,623 },
253 { "Philips TUV1236D ATSC/NTSC dual in", Philips, ATSC, 253 { "Philips TUV1236D ATSC/NTSC dual in", Philips, ATSC,
254 16*157.25,16*454.00,0x01,0x02,0x03,0xce,732 }, 254 16*157.25,16*454.00,0x01,0x02,0x04,0xce,732 },
255}; 255};
256 256
257unsigned const int tuner_count = ARRAY_SIZE(tuners); 257unsigned const int tuner_count = ARRAY_SIZE(tuners);
@@ -383,9 +383,24 @@ static void default_set_tv_freq(struct i2c_client *c, unsigned int freq)
383 /* 0x48 -> ATSC antenna input 2 */ 383 /* 0x48 -> ATSC antenna input 2 */
384 /* 0x00 -> NTSC antenna input 1 */ 384 /* 0x00 -> NTSC antenna input 1 */
385 /* 0x08 -> NTSC antenna input 2 */ 385 /* 0x08 -> NTSC antenna input 2 */
386 buffer[0] = 0x14;
387 buffer[1] = 0x00;
388 buffer[2] = 0x17;
389 buffer[3] = 0x00;
386 config &= ~0x40; 390 config &= ~0x40;
387 if (t->std & V4L2_STD_ATSC) 391 if (t->std & V4L2_STD_ATSC) {
388 config |= 0x40; 392 config |= 0x40;
393 buffer[1] = 0x04;
394 }
395 /* set to the correct mode (analog or digital) */
396 u8 tuneraddr;
397 tuneraddr = c->addr;
398 c->addr = 0x0a;
399 if (2 != (rc = i2c_master_send(c,&buffer[0],2)))
400 tuner_warn("i2c i/o error: rc == %d (should be 2)\n",rc);
401 if (2 != (rc = i2c_master_send(c,&buffer[2],2)))
402 tuner_warn("i2c i/o error: rc == %d (should be 2)\n",rc);
403 c->addr = tuneraddr;
389 /* FIXME: input */ 404 /* FIXME: input */
390 break; 405 break;
391 } 406 }