diff options
Diffstat (limited to 'linux/drivers/media/video/saa7134/saa7134-video.c')
-rw-r--r-- | linux/drivers/media/video/saa7134/saa7134-video.c | 35 |
1 files changed, 19 insertions, 16 deletions
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); |