From a0d2792717f02f06a91f9c13e5e8daf01798a859 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Sun, 2 Dec 2007 01:02:18 -0200 Subject: Fix DVB compatibility From: Mauro Carvalho Chehab DVB-S is not supported. Also, there are some QAM6 firmwares for xc3028, but it is reported that this doesn't work fine. Thanks to Manu Abraham, Michael Krufky and Patrick Boettcher for their insights. Signed-off-by: Mauro Carvalho Chehab --- linux/drivers/media/video/tuner-xc2028.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'linux') diff --git a/linux/drivers/media/video/tuner-xc2028.c b/linux/drivers/media/video/tuner-xc2028.c index 0689e1d58..745673be6 100644 --- a/linux/drivers/media/video/tuner-xc2028.c +++ b/linux/drivers/media/video/tuner-xc2028.c @@ -972,12 +972,14 @@ static int xc2028_set_params(struct dvb_frontend *fe, type |= D2620; switch(fe->ops.info.type) { - case FE_QPSK: - break; case FE_OFDM: bw = p->u.ofdm.bandwidth; break; case FE_QAM: + tuner_info("WARN: There are some reports that " + "QAM 6 MHz doesn't work.\n" + "If this works for you, please report by " + "e-mail to: v4l-dvb-maintainer@linuxtv.org\n"); bw = BANDWIDTH_6_MHZ; type |= QAM; break; @@ -985,6 +987,9 @@ static int xc2028_set_params(struct dvb_frontend *fe, bw = BANDWIDTH_6_MHZ; type |= ATSC| D2633; break; + /* DVB-S is not supported */ + default: + return -EINVAL; } /* FIXME: -- cgit v1.2.3 From 3e183c071a2386de1e1f9d6149540e362cf2597a Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Tue, 27 Nov 2007 10:59:37 +0100 Subject: Complement va_start() with va_end() + style fixes From: Richard Knutsson Complement va_start() with va_end() + minor style fixes in the same function. Signed-off-by: Richard Knutsson Signed-off-by: Mauro Carvalho Chehab --- linux/drivers/media/video/saa5246a.c | 10 ++++++---- linux/drivers/media/video/saa5249.c | 8 +++++--- 2 files changed, 11 insertions(+), 7 deletions(-) (limited to 'linux') diff --git a/linux/drivers/media/video/saa5246a.c b/linux/drivers/media/video/saa5246a.c index 1c5bf3f38..900185cf2 100644 --- a/linux/drivers/media/video/saa5246a.c +++ b/linux/drivers/media/video/saa5246a.c @@ -197,12 +197,14 @@ static int i2c_senddata(struct saa5246a_device *t, ...) { unsigned char buf[64]; int v; - int ct=0; + int ct = 0; va_list argp; - va_start(argp,t); + va_start(argp, t); - while((v=va_arg(argp,int))!=-1) - buf[ct++]=v; + while ((v = va_arg(argp, int)) != -1) + buf[ct++] = v; + + va_end(argp); return i2c_sendbuf(t, buf[0], ct-1, buf+1); } diff --git a/linux/drivers/media/video/saa5249.c b/linux/drivers/media/video/saa5249.c index 8fa29c540..03923d96f 100644 --- a/linux/drivers/media/video/saa5249.c +++ b/linux/drivers/media/video/saa5249.c @@ -292,12 +292,14 @@ static int i2c_senddata(struct saa5249_device *t, ...) { unsigned char buf[64]; int v; - int ct=0; + int ct = 0; va_list argp; va_start(argp,t); - while((v=va_arg(argp,int))!=-1) - buf[ct++]=v; + while ((v = va_arg(argp, int)) != -1) + buf[ct++] = v; + + va_end(argp); return i2c_sendbuf(t, buf[0], ct-1, buf+1); } -- cgit v1.2.3 From 916446c701fb0dd6e8c29f883d8b73a14745ab6e Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Mon, 26 Nov 2007 13:57:10 -0800 Subject: ir-keymaps.c: extra keys on winfast Y04G0033 remote From: Michel Lespinasse This change adds support for 4 extra keys on the remote currently being shipped by leadtek with their "WinFast TV2000 XP/Expert" and "WinFast PVR2000" cards. The remote P/N seems to be Y04G0033 and you can see a picture of it here: http://lespinasse.org/y04g0033.jpg The extra keys are at the bottom and are labeled MCE +VOL, -VOL, +CH, -CH. I chose to map them to the F21-F24 keycodes, following the precedent of ir_codes_gotview7135[], so as to differentiate these 'MCE' keys from the other +VOL, -VOL, +CH, -CH 'arrow' keys higher up on the remote. Signed-off-by: Michel Lespinasse Signed-off-by: Mauro Carvalho Chehab --- linux/drivers/media/common/ir-keymaps.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'linux') diff --git a/linux/drivers/media/common/ir-keymaps.c b/linux/drivers/media/common/ir-keymaps.c index f61bbc37a..a15adf834 100644 --- a/linux/drivers/media/common/ir-keymaps.c +++ b/linux/drivers/media/common/ir-keymaps.c @@ -1374,7 +1374,12 @@ IR_KEYTAB_TYPE ir_codes_winfast[IR_KEYTAB_SIZE] = { [ 0x35 ] = KEY_FASTFORWARD, [ 0x36 ] = KEY_TV, [ 0x37 ] = KEY_RADIO, /* FM */ - [ 0x38 ] = KEY_DVD + [ 0x38 ] = KEY_DVD, + + [ 0x3e ] = KEY_F21, /* MCE +VOL, on Y04G0033 */ + [ 0x3a ] = KEY_F22, /* MCE -VOL, on Y04G0033 */ + [ 0x3b ] = KEY_F23, /* MCE +CH, on Y04G0033 */ + [ 0x3f ] = KEY_F24 /* MCE -CH, on Y04G0033 */ }; EXPORT_SYMBOL_GPL(ir_codes_winfast); -- cgit v1.2.3 From 93456e348f73f2aebd3983567c0b280de2141736 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Thu, 29 Nov 2007 01:50:26 +0100 Subject: saa7134: fix composite over s-video input on the Tevion MD 9717 From: Hermann Pitton The vmux for composite over s-video input was wrong. Signed-off-by: Hermann Pitton Signed-off-by: Mauro Carvalho Chehab --- linux/drivers/media/video/saa7134/saa7134-cards.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'linux') diff --git a/linux/drivers/media/video/saa7134/saa7134-cards.c b/linux/drivers/media/video/saa7134/saa7134-cards.c index 6f8f73b12..3f5a909de 100644 --- a/linux/drivers/media/video/saa7134/saa7134-cards.c +++ b/linux/drivers/media/video/saa7134/saa7134-cards.c @@ -335,7 +335,7 @@ struct saa7134_board saa7134_boards[] = { .tv = 1, },{ .name = name_comp1, - .vmux = 2, + .vmux = 0, .amux = LINE1, },{ .name = name_comp2, -- cgit v1.2.3 From 739e48c935eb2b29b6e65afce1ad17d88c49870f Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Thu, 29 Nov 2007 01:54:35 +0100 Subject: saa7134: add mute support for radio/analog-in on MD9717 and MD7134 From: Hermann Pitton Hi, since there is no movement on this since ever, I suggest to proceed in that direction for now. Better solutions, if the chip or tuners should allow them, are of course welcome. Cheers, Hermann Currently the saa7134 chips only have mute support for the TV input. Cards with mute from external audio muxes are already fine on the other inputs and some recent tuners mute at least the radio on exit. But these mostly hybrid tuners are not fully backward compatible, since they must power down and mute regardless. For some included above, the MD7134 knows several, to switch on mute/automute to the TV input is functional and backward compatible for the applications, except that the tuners with tda9887 always mute on exit. Signed-off-by: Hermann Pitton Signed-off-by: Mauro Carvalho Chehab --- linux/drivers/media/video/saa7134/saa7134-cards.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'linux') diff --git a/linux/drivers/media/video/saa7134/saa7134-cards.c b/linux/drivers/media/video/saa7134/saa7134-cards.c index 3f5a909de..85ed1ecae 100644 --- a/linux/drivers/media/video/saa7134/saa7134-cards.c +++ b/linux/drivers/media/video/saa7134/saa7134-cards.c @@ -350,6 +350,10 @@ struct saa7134_board saa7134_boards[] = { .name = name_radio, .amux = LINE2, }, + .mute = { + .name = name_mute, + .amux = TV, + }, }, [SAA7134_BOARD_TVSTATION_RDS] = { /* Typhoon TV Tuner RDS: Art.Nr. 50694 */ @@ -566,6 +570,10 @@ struct saa7134_board saa7134_boards[] = { .radio = { .name = name_radio, .amux = LINE2, + }, + .mute = { + .name = name_mute, + .amux = TV, }, }, [SAA7134_BOARD_TYPHOON_90031] = { -- cgit v1.2.3 From 9d9151f5414827fb46a0e849abaa7f45e9f33dc4 Mon Sep 17 00:00:00 2001 From: Brandon Philips Date: Fri, 30 Nov 2007 17:37:28 -0800 Subject: V4L: fix copy and paste error in dprintk for videobuf-vmalloc.c Signed-off-by: Brandon Philips --- linux/drivers/media/video/videobuf-vmalloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'linux') diff --git a/linux/drivers/media/video/videobuf-vmalloc.c b/linux/drivers/media/video/videobuf-vmalloc.c index dfdab8746..ceb4b54ac 100644 --- a/linux/drivers/media/video/videobuf-vmalloc.c +++ b/linux/drivers/media/video/videobuf-vmalloc.c @@ -42,7 +42,7 @@ MODULE_AUTHOR("Mauro Carvalho Chehab "); MODULE_LICENSE("GPL"); #define dprintk(level, fmt, arg...) if (debug >= level) \ - printk(KERN_DEBUG "vbuf-sg: " fmt , ## arg) + printk(KERN_DEBUG "vbuf-vmalloc: " fmt , ## arg) /***************************************************************************/ -- cgit v1.2.3 From 89200e6a6d61a33ac655f8992e95304c2995924d Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Fri, 30 Nov 2007 18:27:26 +0200 Subject: saa7134: fix ignored interrupts From: Heikki Lindholm The saa7134 video driver starts dropping frames when used together with the saa7134-alsa driver. Frames are dropped because when an audio event is waiting the driver simply ignores the interrupt and passes it on to the saa7134-alsa interrupt handler. The alsa interrupt handler in turn acknowledges all types of events thus clearing the pending video events as well. Fix by only masking out the audio event in the video interrupt handler and by only acknowledging the audio event in the alsa driver. Signed-off-by: Heikki Lindholm Signed-off-by: Mauro Carvalho Chehab --- linux/drivers/media/video/saa7134/saa7134-alsa.c | 3 ++- linux/drivers/media/video/saa7134/saa7134-core.c | 21 +++++++++++---------- 2 files changed, 13 insertions(+), 11 deletions(-) (limited to 'linux') diff --git a/linux/drivers/media/video/saa7134/saa7134-alsa.c b/linux/drivers/media/video/saa7134/saa7134-alsa.c index c6715b054..8f80a6ab0 100644 --- a/linux/drivers/media/video/saa7134/saa7134-alsa.c +++ b/linux/drivers/media/video/saa7134/saa7134-alsa.c @@ -236,7 +236,8 @@ static irqreturn_t saa7134_alsa_irq(int irq, void *dev_id) if (report & SAA7134_IRQ_REPORT_DONE_RA3) { handled = 1; - saa_writel(SAA7134_IRQ_REPORT,report); + saa_writel(SAA7134_IRQ_REPORT, + SAA7134_IRQ_REPORT_DONE_RA3); saa7134_irq_alsa_done(dev, status); } else { goto out; diff --git a/linux/drivers/media/video/saa7134/saa7134-core.c b/linux/drivers/media/video/saa7134/saa7134-core.c index adc194c22..639f5851b 100644 --- a/linux/drivers/media/video/saa7134/saa7134-core.c +++ b/linux/drivers/media/video/saa7134/saa7134-core.c @@ -659,21 +659,22 @@ static irqreturn_t saa7134_irq(int irq, void *dev_id) for (loop = 0; loop < 10; loop++) { report = saa_readl(SAA7134_IRQ_REPORT); status = saa_readl(SAA7134_IRQ_STATUS); - if (0 == report) { - if (irq_debug > 1) - printk(KERN_DEBUG "%s/irq: no (more) work\n", - dev->name); - goto out; - } - - /* If dmasound support is active and we get a sound report, exit - and let the saa7134-alsa/oss module deal with it */ + /* If dmasound support is active and we get a sound report, + * mask out the report and let the saa7134-alsa module deal + * with it */ if ((report & SAA7134_IRQ_REPORT_DONE_RA3) && (dev->dmasound.priv_data != NULL) ) { if (irq_debug > 1) - printk(KERN_DEBUG "%s/irq: ignoring interrupt for DMA sound\n", + printk(KERN_DEBUG "%s/irq: preserving DMA sound interrupt\n", + dev->name); + report &= ~SAA7134_IRQ_REPORT_DONE_RA3; + } + + if (0 == report) { + if (irq_debug > 1) + printk(KERN_DEBUG "%s/irq: no (more) work\n", dev->name); goto out; } -- cgit v1.2.3