summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video
diff options
context:
space:
mode:
authorGerd Knorr <devnull@localhost>2004-11-19 12:16:30 +0000
committerGerd Knorr <devnull@localhost>2004-11-19 12:16:30 +0000
commitbe06ee9b223801a7f8f55d5303c84c5068728d16 (patch)
tree2c3e32e9176163f8010604fb3032cc4f4d26cb5b /linux/drivers/media/video
parent3fa96d998ecb81715dc28a2a3ed574a7896532f6 (diff)
downloadmediapointer-dvb-s2-be06ee9b223801a7f8f55d5303c84c5068728d16.tar.gz
mediapointer-dvb-s2-be06ee9b223801a7f8f55d5303c84c5068728d16.tar.bz2
- saa7134: signal detection fixes.
Diffstat (limited to 'linux/drivers/media/video')
-rw-r--r--linux/drivers/media/video/bttv-cards.c6
-rw-r--r--linux/drivers/media/video/saa7134/saa7134-core.c7
-rw-r--r--linux/drivers/media/video/saa7134/saa7134-video.c35
3 files changed, 26 insertions, 22 deletions
diff --git a/linux/drivers/media/video/bttv-cards.c b/linux/drivers/media/video/bttv-cards.c
index 4df326b56..398bd7e83 100644
--- a/linux/drivers/media/video/bttv-cards.c
+++ b/linux/drivers/media/video/bttv-cards.c
@@ -1,5 +1,5 @@
/*
- $Id: bttv-cards.c,v 1.33 2004/11/09 11:34:59 kraxel Exp $
+ $Id: bttv-cards.c,v 1.34 2004/11/19 12:16:30 kraxel Exp $
bttv-cards.c
@@ -33,9 +33,7 @@
#include <linux/init.h>
#include <linux/pci.h>
#include <linux/vmalloc.h>
-#if defined(CONFIG_FW_LOADER) || defined(CONFIG_FW_LOADER_MODULE)
-# include <linux/firmware.h>
-#endif
+#include <linux/firmware.h>
#include <asm/io.h>
diff --git a/linux/drivers/media/video/saa7134/saa7134-core.c b/linux/drivers/media/video/saa7134/saa7134-core.c
index e8e8df67e..e4da789c3 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.17 2004/11/18 14:05:57 kraxel Exp $
+ * $Id: saa7134-core.c,v 1.18 2004/11/19 12:16:30 kraxel Exp $
*
* device driver for philips saa7134 based TV cards
* driver core
@@ -587,7 +587,7 @@ static irqreturn_t saa7134_irq(int irq, void *dev_id, struct pt_regs *regs)
dump_statusregs(dev);
#endif
- if (report & SAA7134_IRQ_REPORT_INTL)
+ if (report & SAA7134_IRQ_REPORT_RDCAP /* _INTL */)
saa7134_irq_video_intl(dev);
if ((report & SAA7134_IRQ_REPORT_DONE_RA0) &&
@@ -1030,6 +1030,9 @@ static int __devinit saa7134_initdev(struct pci_dev *pci_dev,
}
list_add_tail(&dev->devlist,&saa7134_devlist);
up(&devlist_lock);
+
+ /* check for signal */
+ saa7134_irq_video_intl(dev);
return 0;
fail5:
diff --git a/linux/drivers/media/video/saa7134/saa7134-video.c b/linux/drivers/media/video/saa7134/saa7134-video.c
index 1b97267c8..7df558d76 100644
--- a/linux/drivers/media/video/saa7134/saa7134-video.c
+++ b/linux/drivers/media/video/saa7134/saa7134-video.c
@@ -1,5 +1,5 @@
/*
- * $Id: saa7134-video.c,v 1.20 2004/11/18 14:05:57 kraxel Exp $
+ * $Id: saa7134-video.c,v 1.21 2004/11/19 12:16:30 kraxel Exp $
*
* device driver for philips saa7134 based TV cards
* video4linux video interface
@@ -1345,7 +1345,7 @@ static int video_release(struct inode *inode, struct file *file)
res_free(dev,fh,RESOURCE_VIDEO);
}
if (fh->cap.read_buf) {
- buffer_release(file->private_data,fh->cap.read_buf);
+ buffer_release(&fh->cap,fh->cap.read_buf);
kfree(fh->cap.read_buf);
}
@@ -2316,25 +2316,28 @@ int saa7134_video_fini(struct saa7134_dev *dev)
void saa7134_irq_video_intl(struct saa7134_dev *dev)
{
static const char *st[] = {
- "no signal", "found NTSC", "found PAL", "found SECAM" };
- int norm;
-
- norm = saa_readb(SAA7134_STATUS_VIDEO1) & 0x03;
- dprintk("DCSDT: %s\n",st[norm]);
-
- if (0 != norm) {
- /* wake up tvaudio audio carrier scan thread */
- saa7134_tvaudio_do_scan(dev);
- if (!noninterlaced)
- saa_clearb(SAA7134_SYNC_CTRL, 0x20);
- dev->nosignal = 0;
- } else {
+ "(no signal)", "NTSC", "PAL", "SECAM" };
+ u32 st1,st2;
+
+ st1 = saa_readb(SAA7134_STATUS_VIDEO1);
+ st2 = saa_readb(SAA7134_STATUS_VIDEO2);
+ dprintk("DCSDT: pll: %s, sync: %s, norm: %s\n",
+ (st1 & 0x40) ? "not locked" : "locked",
+ (st2 & 0x40) ? "no" : "yes",
+ st[st1 & 0x03]);
+ dev->nosignal = (st1 & 0x40) || (st2 & 0x40);
+
+ if (dev->nosignal) {
/* no video signal -> mute audio */
if (dev->ctl_automute)
dev->automute = 1;
saa7134_tvaudio_setmute(dev);
saa_setb(SAA7134_SYNC_CTRL, 0x20);
- dev->nosignal = 1;
+ } else {
+ /* wake up tvaudio audio carrier scan thread */
+ saa7134_tvaudio_do_scan(dev);
+ if (!noninterlaced)
+ saa_clearb(SAA7134_SYNC_CTRL, 0x20);
}
if (dev->mops && dev->mops->signal_change)
dev->mops->signal_change(dev);