Synchronize patch for CX88 cards
This patch adds support for various CX88 cards and allows specifying card addresses.
Signed-off-by Mauro Carvalho Chehab <[email protected]>
Signed-off-by Michael Krufky <[email protected]>
Signed-off-by [email protected] <[email protected]>
Signed-off-by Catalin Climov <[email protected]>
Signed-off-by Nickolay V Shmyrev <[email protected]>
drivers/media/video/ir-kbd-gpio.c +1 -1
@@ -1,5 +1,5 @@/* -* $Id: ir-kbd-gpio.c,v 1.12 2005/02/22 12:28:40 kraxel Exp $ +* $Id: ir-kbd-gpio.c,v 1.13 2005/05/15 19:01:26 mchehab Exp $ * * Copyright (c) 2003 Gerd Knorr * Copyright (c) 2003 Pavel Machek
drivers/media/video/cx88/cx88.h +21 -2
@@ -1,5 +1,5 @@/* -* $Id: cx88.h,v 1.56 2005/03/04 09:12:23 kraxel Exp $ +* $Id: cx88.h,v 1.62 2005/06/12 04:19:19 mchehab Exp $ * * v4l2 device driver for cx2388x based TV cards *
@@ -64,6 +64,13 @@#define SHADOW_AUD_BAL_CTL 2#define SHADOW_MAX 2 +/* FM Radio deemphasis type */ +enum cx88_deemph_type { +FM_NO_DEEMPH =0 , +FM_DEEMPH_50 , +FM_DEEMPH_75 +}; +/* ----------------------------------------------------------- */ /* tv norms */
@@ -163,7 +170,7 @@#define CX88_BOARD_DIGITALLOGIC_MEC 25#define CX88_BOARD_IODATA_GVBCTV7E 26#define CX88_BOARD_PIXELVIEW_PLAYTV_ULTRA_PRO 27 -#define CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_T 28 +#define CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_T 28enum cx88_itype {CX88_VMUX_COMPOSITE1 =1 ,
@@ -187,6 +194,9 @@struct cx88_board {char *name;unsigned int tuner_type; +unsigned int radio_type; +unsigned char tuner_addr; +unsigned char radio_addr;int tda9887_conf;struct cx88_input input[8 ];struct cx88_input radio;
@@ -257,6 +267,9 @@/* config info -- analog */ unsigned int board;unsigned int tuner_type; +unsigned int radio_type; +unsigned char tuner_addr; +unsigned char radio_addr;unsigned int tda9887_conf;unsigned int has_radio;
@@ -422,6 +435,7 @@/* ----------------------------------------------------------- */ /* cx88-core.c */ +extern char *cx88_pci_irqs[32 ];extern char *cx88_vid_irqs[32 ];extern char *cx88_mpeg_irqs[32 ]; extern void cx88_print_irqbits(char *name, char *tag, char **strings,
@@ -473,6 +487,11 @@/* cx88-vbi.c */ void cx8800_vbi_fmt (struct cx8800_dev *dev,struct v4l2_format *f); +/* +int cx8800_start_vbi_dma(struct cx8800_dev *dev, +struct cx88_dmaqueue *q, +struct cx88_buffer *buf); +*/ int cx8800_stop_vbi_dma (struct cx8800_dev *dev);int cx8800_restart_vbi_queue (struct cx8800_dev *dev,struct cx88_dmaqueue *q);
drivers/media/video/cx88/cx88-reg.h +2 -1
@@ -1,5 +1,5 @@/* -$Id: cx88-reg.h,v 1.6 2004/10/13 10:39:00 kraxel Exp $ +$Id: cx88-reg.h,v 1.7 2005/06/03 13:31:51 mchehab Exp $ cx88x-hw.h - CX2388x register offsets
@@ -397,6 +397,7 @@#define AUD_RATE_ADJ4 0x3205e4#define AUD_RATE_ADJ5 0x3205e8#define AUD_APB_IN_RATE_ADJ 0x3205ec +#define AUD_I2SCNTL 0x3205ec#define AUD_PHASE_FIX_CTL 0x3205f0#define AUD_PLL_PRESCALE 0x320600#define AUD_PLL_DDS 0x320604
drivers/media/video/cx88/cx88-cards.c +159 -72
436 lines not on this page · raw message
drivers/media/video/cx88/cx88-core.c +17 -2
@@ -1,5 +1,5 @@/* -* $Id: cx88-core.c,v 1.24 2005/01/19 12:01:55 kraxel Exp $ +* $Id: cx88-core.c,v 1.28 2005/06/12 04:19:19 mchehab Exp $ * * device driver for Conexant 2388x based TV cards * driver core
@@ -51,12 +51,15 @@MODULE_PARM_DESC (latency,"pci latency timer" );static unsigned int tuner[] = {[0 ... (CX88_MAXBOARDS -1 )] =UNSET }; +static unsigned int radio[] = {[0 ... (CX88_MAXBOARDS -1 )] =UNSET };static unsigned int card[] = {[0 ... (CX88_MAXBOARDS -1 )] =UNSET };module_param_array (tuner, int,NULL ,0444 ); +module_param_array (radio, int,NULL ,0444 );module_param_array (card, int,NULL ,0444 );MODULE_PARM_DESC (tuner,"tuner type" ); +MODULE_PARM_DESC (radio,"radio tuner type" );MODULE_PARM_DESC (card,"card type" );static unsigned int nicam =0 ;
@@ -429,7 +432,7 @@/* ------------------------------------------------------------------ */ /* debug helper code */ -static int cx88_risc_decode (u32 risc) +int cx88_risc_decode (u32 risc) {static char *instr[16 ] = { [RISC_SYNC >>28 ] ="sync" ,
@@ -1173,8 +1176,20 @@ "insmod option" : "autodetected"); core->tuner_type = tuner[core->nr]; + core->radio_type = radio[core->nr];if (UNSET == core->tuner_type) core->tuner_type = cx88_boards[core->board].tuner_type; +if (UNSET == core->radio_type) + core->radio_type = cx88_boards[core->board].radio_type; +if (!core->tuner_addr) + core->tuner_addr = cx88_boards[core->board].tuner_addr; +if (!core->radio_addr) + core->radio_addr = cx88_boards[core->board].radio_addr; + +printk (KERN_INFO "TV tuner %d at 0x%02x, Radio tuner %d at 0x%02x\n" , + core->tuner_type, core->tuner_addr<<1 , + core->radio_type, core->radio_addr<<1 ); + core->tda9887_conf = cx88_boards[core->board].tda9887_conf;/* init hardware */
drivers/media/video/cx88/cx88-i2c.c +15 -3
@@ -1,5 +1,5 @@/* -$Id: cx88-i2c.c,v 1.20 2005/02/15 15:59:35 kraxel Exp $ +$Id: cx88-i2c.c,v 1.23 2005/06/12 04:19:19 mchehab Exp $ cx88-i2c.c -- all the i2c code is here
@@ -91,6 +91,7 @@static int attach_inform (struct i2c_client *client) { +struct tuner_addr tun_addr;struct cx88_core *core =i2c_get_adapdata (client->adapter); dprintk(1, "i2c attach [addr=0x%x,client=%s]\n",
@@ -98,8 +99,19 @@if (!client->driver->command)return 0 ; -if (core->tuner_type !=UNSET ) - client->driver->command (client,TUNER_SET_TYPE , &core->tuner_type); +if (core->radio_type !=UNSET ) { + tun_addr.v4l2_tuner =V4L2_TUNER_RADIO ; + tun_addr.type = core->radio_type; + tun_addr.addr = core->radio_addr; + client->driver->command (client,TUNER_SET_TYPE_ADDR , &tun_addr); + } +if (core->tuner_type !=UNSET ) { + tun_addr.v4l2_tuner =V4L2_TUNER_ANALOG_TV ; + tun_addr.type = core->tuner_type; + tun_addr.addr = core->tuner_addr; + client->driver->command (client,TUNER_SET_TYPE_ADDR , &tun_addr); + } +if (core->tda9887_conf) client->driver->command (client,TDA9887_SET_CONFIG , &core->tda9887_conf);return 0 ;
drivers/media/video/cx88/cx88-tvaudio.c +63 -40
145 lines not on this page · raw message
drivers/media/video/cx88/cx88-video.c +47 -12
124 lines not on this page · raw message
drivers/media/video/cx88/cx88-vbi.c +3 -3
@@ -1,5 +1,5 @@/* -* $Id: cx88-vbi.c,v 1.16 2004/12/10 12:33:39 kraxel Exp $ +* $Id: cx88-vbi.c,v 1.17 2005/06/12 04:19:19 mchehab Exp $ */ #include <linux/kernel.h> #include <linux/module.h>
@@ -47,8 +47,8 @@ }static int cx8800_start_vbi_dma (struct cx8800_dev *dev, -struct cx88_dmaqueue *q, -struct cx88_buffer *buf) +struct cx88_dmaqueue *q, +struct cx88_buffer *buf) {struct cx88_core *core = dev->core;
drivers/media/video/cx88/cx88-input.c +5 -3
@@ -1,5 +1,5 @@/* -* $Id: cx88-input.c,v 1.9 2005/03/04 09:12:23 kraxel Exp $ +* $Id: cx88-input.c,v 1.11 2005/05/22 20:57:56 nsh Exp $ * * Device driver for GPIO attached remote control interfaces * on Conexant 2388x based TV/DVB cards.
@@ -235,6 +235,7 @@/* detect & configure */ switch (core->board) {case CX88_BOARD_DNTV_LIVE_DVB_T : +case CX88_BOARD_KWORLD_DVB_T : ir_codes = ir_codes_dntv_live_dvb_t; ir->gpio_addr =MO_GP1_IO ; ir->mask_keycode =0x1f ;
@@ -250,7 +251,7 @@case CX88_BOARD_WINFAST2000XP_EXPERT : ir_codes = ir_codes_winfast; ir->gpio_addr =MO_GP0_IO ; - ir->mask_keycode =0x8f8 ; + ir->mask_keycode =0x8f8 ; ir->mask_keyup =0x100 ; ir->polling =1 ;// ms break ;
@@ -264,11 +265,12 @@case CX88_BOARD_PIXELVIEW_PLAYTV_ULTRA_PRO : ir_codes = ir_codes_pixelview; ir->gpio_addr =MO_GP1_IO ; - ir->mask_keycode =0x1f ; + ir->mask_keycode =0x1f ; ir->mask_keyup =0x80 ; ir->polling =1 ;// ms break ; } +if (NULL == ir_codes) {kfree (ir);return -ENODEV ;
drivers/media/video/cx88/cx88-mpeg.c +42 -10
190 lines not on this page · raw message
drivers/media/video/cx88/cx88-dvb.c +2 -2
@@ -1,5 +1,5 @@/* -* $Id: cx88-dvb.c,v 1.31 2005/03/07 15:58:05 kraxel Exp $ +* $Id: cx88-dvb.c,v 1.33 2005/06/12 04:19:19 mchehab Exp $ * * device driver for Conexant 2388x based TV cards * MPEG Transport Stream (DVB) routines
@@ -183,7 +183,7 @@#endif #if HAVE_OR51132 -static int or51132_set_ts_param (struct dvb_frontend * fe, +static int or51132_set_ts_param (struct dvb_frontend * fe,int is_punctured) {struct cx8802_dev *dev= fe->dvb->priv;
drivers/media/video/cx88/cx88-blackbird.c +399 -83
565 lines not on this page · raw message