diff options
-rw-r--r-- | linux/drivers/media/video/cx88/cx88-cards.c | 3 | ||||
-rw-r--r-- | linux/drivers/media/video/cx88/cx88-dvb.c | 43 | ||||
-rw-r--r-- | linux/drivers/media/video/cx88/cx88-i2c.c | 3 | ||||
-rw-r--r-- | linux/drivers/media/video/cx88/cx88-mpeg.c | 13 | ||||
-rw-r--r-- | v4l/ChangeLog | 12 | ||||
-rw-r--r-- | v4l/Make.config | 11 | ||||
-rw-r--r-- | v4l/Makefile | 2 |
7 files changed, 69 insertions, 18 deletions
diff --git a/linux/drivers/media/video/cx88/cx88-cards.c b/linux/drivers/media/video/cx88/cx88-cards.c index a0e945da0..bf12e1b41 100644 --- a/linux/drivers/media/video/cx88/cx88-cards.c +++ b/linux/drivers/media/video/cx88/cx88-cards.c @@ -1,5 +1,5 @@ /* - * $Id: cx88-cards.c,v 1.77 2005/06/12 23:32:13 nsh Exp $ + * $Id: cx88-cards.c,v 1.78 2005/06/17 18:46:23 mkrufky Exp $ * * device driver for Conexant 2388x based TV cards * card-specific stuff. @@ -482,6 +482,7 @@ struct cx88_board cx88_boards[] = { .vmux = 2, .gpio0 = 0x0f00, }}, + .dvb = 1, }, [CX88_BOARD_HAUPPAUGE_DVB_T1] = { .name = "Hauppauge Nova-T DVB-T", diff --git a/linux/drivers/media/video/cx88/cx88-dvb.c b/linux/drivers/media/video/cx88/cx88-dvb.c index 1dac9f641..75f980a63 100644 --- a/linux/drivers/media/video/cx88/cx88-dvb.c +++ b/linux/drivers/media/video/cx88/cx88-dvb.c @@ -1,5 +1,5 @@ /* - * $Id: cx88-dvb.c,v 1.33 2005/06/12 04:19:19 mchehab Exp $ + * $Id: cx88-dvb.c,v 1.34 2005/06/17 18:46:23 mkrufky Exp $ * * device driver for Conexant 2388x based TV cards * MPEG Transport Stream (DVB) routines @@ -30,9 +30,10 @@ #include <linux/file.h> #include <linux/suspend.h> -/* those two frontends need merging via linuxtv cvs ... */ +/* these three frontends need merging via linuxtv cvs ... */ #define HAVE_CX22702 1 #define HAVE_OR51132 1 +#define HAVE_LGDT3302 1 #include "cx88.h" #include "dvb-pll.h" @@ -44,6 +45,9 @@ #if HAVE_OR51132 # include "or51132.h" #endif +#if HAVE_LGDT3302 +# include "lgdt3302.h" +#endif MODULE_DESCRIPTION("driver for cx2388x based DVB cards"); MODULE_AUTHOR("Chris Pascoe <c.pascoe@itee.uq.edu.au>"); @@ -199,6 +203,25 @@ static struct or51132_config pchdtv_hd3000 = { }; #endif +#if HAVE_LGDT3302 +static int lgdt3302_set_ts_param(struct dvb_frontend* fe, int is_punctured) +{ + struct cx8802_dev *dev= fe->dvb->priv; + if (is_punctured) + dev->ts_gen_cntrl |= 0x04; + else + dev->ts_gen_cntrl &= ~0x04; + return 0; +} + +static struct lgdt3302_config fusionhdtv_3_gold = { + .demod_address = 0x0e, + .pll_address = 0x61, + .pll_desc = &dvb_pll_microtune_4042, + .set_ts_params = lgdt3302_set_ts_param, +}; +#endif + static int dvb_register(struct cx8802_dev *dev) { /* init struct videobuf_dvb */ @@ -242,6 +265,22 @@ static int dvb_register(struct cx8802_dev *dev) &dev->core->i2c_adap); break; #endif +#if HAVE_LGDT3302 + case CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD: + dev->ts_gen_cntrl = 0x08; + { + /* Do a hardware reset of chip before using it. */ + struct cx88_core *core = dev->core; + + cx_clear(MO_GP0_IO, 1); + mdelay(100); + cx_set(MO_GP0_IO, 9); // ANT connector too FIXME + mdelay(200); + dev->dvb.frontend = lgdt3302_attach(&fusionhdtv_3_gold, + &dev->core->i2c_adap); + } + break; +#endif default: printk("%s: The frontend of your DVB/ATSC card isn't supported yet\n", dev->core->name); diff --git a/linux/drivers/media/video/cx88/cx88-i2c.c b/linux/drivers/media/video/cx88/cx88-i2c.c index e20adefcf..b5342234b 100644 --- a/linux/drivers/media/video/cx88/cx88-i2c.c +++ b/linux/drivers/media/video/cx88/cx88-i2c.c @@ -1,5 +1,5 @@ /* - $Id: cx88-i2c.c,v 1.23 2005/06/12 04:19:19 mchehab Exp $ + $Id: cx88-i2c.c,v 1.24 2005/06/17 18:46:23 mkrufky Exp $ cx88-i2c.c -- all the i2c code is here @@ -157,6 +157,7 @@ static struct i2c_client cx8800_i2c_client_template = { }; static char *i2c_devs[128] = { + [ 0x1c >> 1 ] = "lgdt3302", [ 0x86 >> 1 ] = "tda9887/cx22702", [ 0xa0 >> 1 ] = "eeprom", [ 0xc0 >> 1 ] = "tuner (analog)", diff --git a/linux/drivers/media/video/cx88/cx88-mpeg.c b/linux/drivers/media/video/cx88/cx88-mpeg.c index b98d89c5a..9d1dca099 100644 --- a/linux/drivers/media/video/cx88/cx88-mpeg.c +++ b/linux/drivers/media/video/cx88/cx88-mpeg.c @@ -1,5 +1,5 @@ /* - * $Id: cx88-mpeg.c,v 1.26 2005/06/03 13:31:51 mchehab Exp $ + * $Id: cx88-mpeg.c,v 1.27 2005/06/17 18:46:23 mkrufky Exp $ * * Support for the mpeg transport stream transfers * PCI function #2 of the cx2388x. @@ -70,11 +70,16 @@ static int cx8802_start_dma(struct cx8802_dev *dev, if (cx88_boards[core->board].dvb) { /* negedge driven & software reset */ - cx_write(TS_GEN_CNTRL, 0x40); + cx_write(TS_GEN_CNTRL, 0x0040 | dev->ts_gen_cntrl); udelay(100); cx_write(MO_PINMUX_IO, 0x00); - cx_write(TS_HW_SOP_CNTRL,47<<16|188<<4|0x00); - cx_write(TS_SOP_STAT,0x00); + if (core->board == CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD) { + cx_write(TS_HW_SOP_CNTRL,0x47<<16 | 188<<4 | 0x00); + cx_write(TS_SOP_STAT, 0<<16 | 0<<14 | 1<<13 | 0<<12); + } else { + cx_write(TS_HW_SOP_CNTRL,47<<16|188<<4|0x00); + cx_write(TS_SOP_STAT,0x00); + } cx_write(TS_GEN_CNTRL, dev->ts_gen_cntrl); udelay(100); } diff --git a/v4l/ChangeLog b/v4l/ChangeLog index 3043e76b2..3d0352b84 100644 --- a/v4l/ChangeLog +++ b/v4l/ChangeLog @@ -1,3 +1,15 @@ +2005-06-17 14:44 mkrufky + * Makefile, cx88-cards.c, cx88-dvb.c, cx88-i2c.c, cx88-mpeg.c, dvb-pll.c, dvb-pll.h, lgdt3302.c, lgdt3302.h, lgdt3302_priv.h + + - added support for LGDT3302 demod for cx88 cards: + DViCO FusionHDTV 3 Gold + Signed-off-by: Mac Michaels <wmichaels1@earthlink.net> + Signed-off-by: Michael Krufky <mkrufky@m1k.net> + + * Make.config + + - Allow DVB to compile if kernel is later than 2.6.10 + 2005-06-17 16:50 mchehab * tda1004x.h: diff --git a/v4l/Make.config b/v4l/Make.config index d8d663e61..14542fe0a 100644 --- a/v4l/Make.config +++ b/v4l/Make.config @@ -11,16 +11,9 @@ CONFIG_TUNER_MULTI_I2C := y CONFIG_USE_I2C_RANGE := y # doesn't build on kernels older than 2.6.10 -# Hmm, need a more clever check once we have 2.6.11 ... CONFIG_VIDEO_CX88_DVB := n CONFIG_VIDEO_SAA7134_DVB := n -ifeq ($(SUBLEVEL),10) +if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,10)) CONFIG_VIDEO_CX88_DVB := m +if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,10)) CONFIG_VIDEO_SAA7134_DVB := m -endif -ifeq ($(SUBLEVEL),11) - CONFIG_VIDEO_CX88_DVB := m - CONFIG_VIDEO_SAA7134_DVB := m -endif - - diff --git a/v4l/Makefile b/v4l/Makefile index 8bbaeaa1e..2b9ae9c62 100644 --- a/v4l/Makefile +++ b/v4l/Makefile @@ -39,7 +39,7 @@ obj-$(CONFIG_VIDEO_IR) += ir-common.o obj-$(CONFIG_VIDEO_TUNER) += tuner.o tda9887.o obj-$(CONFIG_VIDEO_TVAUDIO) += msp3400.o tvaudio.o tvmixer.o -obj-$(CONFIG_VIDEO_CX88_DVB) += video-buf-dvb.o cx88-dvb.o cx22702.o dvb-pll.o or51132.o +obj-$(CONFIG_VIDEO_CX88_DVB) += video-buf-dvb.o cx88-dvb.o cx22702.o dvb-pll.o or51132.o lgdt3302.o obj-$(CONFIG_VIDEO_SAA7134_DVB) += video-buf-dvb.o saa7134-dvb.o mt352.o # 2.6-only stuff |