diff options
-rw-r--r-- | linux/drivers/media/video/bttv-driver.c | 12 | ||||
-rw-r--r-- | linux/drivers/media/video/bttv.h | 3 | ||||
-rw-r--r-- | linux/drivers/media/video/bttvp.h | 5 | ||||
-rw-r--r-- | linux/drivers/media/video/cx88/cx88-cards.c | 5 | ||||
-rw-r--r-- | linux/drivers/media/video/cx88/cx88-tvaudio.c | 6 | ||||
-rw-r--r-- | linux/drivers/media/video/saa7134/saa7134-core.c | 11 | ||||
-rw-r--r-- | linux/drivers/media/video/saa7134/saa7134-dvb.c | 4 | ||||
-rw-r--r-- | linux/drivers/media/video/saa7134/saa7134-i2c.c | 5 | ||||
-rw-r--r-- | v4l/Make.config | 11 | ||||
-rw-r--r-- | v4l/mt352.c | 72 | ||||
-rw-r--r-- | v4l/mt352.h | 1 | ||||
-rw-r--r-- | v4l/scripts/update | 8 |
12 files changed, 77 insertions, 66 deletions
diff --git a/linux/drivers/media/video/bttv-driver.c b/linux/drivers/media/video/bttv-driver.c index 7c9765702..2845649f6 100644 --- a/linux/drivers/media/video/bttv-driver.c +++ b/linux/drivers/media/video/bttv-driver.c @@ -1,5 +1,5 @@ /* - $Id: bttv-driver.c,v 1.34 2005/01/07 13:11:19 kraxel Exp $ + $Id: bttv-driver.c,v 1.35 2005/01/24 17:37:23 kraxel Exp $ bttv - Bt848 frame grabber driver @@ -322,12 +322,12 @@ const struct bttv_tvnorm bttv_tvnorms[] = { .sram = -1, } }; -const unsigned int BTTV_TVNORMS = ARRAY_SIZE(bttv_tvnorms); +static const unsigned int BTTV_TVNORMS = ARRAY_SIZE(bttv_tvnorms); /* ----------------------------------------------------------------------- */ /* bttv format list packed pixel formats must come first */ -const struct bttv_format bttv_formats[] = { +static const struct bttv_format bttv_formats[] = { { .name = "8 bpp, gray", .palette = VIDEO_PALETTE_GREY, @@ -479,7 +479,7 @@ const struct bttv_format bttv_formats[] = { .flags = FORMAT_FLAGS_RAW, } }; -const unsigned int BTTV_FORMATS = ARRAY_SIZE(bttv_formats); +static const unsigned int BTTV_FORMATS = ARRAY_SIZE(bttv_formats); /* ----------------------------------------------------------------------- */ @@ -3970,7 +3970,7 @@ static int bttv_suspend(struct pci_dev *pci_dev, u32 state) #else pci_save_state(pci_dev); #endif - if (0 != pci_set_power_state(pci_dev, state)) { + if (0 != pci_set_power_state(pci_dev, pci_choose_state(pci_dev, state))) { pci_disable_device(pci_dev); btv->state.disabled = 1; } @@ -3989,7 +3989,7 @@ static int bttv_resume(struct pci_dev *pci_dev) pci_enable_device(pci_dev); btv->state.disabled = 0; } - pci_set_power_state(pci_dev, 0); + pci_set_power_state(pci_dev, PCI_D0); #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10) pci_restore_state(pci_dev, btv->state.pci_cfg); #else diff --git a/linux/drivers/media/video/bttv.h b/linux/drivers/media/video/bttv.h index a01d3bed1..586b3c32c 100644 --- a/linux/drivers/media/video/bttv.h +++ b/linux/drivers/media/video/bttv.h @@ -1,5 +1,5 @@ /* - * $Id: bttv.h,v 1.14 2005/01/07 13:11:19 kraxel Exp $ + * $Id: bttv.h,v 1.15 2005/01/24 17:37:23 kraxel Exp $ * * bttv - Bt848 frame grabber driver * @@ -220,7 +220,6 @@ struct tvcard }; extern struct tvcard bttv_tvcards[]; -extern const unsigned int bttv_num_tvcards; /* identification / initialization of the card */ extern void bttv_idcard(struct bttv *btv); diff --git a/linux/drivers/media/video/bttvp.h b/linux/drivers/media/video/bttvp.h index 2f336db3c..5ae21acfb 100644 --- a/linux/drivers/media/video/bttvp.h +++ b/linux/drivers/media/video/bttvp.h @@ -1,5 +1,5 @@ /* - $Id: bttvp.h,v 1.15 2004/12/14 15:33:30 kraxel Exp $ + $Id: bttvp.h,v 1.16 2005/01/24 17:37:23 kraxel Exp $ bttv - Bt848 frame grabber driver @@ -100,7 +100,6 @@ struct bttv_tvnorm { int sram; }; extern const struct bttv_tvnorm bttv_tvnorms[]; -extern const unsigned int BTTV_TVNORMS; struct bttv_format { char *name; @@ -112,8 +111,6 @@ struct bttv_format { int flags; int hshift,vshift; /* for planar modes */ }; -extern const struct bttv_format bttv_formats[]; -extern const unsigned int BTTV_FORMATS; /* ---------------------------------------------------------- */ diff --git a/linux/drivers/media/video/cx88/cx88-cards.c b/linux/drivers/media/video/cx88/cx88-cards.c index ea8410687..be82751dc 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.56 2005/01/13 17:22:33 kraxel Exp $ + * $Id: cx88-cards.c,v 1.57 2005/01/24 17:37:23 kraxel Exp $ * * device driver for Conexant 2388x based TV cards * card-specific stuff. @@ -60,6 +60,7 @@ struct cx88_board cx88_boards[] = { [CX88_BOARD_HAUPPAUGE] = { .name = "Hauppauge WinTV 34xxx models", .tuner_type = UNSET, + .tda9887_conf = TDA9887_PRESENT, .input = {{ .type = CX88_VMUX_TELEVISION, .vmux = 0, @@ -645,7 +646,7 @@ static int hauppauge_eeprom_dvb(struct cx88_core *core, u8 *ee) /* Make sure we support the tuner */ tuner = ee[0x2d]; switch(tuner) { - case 0x4B: /* ddt 7595 */ + case 0x4B: /* dtt 7595 */ case 0x4C: /* dtt 7592 */ core->pll_desc = &dvb_pll_thomson_dtt759x; break; diff --git a/linux/drivers/media/video/cx88/cx88-tvaudio.c b/linux/drivers/media/video/cx88/cx88-tvaudio.c index 846baae3e..21dc3c0fe 100644 --- a/linux/drivers/media/video/cx88/cx88-tvaudio.c +++ b/linux/drivers/media/video/cx88/cx88-tvaudio.c @@ -1,5 +1,5 @@ /* - $Id: cx88-tvaudio.c,v 1.28 2005/01/20 12:54:46 kraxel Exp $ + $Id: cx88-tvaudio.c,v 1.29 2005/01/24 17:37:23 kraxel Exp $ cx88x-audio.c - Conexant CX23880/23881 audio downstream driver driver @@ -520,6 +520,10 @@ static void set_audio_standard_A2(struct cx88_core *core) static const struct rlist a2_pal_i_mono[] = { // PAL-I (differences from dscaler CX2388xCard_Audio.cpp 1.30) + { AUD_ERRLOGPERIOD_R, 0x00000064}, + { AUD_ERRINTRPTTHSHLD1_R, 0x00000fff}, + { AUD_ERRINTRPTTHSHLD2_R, 0x0000001f}, + { AUD_ERRINTRPTTHSHLD3_R, 0x0000000f}, { AUD_PHACC_FREQ_8MSB, 0x3a }, { AUD_PHACC_FREQ_8LSB, 0x93 }, { AAGC_HYST, 0x0000000a }, diff --git a/linux/drivers/media/video/saa7134/saa7134-core.c b/linux/drivers/media/video/saa7134/saa7134-core.c index 0acbfb094..80f33e987 100644 --- a/linux/drivers/media/video/saa7134/saa7134-core.c +++ b/linux/drivers/media/video/saa7134/saa7134-core.c @@ -1,5 +1,5 @@ /* - * $Id: saa7134-core.c,v 1.23 2004/12/17 14:18:49 kraxel Exp $ + * $Id: saa7134-core.c,v 1.24 2005/01/24 17:37:23 kraxel Exp $ * * device driver for philips saa7134 based TV cards * driver core @@ -21,6 +21,7 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include <linux/config.h> #include <linux/init.h> #include <linux/list.h> #include <linux/module.h> @@ -237,6 +238,8 @@ static void dump_statusregs(struct saa7134_dev *dev) /* ----------------------------------------------------------- */ /* delayed request_module */ +#ifdef CONFIG_MODULES + static int need_empress; static int need_dvb; @@ -277,6 +280,12 @@ static void request_module_depend(char *name, int *flag) } } +#else + +static inline void request_module_depend(char *name, int *flag) {} + +#endif /* CONFIG_MODULES */ + /* ------------------------------------------------------------------ */ /* nr of (saa7134-)pages for the given buffer size */ diff --git a/linux/drivers/media/video/saa7134/saa7134-dvb.c b/linux/drivers/media/video/saa7134/saa7134-dvb.c index 2f1393589..07a98e3eb 100644 --- a/linux/drivers/media/video/saa7134/saa7134-dvb.c +++ b/linux/drivers/media/video/saa7134/saa7134-dvb.c @@ -1,5 +1,5 @@ /* - * $Id: saa7134-dvb.c,v 1.10 2005/01/14 16:40:20 kraxel Exp $ + * $Id: saa7134-dvb.c,v 1.11 2005/01/24 17:37:23 kraxel Exp $ * * (c) 2004 Gerd Knorr <kraxel@bytesex.org> [SuSE Labs] * @@ -81,6 +81,7 @@ static int mt352_pinnacle_init(struct dvb_frontend* fe) static u8 fsm_ctl_cfg[] = { 0x7b, 0x04 }; static u8 gpp_ctl_cfg [] = { GPP_CTL, 0x0f }; static u8 scan_ctl_cfg [] = { SCAN_CTL, 0x0d }; + static u8 irq_cfg [] = { INTERRUPT_EN_0, 0x00, 0x00, 0x00, 0x00 }; struct saa7134_dev *dev= fe->dvb->priv; printk("%s: %s called\n",dev->name,__FUNCTION__); @@ -95,6 +96,7 @@ static int mt352_pinnacle_init(struct dvb_frontend* fe) mt352_write(fe, fsm_ctl_cfg, sizeof(fsm_ctl_cfg)); mt352_write(fe, scan_ctl_cfg, sizeof(scan_ctl_cfg)); + mt352_write(fe, irq_cfg, sizeof(irq_cfg)); return 0; } diff --git a/linux/drivers/media/video/saa7134/saa7134-i2c.c b/linux/drivers/media/video/saa7134/saa7134-i2c.c index 8979b0a32..084d8c023 100644 --- a/linux/drivers/media/video/saa7134/saa7134-i2c.c +++ b/linux/drivers/media/video/saa7134/saa7134-i2c.c @@ -1,5 +1,5 @@ /* - * $Id: saa7134-i2c.c,v 1.9 2004/12/10 12:33:39 kraxel Exp $ + * $Id: saa7134-i2c.c,v 1.10 2005/01/24 17:37:23 kraxel Exp $ * * device driver for philips saa7134 based TV cards * i2c interface support @@ -206,7 +206,8 @@ static inline int i2c_send_byte(struct saa7134_dev *dev, dword &= 0x0f; dword |= (attr << 6); dword |= ((__u32)data << 8); - dword |= 0x00 << 16; + dword |= 0x00 << 16; /* 100 kHz */ +// dword |= 0x40 << 16; /* 400 kHz */ dword |= 0xf0 << 24; saa_writel(SAA7134_I2C_ATTR_STATUS >> 2, dword); #endif diff --git a/v4l/Make.config b/v4l/Make.config index b941e3ff8..004d49ae5 100644 --- a/v4l/Make.config +++ b/v4l/Make.config @@ -10,10 +10,13 @@ CONFIG_VIDEO_CX88 := m # doesn't build on kernels older than 2.6.10 # Hmm, need a more clever check once we have 2.6.11 ... -ifeq ($(KERNELRELEASE),2.6.10) +CONFIG_VIDEO_CX88_DVB := n +CONFIG_VIDEO_SAA7134_DVB := n +ifeq ($(SUBLEVEL),10) + CONFIG_VIDEO_CX88_DVB := m + CONFIG_VIDEO_SAA7134_DVB := m +endif +ifeq ($(SUBLEVEL),11) CONFIG_VIDEO_CX88_DVB := m CONFIG_VIDEO_SAA7134_DVB := m -else - CONFIG_VIDEO_CX88_DVB := n - CONFIG_VIDEO_SAA7134_DVB := n endif diff --git a/v4l/mt352.c b/v4l/mt352.c index baa3f67a7..6eeb659eb 100644 --- a/v4l/mt352.c +++ b/v4l/mt352.c @@ -46,7 +46,7 @@ struct mt352_state { /* configuration settings */ const struct mt352_config* config; - int status,s0,s1,s3; + int s0,s1,s3; struct dvb_frontend frontend; }; @@ -57,32 +57,33 @@ do { \ if (debug) printk(KERN_DEBUG "mt352: " args); \ } while (0) -int mt352_write(struct dvb_frontend* fe, u8* ibuf, int ilen) +static int mt352_single_write(struct dvb_frontend *fe, u8 reg, u8 val) { struct mt352_state* state = (struct mt352_state*) fe->demodulator_priv; + u8 buf[2] = { reg, val }; struct i2c_msg msg = { .addr = state->config->demod_address, .flags = 0, - .buf = ibuf, .len = ilen }; - if (debug) { - int i; - printk("%s:",__FUNCTION__); - for (i = 0; i < ilen; i++) - printk(" %02x",ibuf[i]); - printk("\n"); - } - + .buf = buf, .len = 2 }; int err = i2c_transfer(state->i2c, &msg, 1); if (err != 1) { - printk(KERN_WARNING - "mt352_write() failed (err = %d)!\n", err); + printk("mt352_write() to reg %x failed (err = %d)!\n", reg, err); return err; } + return 0; +} + +int mt352_write(struct dvb_frontend* fe, u8* ibuf, int ilen) +{ + int err,i; + for (i=0; i < ilen-1; i++) + if ((err = mt352_single_write(fe,ibuf[0]+i,ibuf[i+1]))) + return err; return 0; } static int mt352_read_register(struct mt352_state* state, u8 reg) { - int ret,i; + int ret; u8 b0 [] = { reg }; u8 b1 [] = { 0 }; struct i2c_msg msg [] = { { .addr = state->config->demod_address, @@ -92,24 +93,22 @@ static int mt352_read_register(struct mt352_state* state, u8 reg) .flags = I2C_M_RD, .buf = b1, .len = 1 } }; - for (i = 0; i < 5; i++) { - ret = i2c_transfer(state->i2c, msg, 2); - if (2 == ret) - break; - msleep(10); - dprintk("%s: readreg error #%d, retrying\n", - __FUNCTION__, i+1); - } + ret = i2c_transfer(state->i2c, msg, 2); if (ret != 2) { - printk(KERN_WARNING - "%s: readreg error (ret == %i)\n", __FUNCTION__, ret); - return -1; + printk("%s: readreg error (reg=%d, ret==%i)\n", + __FUNCTION__, reg, ret); + return ret; } return b1[0]; } +int mt352_read(struct dvb_frontend *fe, u8 reg) +{ + return mt352_read_register(fe->demodulator_priv,reg); +} + static int mt352_sleep(struct dvb_frontend* fe) { static u8 mt352_softdown[] = { CLOCK_CTL, 0x20, 0x08 }; @@ -435,6 +434,7 @@ static int mt352_get_parameters(struct dvb_frontend* fe, static int mt352_read_status(struct dvb_frontend* fe, fe_status_t* status) { struct mt352_state* state = (struct mt352_state*) fe->demodulator_priv; +#if 1 int val; if (0 != mt352_read_register(state, INTERRUPT_0)) { @@ -448,6 +448,13 @@ static int mt352_read_status(struct dvb_frontend* fe, fe_status_t* status) if (-1 != val) state->s3 = val; } +#else + state->s0 = mt352_read_register(state, STATUS_0); + state->s1 = mt352_read_register(state, STATUS_1); + state->s3 = mt352_read_register(state, STATUS_3); + if (-1 == state->s0 || -1 == state->s1 || -1 == state->s3) + return -EIO; +#endif *status = 0; if (state->s0 & (1 << 4)) @@ -465,20 +472,6 @@ static int mt352_read_status(struct dvb_frontend* fe, fe_status_t* status) (FE_HAS_CARRIER | FE_HAS_VITERBI | FE_HAS_SYNC)) *status &= ~FE_HAS_LOCK; - if (debug && state->status != *status) { - /* log status bit changes */ - printk("%s:%s%s%s%s%s | r0=0x%02x r1=0x%02x r3=0x%02x\n", - __FUNCTION__, - *status & FE_HAS_CARRIER ? " CARRIER" : "", - *status & FE_HAS_VITERBI ? " VITERBI" : "", - *status & FE_HAS_LOCK ? " LOCK" : "", - *status & FE_HAS_SYNC ? " SYNC" : "", - *status & FE_HAS_SIGNAL ? " SIGNAL" : "", - state->s0, state->s1, state->s3); - - } - state->status = *status; - return 0; } @@ -631,6 +624,7 @@ MODULE_LICENSE("GPL"); EXPORT_SYMBOL(mt352_attach); EXPORT_SYMBOL(mt352_write); +EXPORT_SYMBOL(mt352_read); /* * Local variables: * c-basic-offset: 8 diff --git a/v4l/mt352.h b/v4l/mt352.h index 8bc032f7f..f5d8a5aed 100644 --- a/v4l/mt352.h +++ b/v4l/mt352.h @@ -61,6 +61,7 @@ extern struct dvb_frontend* mt352_attach(const struct mt352_config* config, struct i2c_adapter* i2c); extern int mt352_write(struct dvb_frontend* fe, u8* ibuf, int ilen); +extern int mt352_read(struct dvb_frontend *fe, u8 reg); #endif // MT352_H diff --git a/v4l/scripts/update b/v4l/scripts/update index 1a9731e47..f52983e4c 100644 --- a/v4l/scripts/update +++ b/v4l/scripts/update @@ -69,10 +69,10 @@ v4l2basic #xrmmod v4l1-compat #xinsmod v4l1-compat debug=1 -xinsmod tveeprom debug=1 -xinsmod dvb-pll debug=1 +xinsmod tveeprom debug=0 +xinsmod dvb-pll debug=0 xinsmod btcx-risc debug=0 -xinsmod ir-common debug=1 repeat=0 +xinsmod ir-common debug=0 repeat=0 xinsmod tuner debug=1 xinsmod tda9887 debug=0 qss=1 xinsmod msp3400 debug=0 @@ -99,5 +99,5 @@ xinsmod saa7134-empress xinsmod cx22702 debug=0 xinsmod mt352 debug=1 xinsmod video-buf-dvb -xinsmod cx88-dvb +#xinsmod cx88-dvb xinsmod saa7134-dvb |