From af56f460fb2b3169685752f928993355a42573e3 Mon Sep 17 00:00:00 2001 From: Michael Krufky Date: Sun, 13 Nov 2005 18:11:21 +0000 Subject: Added V4L support for the Nova-S-Plus and Nova-SE2 DVB-S products. From: Steven Toth - Added V4L support for the Nova-S-Plus and Nova-SE2 DVB-S products. - Basic DVB-S support is working, analog video inputs work. - It has one or two fixme comments, primarily analog GPIOs (audio) and eeprom parsing. - This should not be sent upstream yet! - CX24123 code (in cx88-dvb.c) disabled until the cx24123 module is added to dvb-kernel cvs. Signed-off-by: Steven Toth Signed-off-by: Michael Krufky --- linux/Documentation/video4linux/CARDLIST.cx88 | 2 ++ linux/drivers/media/video/cx88/Kconfig | 10 ++++++ linux/drivers/media/video/cx88/Makefile | 3 ++ linux/drivers/media/video/cx88/cx88-cards.c | 52 ++++++++++++++++++++++++--- linux/drivers/media/video/cx88/cx88-dvb.c | 27 +++++++++++++- linux/drivers/media/video/cx88/cx88-mpeg.c | 7 +++- linux/drivers/media/video/cx88/cx88.h | 4 ++- 7 files changed, 98 insertions(+), 7 deletions(-) (limited to 'linux') diff --git a/linux/Documentation/video4linux/CARDLIST.cx88 b/linux/Documentation/video4linux/CARDLIST.cx88 index a1017d1a8..ba269e6f3 100644 --- a/linux/Documentation/video4linux/CARDLIST.cx88 +++ b/linux/Documentation/video4linux/CARDLIST.cx88 @@ -35,3 +35,5 @@ 34 -> ATI HDTV Wonder [1002:a101] 35 -> WinFast DTV1000-T [107d:665f] 36 -> AVerTV 303 (M126) [1461:000a] + 37 -> Hauppauge Nova-S-Plus DVB-S [0070:9200] + 38 -> Hauppauge Nova-SE2 DVB-S [0070:9202] diff --git a/linux/drivers/media/video/cx88/Kconfig b/linux/drivers/media/video/cx88/Kconfig index 41818b620..0a8ac7d87 100644 --- a/linux/drivers/media/video/cx88/Kconfig +++ b/linux/drivers/media/video/cx88/Kconfig @@ -38,6 +38,7 @@ config VIDEO_CX88_DVB_ALL_FRONTENDS select DVB_CX22702 select DVB_LGDT330X select DVB_NXT200X + select DVB_CX24123 ---help--- This builds cx88-dvb with all currently supported frontend demodulators. If you wish to tweak your configuration, and @@ -89,3 +90,12 @@ config VIDEO_CX88_DVB_NXT200X ---help--- This adds ATSC 8VSB and QAM64/256 support for cards based on the Connexant 2388x chip and the NXT2002/NXT2004 demodulator. + +config VIDEO_CX88_DVB_CX24123 + tristate "Conexant CX24123 DVB-S Support" + default m + depends on VIDEO_CX88_DVB && !VIDEO_CX88_DVB_ALL_FRONTENDS + select DVB_CX24123 + ---help--- + This adds DVB-S support for cards based on the + Connexant 2388x chip and the CX24123 demodulator. diff --git a/linux/drivers/media/video/cx88/Makefile b/linux/drivers/media/video/cx88/Makefile index 0df40b773..5fcc619b4 100644 --- a/linux/drivers/media/video/cx88/Makefile +++ b/linux/drivers/media/video/cx88/Makefile @@ -27,3 +27,6 @@ endif ifneq ($(CONFIG_DVB_NXT200X),n) EXTRA_CFLAGS += -DHAVE_NXT200X=1 endif +ifneq ($(CONFIG_DVB_CX24123),n) + EXTRA_CFLAGS += -DHAVE_CX24123=1 +endif diff --git a/linux/drivers/media/video/cx88/cx88-cards.c b/linux/drivers/media/video/cx88/cx88-cards.c index a4994c596..4c81c6ca4 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.103 2005/10/31 16:13:15 nsh Exp $ + * $Id: cx88-cards.c,v 1.104 2005/11/13 18:11:21 mkrufky Exp $ * * device driver for Conexant 2388x based TV cards * card-specific stuff. @@ -897,6 +897,37 @@ struct cx88_board cx88_boards[] = { .gpio3 = 0x0000, }}, }, + [CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1] = { + .name = "Hauppauge Nova-S-Plus DVB-S", + .tuner_type = TUNER_ABSENT, + .radio_type = UNSET, + .tuner_addr = ADDR_UNSET, + .radio_addr = ADDR_UNSET, + /* fixme: add the analog gpio stuff here */ + .input = {{ + .type = CX88_VMUX_DVB, + .vmux = 0, + },{ + .type = CX88_VMUX_COMPOSITE1, + .vmux = 1, + },{ + .type = CX88_VMUX_SVIDEO, + .vmux = 2, + }}, + .dvb = 1, + }, + [CX88_BOARD_HAUPPAUGE_NOVASE2_S1] = { + .name = "Hauppauge Nova-SE2 DVB-S", + .tuner_type = TUNER_ABSENT, + .radio_type = UNSET, + .tuner_addr = ADDR_UNSET, + .radio_addr = ADDR_UNSET, + .input = {{ + .type = CX88_VMUX_DVB, + .vmux = 0, + }}, + .dvb = 1, + }, }; const unsigned int cx88_bcount = ARRAY_SIZE(cx88_boards); @@ -1044,6 +1075,14 @@ struct cx88_subid cx88_subids[] = { .subvendor = 0x1461, .subdevice = 0x000a, .card = CX88_BOARD_AVERTV_303, + },{ + .subvendor = 0x0070, + .subdevice = 0x9200, + .card = CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1, + },{ + .subvendor = 0x0070, + .subdevice = 0x9202, + .card = CX88_BOARD_HAUPPAUGE_NOVASE2_S1, }, }; const unsigned int cx88_idcount = ARRAY_SIZE(cx88_subids); @@ -1087,6 +1126,7 @@ static void hauppauge_eeprom(struct cx88_core *core, u8 *eeprom_data) core->has_radio = tv.has_radio; } +/* fixme: This is bogus code... add new pnp code to parse or see tveeprom.ko */ static int hauppauge_eeprom_dvb(struct cx88_core *core, u8 *ee) { int model; @@ -1095,9 +1135,11 @@ static int hauppauge_eeprom_dvb(struct cx88_core *core, u8 *ee) /* Make sure we support the board model */ model = ee[0x1f] << 24 | ee[0x1e] << 16 | ee[0x1d] << 8 | ee[0x1c]; switch(model) { - case 90002: - case 90500: - case 90501: + case 90002: /* Nova-T-PCI (9002) */ + case 90500: /* Nova-T-PCI (oem) */ + case 90501: /* Nova-T-PCI (oem/IR) */ + case 92000: /* Nova-S-Plus */ + case 92002: /* Nova-SE2 */ /* known */ break; default: @@ -1224,6 +1266,8 @@ void cx88_card_setup(struct cx88_core *core) if (0 == core->i2c_rc) leadtek_eeprom(core,eeprom); break; + case CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1: + case CX88_BOARD_HAUPPAUGE_NOVASE2_S1: case CX88_BOARD_HAUPPAUGE_DVB_T1: if (0 == core->i2c_rc) hauppauge_eeprom_dvb(core,eeprom); diff --git a/linux/drivers/media/video/cx88/cx88-dvb.c b/linux/drivers/media/video/cx88/cx88-dvb.c index cc7aebd8c..8e3ff7acf 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.72 2005/11/02 05:11:17 mkrufky Exp $ + * $Id: cx88-dvb.c,v 1.73 2005/11/13 18:11:21 mkrufky Exp $ * * device driver for Conexant 2388x based TV cards * MPEG Transport Stream (DVB) routines @@ -50,6 +50,9 @@ #ifdef HAVE_NXT200X # include "nxt200x.h" #endif +#ifdef HAVE_CX24123 +# include "cx24123.h" +#endif MODULE_DESCRIPTION("driver for cx2388x based DVB cards"); MODULE_AUTHOR("Chris Pascoe "); @@ -320,6 +323,21 @@ static struct nxt200x_config ati_hdtvwonder = { }; #endif +#ifdef HAVE_CX24123 +static int cx24123_set_ts_param(struct dvb_frontend* fe, + int is_punctured) +{ + struct cx8802_dev *dev= fe->dvb->priv; + dev->ts_gen_cntrl = 0x2; + return 0; +} + +static struct cx24123_config hauppauge_novas_config = { + .demod_address = 0x55, + .set_ts_params = cx24123_set_ts_param, +}; +#endif + static int dvb_register(struct cx8802_dev *dev) { /* init struct videobuf_dvb */ @@ -426,6 +444,13 @@ static int dvb_register(struct cx8802_dev *dev) dev->dvb.frontend = nxt200x_attach(&ati_hdtvwonder, &dev->core->i2c_adap); break; +#endif +#ifdef HAVE_CX24123 + case CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1: + case CX88_BOARD_HAUPPAUGE_NOVASE2_S1: + dev->dvb.frontend = cx24123_attach(&hauppauge_novas_config, + &dev->core->i2c_adap); + break; #endif default: printk("%s: The frontend of your DVB/ATSC card isn't supported yet\n", diff --git a/linux/drivers/media/video/cx88/cx88-mpeg.c b/linux/drivers/media/video/cx88/cx88-mpeg.c index 6a9bd8969..72b004f96 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.40 2005/10/16 12:13:58 mchehab Exp $ + * $Id: cx88-mpeg.c,v 1.41 2005/11/13 18:11:21 mkrufky Exp $ * * Support for the mpeg transport stream transfers * PCI function #2 of the cx2388x. @@ -83,6 +83,11 @@ static int cx8802_start_dma(struct cx8802_dev *dev, case CX88_BOARD_DVICO_FUSIONHDTV_5_GOLD: cx_write(TS_SOP_STAT, 1<<13); break; + case CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1: + case CX88_BOARD_HAUPPAUGE_NOVASE2_S1: + cx_write(MO_PINMUX_IO, 0x88); /* Enable MPEG parallel IO and video signal pins */ + udelay(100); + break; default: cx_write(TS_SOP_STAT, 0x00); break; diff --git a/linux/drivers/media/video/cx88/cx88.h b/linux/drivers/media/video/cx88/cx88.h index 1eb7af392..592fba6bf 100644 --- a/linux/drivers/media/video/cx88/cx88.h +++ b/linux/drivers/media/video/cx88/cx88.h @@ -1,5 +1,5 @@ /* - * $Id: cx88.h,v 1.88 2005/10/31 16:13:15 nsh Exp $ + * $Id: cx88.h,v 1.89 2005/11/13 18:11:21 mkrufky Exp $ * * v4l2 device driver for cx2388x based TV cards * @@ -186,6 +186,8 @@ extern struct sram_channel cx88_sram_channels[]; #define CX88_BOARD_ATI_HDTVWONDER 34 #define CX88_BOARD_WINFAST_DTV1000 35 #define CX88_BOARD_AVERTV_303 36 +#define CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1 37 +#define CX88_BOARD_HAUPPAUGE_NOVASE2_S1 38 enum cx88_itype { CX88_VMUX_COMPOSITE1 = 1, -- cgit v1.2.3