diff options
author | Gerd Knorr <devnull@localhost> | 2004-03-05 15:39:48 +0000 |
---|---|---|
committer | Gerd Knorr <devnull@localhost> | 2004-03-05 15:39:48 +0000 |
commit | 82b2d6930fd7bb41b71617ca5eba804605af5513 (patch) | |
tree | e12631fc0fc6a4bdcb627871750b5da51c5837e2 | |
parent | faee4a0ef457ebde343292fad383df29c77b562b (diff) | |
download | mediapointer-dvb-s2-82b2d6930fd7bb41b71617ca5eba804605af5513.tar.gz mediapointer-dvb-s2-82b2d6930fd7bb41b71617ca5eba804605af5513.tar.bz2 |
- more cards supported in ir-kbd-gpio.c
- add magics to video-buf structs.
- fix saa7134 oss driver spinlocks.
- misc minor stuff.
-rw-r--r-- | linux/Documentation/video4linux/CARDLIST.bttv | 6 | ||||
-rw-r--r-- | linux/Documentation/video4linux/CARDLIST.saa7134 | 45 | ||||
-rw-r--r-- | linux/Documentation/video4linux/CARDLIST.tuner | 5 | ||||
-rw-r--r-- | linux/Documentation/video4linux/README.cx88 | 5 | ||||
-rw-r--r-- | linux/drivers/media/video/cx88/cx88-cards.c | 4 | ||||
-rw-r--r-- | linux/drivers/media/video/cx88/cx88-i2c.c | 2 | ||||
-rw-r--r-- | linux/drivers/media/video/cx88/cx88-video.c | 24 | ||||
-rw-r--r-- | linux/drivers/media/video/ir-kbd-gpio.c | 13 | ||||
-rw-r--r-- | linux/drivers/media/video/saa7134/saa7134-core.c | 2 | ||||
-rw-r--r-- | linux/drivers/media/video/saa7134/saa7134-oss.c | 50 | ||||
-rw-r--r-- | linux/drivers/media/video/saa7134/saa7134.h | 3 | ||||
-rw-r--r-- | linux/drivers/media/video/v4l1-compat.c | 1 | ||||
-rw-r--r-- | linux/drivers/media/video/video-buf.c | 27 | ||||
-rw-r--r-- | linux/include/media/video-buf.h | 3 | ||||
-rw-r--r-- | v4l/scripts/saa7134.pl | 2 | ||||
-rw-r--r-- | v4l/scripts/update | 6 |
16 files changed, 146 insertions, 52 deletions
diff --git a/linux/Documentation/video4linux/CARDLIST.bttv b/linux/Documentation/video4linux/CARDLIST.bttv index 64229aee1..e46761c39 100644 --- a/linux/Documentation/video4linux/CARDLIST.bttv +++ b/linux/Documentation/video4linux/CARDLIST.bttv @@ -113,3 +113,9 @@ card=111 - IVC-120G card=112 - pcHDTV HD-2000 TV card=113 - Twinhan DST + clones card=114 - Winfast VC100 +card=115 - Teppro TEV-560/InterVision IV-560 +card=116 - SIMUS GVC1100 +card=117 - NGS NGSTV+ +card=118 - LMLBT4 +card=119 - Tekram M205 PRO +card=120 - Conceptronic CONTVFMi diff --git a/linux/Documentation/video4linux/CARDLIST.saa7134 b/linux/Documentation/video4linux/CARDLIST.saa7134 index 619e07a8d..d7feb5fe5 100644 --- a/linux/Documentation/video4linux/CARDLIST.saa7134 +++ b/linux/Documentation/video4linux/CARDLIST.saa7134 @@ -1,23 +1,34 @@ 0 -> UNKNOWN/GENERIC 1 -> Proteus Pro [philips reference design] [1131:2001,1131:2001] - 2 -> LifeView FlyVIDEO3000 [5168:0138] + 2 -> LifeView FlyVIDEO3000 [5168:0138,4e42:0138] 3 -> LifeView FlyVIDEO2000 [5168:0138] 4 -> EMPRESS [1131:6752] 5 -> SKNet Monster TV [1131:4e85] 6 -> Tevion MD 9717 - 7 -> KNC One TV-Station RDS / Typhoon TV+Radio 90031 [1131:fe01] - 8 -> Terratec Cinergy 400 TV [153B:1142] - 9 -> Medion 5044 - 10 -> Kworld/KuroutoShikou SAA7130-TVPCI - 11 -> Terratec Cinergy 600 TV [153B:1143] - 12 -> Medion 7134 [16be:0003] - 13 -> ELSA EX-VISION 300TV [1048:226b] - 14 -> ELSA EX-VISION 500TV [1048:226b] - 15 -> ASUS TV-FM 7134 [PCI_VENDOR_ID_ASUSTEK:4842,PCI_VENDOR_ID_ASUSTEK:4830] - 16 -> AOPEN VA1000 POWER [1131:7133] - 17 -> 10MOONS PCI TV CAPTURE CARD [1131:2001] - 18 -> BMK MPEX No Tuner - 19 -> Compro VideoMate TV [185b:c100] - 20 -> Matrox CronosPlus [PCI_VENDOR_ID_MATROX:48d0] - 21 -> Medion 2819 [1461:a70b] - 22 -> BMK MPEX Tuner + 7 -> KNC One TV-Station RDS / Typhoon TV Tuner RDS [1131:fe01,1894:fe01] + 8 -> KNC One TV-Station DVR [1894:a006] + 9 -> Terratec Cinergy 400 TV [153B:1142] + 10 -> Medion 5044 + 11 -> Kworld/KuroutoShikou SAA7130-TVPCI + 12 -> Terratec Cinergy 600 TV [153B:1143] + 13 -> Medion 7134 [16be:0003] + 14 -> Typhoon TV+Radio 90031 + 15 -> ELSA EX-VISION 300TV [1048:226b] + 16 -> ELSA EX-VISION 500TV [1048:226b] + 17 -> ASUS TV-FM 7134 [1043:4842,1043:4830,1043:4840] + 18 -> AOPEN VA1000 POWER [1131:7133] + 19 -> 10MOONS PCI TV CAPTURE CARD [1131:2001] + 20 -> BMK MPEX No Tuner + 21 -> Compro VideoMate TV [185b:c100] + 22 -> Matrox CronosPlus [102B:48d0] + 23 -> Medion 2819/ AverMedia M156 [1461:a70b,1461:2115] + 24 -> BMK MPEX Tuner + 25 -> ASUS TV-FM 7133 [1043:4843] + 26 -> Pinnacle PCTV Stereo (saa7134) [11bd:002b] + 27 -> Manli MuchTV M-TV002 + 28 -> Manli MuchTV M-TV001 + 29 -> Nagase Sangyo TransGear 3000TV [1461:050c] + 30 -> Elitegroup ECS TVP3XP FM1216 Tuner Card(PAL-BG,FM) [1019:4cb4] + 31 -> Elitegroup ECS TVP3XP FM1236 Tuner Card (NTSC,FM) [1019:4cb5] + 32 -> AVACS SmartTV + 33 -> AVerMedia DVD EZMaker [1461:10ff] diff --git a/linux/Documentation/video4linux/CARDLIST.tuner b/linux/Documentation/video4linux/CARDLIST.tuner index 64e79fb87..f7bafe862 100644 --- a/linux/Documentation/video4linux/CARDLIST.tuner +++ b/linux/Documentation/video4linux/CARDLIST.tuner @@ -31,7 +31,7 @@ tuner=29 - LG PAL_BG (TPI8PSB11D) tuner=30 - Temic PAL* auto + FM (4009 FN5) tuner=31 - SHARP NTSC_JP (2U5JF5540) tuner=32 - Samsung PAL TCPM9091PD27 -tuner=33 - MT2032 universal +tuner=33 - MT20xx universal tuner=34 - Temic PAL_BG (4106 FH5) tuner=35 - Temic PAL_DK/SECAM_L (4012 FY5) tuner=36 - Temic NTSC (4136 FY5) @@ -41,3 +41,6 @@ tuner=39 - LG NTSC (newer TAPC series) tuner=40 - HITACHI V7-J180AT tuner=41 - Philips PAL_MK (FI1216 MK) tuner=42 - Philips 1236D ATSC/NTSC daul in +tuner=43 - Philips NTSC MK3 (FM1236MK3 or FM1236/F) +tuner=44 - Philips 4 in 1 (ATI TV Wonder Pro/Conexant) +tuner=45 - Microtune 4049 FM5 diff --git a/linux/Documentation/video4linux/README.cx88 b/linux/Documentation/video4linux/README.cx88 index f338ce694..fd13e8e02 100644 --- a/linux/Documentation/video4linux/README.cx88 +++ b/linux/Documentation/video4linux/README.cx88 @@ -11,7 +11,7 @@ current status video - Basically works. - Some minor image quality glitches. - - Eed and blue are swapped sometimes for not-yet known + - Red and blue are swapped sometimes for not-yet known reasons (seems to depend on the image size, try to resize your tv app window as workaround ...). - For now only capture, overlay support isn't completed yet. @@ -19,7 +19,8 @@ video audio - The chip specs for the on-chip TV sound decoder are next to useless :-/ - - Neverless the builtin TV sound decoder starts working now. + - Neverless the builtin TV sound decoder starts working no, + at least for PAL-BG. Other TV norms need other code ... - Most tuner chips do provide mono sound, which may or may not be useable depending on the board design. With the Hauppauge cards it works, so there is mono sound available as fallback. diff --git a/linux/drivers/media/video/cx88/cx88-cards.c b/linux/drivers/media/video/cx88/cx88-cards.c index df990c859..9fd1e5b58 100644 --- a/linux/drivers/media/video/cx88/cx88-cards.c +++ b/linux/drivers/media/video/cx88/cx88-cards.c @@ -404,13 +404,13 @@ void __devinit cx88_card_setup(struct cx8800_dev *dev) switch (dev->board) { case CX88_BOARD_HAUPPAUGE: - printk("cx88_card_setup: Hauppauge\n") + printk("cx88_card_setup: Hauppauge\n"); if (0 == dev->i2c_rc) i2c_eeprom(&dev->i2c_client,eeprom,sizeof(eeprom)); hauppauge_eeprom(dev,eeprom+8); break; case CX88_BOARD_GDI: - printk("cx88_card_setup: GDI\n") + printk("cx88_card_setup: GDI\n"); if (0 == dev->i2c_rc) i2c_eeprom(&dev->i2c_client,eeprom,sizeof(eeprom)); gdi_eeprom(dev,eeprom); diff --git a/linux/drivers/media/video/cx88/cx88-i2c.c b/linux/drivers/media/video/cx88/cx88-i2c.c index 2de607e1f..8bbf4bef5 100644 --- a/linux/drivers/media/video/cx88/cx88-i2c.c +++ b/linux/drivers/media/video/cx88/cx88-i2c.c @@ -164,6 +164,8 @@ int __devinit cx8800_i2c_init(struct cx8800_dev *dev) cx8800_bit_setsda(dev,1); dev->i2c_rc = i2c_bit_add_bus(&dev->i2c_adap); + printk("%s: i2c register %s\n", dev->name, + (0 == dev->i2c_rc) ? "ok" : "FAILED"); return dev->i2c_rc; } diff --git a/linux/drivers/media/video/cx88/cx88-video.c b/linux/drivers/media/video/cx88/cx88-video.c index e831b1c0d..56b72e44d 100644 --- a/linux/drivers/media/video/cx88/cx88-video.c +++ b/linux/drivers/media/video/cx88/cx88-video.c @@ -1757,6 +1757,30 @@ static int video_do_ioctl(struct inode *inode, struct file *file, } /* --- streaming capture ------------------------------------- */ + case VIDIOCGMBUF: + { + struct video_mbuf *mbuf = arg; + struct videobuf_queue *q; + struct v4l2_requestbuffers req; + unsigned int i; + + q = get_queue(fh); + memset(&req,0,sizeof(req)); + req.type = q->type; + req.count = 8; + req.memory = V4L2_MEMORY_MMAP; + err = videobuf_reqbufs(file,q,&req); + if (err < 0) + return err; + memset(mbuf,0,sizeof(*mbuf)); + mbuf->frames = req.count; + mbuf->size = 0; + for (i = 0; i < mbuf->frames; i++) { + mbuf->offsets[i] = q->bufs[i]->boff; + mbuf->size += q->bufs[i]->bsize; + } + return 0; + } case VIDIOC_REQBUFS: return videobuf_reqbufs(file, get_queue(fh), arg); diff --git a/linux/drivers/media/video/ir-kbd-gpio.c b/linux/drivers/media/video/ir-kbd-gpio.c index 550632d29..869ac05ed 100644 --- a/linux/drivers/media/video/ir-kbd-gpio.c +++ b/linux/drivers/media/video/ir-kbd-gpio.c @@ -279,14 +279,12 @@ static int ir_probe(struct device *dev) switch (sub->core->type) { case BTTV_AVERMEDIA: case BTTV_AVPHONE98: + case BTTV_AVERMEDIA98: ir_codes = ir_codes_avermedia; ir->mask_keycode = 0xf80000; ir->mask_keydown = 0x010000; break; - case BTTV_WINFAST2000: - ir_codes = winfast_codes; - ir->mask_keycode = 0x8f8; - break; + case BTTV_PXELVWPLTVPAK: ir_codes = ir_codes_pixelview; ir->mask_keycode = 0x003e00; @@ -300,9 +298,14 @@ static int ir_probe(struct device *dev) ir->mask_keyup = 0x008000; ir->polling = 50; // ms break; + + case BTTV_WINFAST2000: + ir_codes = winfast_codes; + ir->mask_keycode = 0x8f8; + break; case BTTV_MAGICTVIEW061: case BTTV_MAGICTVIEW063: - ir_codes = ir_codes_empty; + ir_codes = winfast_codes; ir->mask_keycode = 0x0008e000; ir->mask_keydown = 0x00200000; break; diff --git a/linux/drivers/media/video/saa7134/saa7134-core.c b/linux/drivers/media/video/saa7134/saa7134-core.c index a35839c5b..d1ee34e29 100644 --- a/linux/drivers/media/video/saa7134/saa7134-core.c +++ b/linux/drivers/media/video/saa7134/saa7134-core.c @@ -466,7 +466,7 @@ int saa7134_set_dmabits(struct saa7134_dev *dev) } /* audio capture -- dma 3 */ - if (dev->oss.recording) { + if (dev->oss.dma_running) { ctrl |= SAA7134_MAIN_CTRL_TE6; irq |= SAA7134_IRQ1_INTE_RA3_1 | SAA7134_IRQ1_INTE_RA3_0; diff --git a/linux/drivers/media/video/saa7134/saa7134-oss.c b/linux/drivers/media/video/saa7134/saa7134-oss.c index 398e62438..b9081e027 100644 --- a/linux/drivers/media/video/saa7134/saa7134-oss.c +++ b/linux/drivers/media/video/saa7134/saa7134-oss.c @@ -92,6 +92,20 @@ static int dsp_buffer_free(struct saa7134_dev *dev) return 0; } +static void dsp_dma_start(struct saa7134_dev *dev) +{ + dev->oss.dma_blk = 0; + dev->oss.dma_running = 1; + saa7134_set_dmabits(dev); +} + +static void dsp_dma_stop(struct saa7134_dev *dev) +{ + dev->oss.dma_blk = -1; + dev->oss.dma_running = 0; + saa7134_set_dmabits(dev); +} + static int dsp_rec_start(struct saa7134_dev *dev) { int err, bswap, sign; @@ -178,10 +192,9 @@ static int dsp_rec_start(struct saa7134_dev *dev) saa_writel(SAA7134_RS_CONTROL(6),control); /* start dma */ + dev->oss.recording_on = 1; spin_lock_irqsave(&dev->slock,flags); - dev->oss.recording = 1; - dev->oss.dma_blk = 0; - saa7134_set_dmabits(dev); + dsp_dma_start(dev); spin_unlock_irqrestore(&dev->slock,flags); return 0; @@ -199,10 +212,9 @@ static int dsp_rec_stop(struct saa7134_dev *dev) dprintk("rec_stop dma_blk=%d\n",dev->oss.dma_blk); /* stop dma */ + dev->oss.recording_on = 0; spin_lock_irqsave(&dev->slock,flags); - dev->oss.dma_blk = -1; - dev->oss.recording = 0; - saa7134_set_dmabits(dev); + dsp_dma_stop(dev); spin_unlock_irqrestore(&dev->slock,flags); /* unlock buffer */ @@ -259,7 +271,7 @@ static int dsp_release(struct inode *inode, struct file *file) struct saa7134_dev *dev = file->private_data; down(&dev->oss.lock); - if (dev->oss.recording) + if (dev->oss.recording_on) dsp_rec_stop(dev); dsp_buffer_free(dev); dev->oss.users_dsp--; @@ -274,6 +286,7 @@ static ssize_t dsp_read(struct file *file, char *buffer, struct saa7134_dev *dev = file->private_data; DECLARE_WAITQUEUE(wait, current); unsigned int bytes; + unsigned long flags; int err,ret = 0; add_wait_queue(&dev->oss.wq, &wait); @@ -281,7 +294,7 @@ static ssize_t dsp_read(struct file *file, char *buffer, while (count > 0) { /* wait for data if needed */ if (0 == dev->oss.read_count) { - if (!dev->oss.recording) { + if (!dev->oss.recording_on) { err = dsp_rec_start(dev); if (err < 0) { if (0 == ret) @@ -289,6 +302,13 @@ static ssize_t dsp_read(struct file *file, char *buffer, break; } } + if (dev->oss.recording_on && + !dev->oss.dma_running) { + /* recover from overruns */ + spin_lock_irqsave(&dev->slock,flags); + dsp_dma_start(dev); + spin_unlock_irqrestore(&dev->slock,flags); + } if (file->f_flags & O_NONBLOCK) { if (0 == ret) ret = -EAGAIN; @@ -365,7 +385,7 @@ static int dsp_ioctl(struct inode *inode, struct file *file, return -EFAULT; down(&dev->oss.lock); dev->oss.channels = val ? 2 : 1; - if (dev->oss.recording) { + if (dev->oss.recording_on) { dsp_rec_stop(dev); dsp_rec_start(dev); } @@ -379,7 +399,7 @@ static int dsp_ioctl(struct inode *inode, struct file *file, return -EINVAL; down(&dev->oss.lock); dev->oss.channels = val; - if (dev->oss.recording) { + if (dev->oss.recording_on) { dsp_rec_stop(dev); dsp_rec_start(dev); } @@ -408,7 +428,7 @@ static int dsp_ioctl(struct inode *inode, struct file *file, case AFMT_S16_BE: down(&dev->oss.lock); dev->oss.afmt = val; - if (dev->oss.recording) { + if (dev->oss.recording_on) { dsp_rec_stop(dev); dsp_rec_start(dev); } @@ -438,7 +458,7 @@ static int dsp_ioctl(struct inode *inode, struct file *file, case SNDCTL_DSP_RESET: down(&dev->oss.lock); - if (dev->oss.recording) + if (dev->oss.recording_on) dsp_rec_stop(dev); up(&dev->oss.lock); return 0; @@ -448,7 +468,7 @@ static int dsp_ioctl(struct inode *inode, struct file *file, case SNDCTL_DSP_SETFRAGMENT: if (get_user(val, (int*)arg)) return -EFAULT; - if (dev->oss.recording) + if (dev->oss.recording_on) return -EBUSY; dsp_buffer_free(dev); dsp_buffer_conf(dev,1 << (val & 0xffff), (arg >> 16) & 0xffff); @@ -484,7 +504,7 @@ static unsigned int dsp_poll(struct file *file, struct poll_table_struct *wait) if (0 == dev->oss.read_count) { down(&dev->oss.lock); - if (!dev->oss.recording) + if (!dev->oss.recording_on) dsp_rec_start(dev); up(&dev->oss.lock); } else @@ -800,7 +820,7 @@ void saa7134_irq_oss_done(struct saa7134_dev *dev, unsigned long status) if (dev->oss.read_count >= dev->oss.blksize * (dev->oss.blocks-2)) { dprintk("irq: overrun [full=%d/%d]\n",dev->oss.read_count, dev->oss.bufsize); - dsp_rec_stop(dev); + dsp_dma_stop(dev); goto done; } diff --git a/linux/drivers/media/video/saa7134/saa7134.h b/linux/drivers/media/video/saa7134/saa7134.h index df720a8f1..a0da01a82 100644 --- a/linux/drivers/media/video/saa7134/saa7134.h +++ b/linux/drivers/media/video/saa7134/saa7134.h @@ -329,7 +329,8 @@ struct saa7134_oss { unsigned int afmt; unsigned int rate; unsigned int channels; - unsigned int recording; + unsigned int recording_on; + unsigned int dma_running; unsigned int blocks; unsigned int blksize; unsigned int bufsize; diff --git a/linux/drivers/media/video/v4l1-compat.c b/linux/drivers/media/video/v4l1-compat.c index c2c2e91a5..ba27685b7 100644 --- a/linux/drivers/media/video/v4l1-compat.c +++ b/linux/drivers/media/video/v4l1-compat.c @@ -477,6 +477,7 @@ v4l_compat_translate_ioctl(struct inode *inode, fmt2 = kmalloc(sizeof(*fmt2),GFP_KERNEL); memset(fmt2,0,sizeof(*fmt2)); fmt2->type = V4L2_BUF_TYPE_VIDEO_CAPTURE; + drv(inode, file, VIDIOC_STREAMOFF, &fmt2->type); err1 = drv(inode, file, VIDIOC_G_FMT, fmt2); if (err1 < 0) dprintk("VIDIOCSWIN / VIDIOC_G_FMT: %d\n",err); diff --git a/linux/drivers/media/video/video-buf.c b/linux/drivers/media/video/video-buf.c index 433255bbc..bf132faef 100644 --- a/linux/drivers/media/video/video-buf.c +++ b/linux/drivers/media/video/video-buf.c @@ -33,6 +33,11 @@ #include <media/video-buf.h> #endif +#define MAGIC_DMABUF 0x19721112 +#define MAGIC_BUFFER 0x20040302 +#define MAGIC_CHECK(is,should) if (unlikely((is) != (should))) \ + { printk(KERN_ERR "magic mismatch: %x (expected %x)\n",is,should); BUG(); } + static int debug = 0; MODULE_DESCRIPTION("helper module to manage video4linux pci dma buffers"); @@ -175,7 +180,7 @@ int videobuf_dma_init_overlay(struct videobuf_dmabuf *dma, int direction, dma->direction = direction; if (0 == addr) return -EINVAL; - + dma->bus_addr = addr; dma->nr_pages = nr_pages; return 0; @@ -183,8 +188,8 @@ int videobuf_dma_init_overlay(struct videobuf_dmabuf *dma, int direction, int videobuf_dma_pci_map(struct pci_dev *dev, struct videobuf_dmabuf *dma) { - if (0 == dma->nr_pages) - BUG(); + MAGIC_CHECK(dma->magic,MAGIC_DMABUF); + BUG_ON(0 == dma->nr_pages); if (dma->pages) { dma->sglist = videobuf_pages_to_sg(dma->pages, dma->nr_pages, @@ -216,8 +221,8 @@ int videobuf_dma_pci_map(struct pci_dev *dev, struct videobuf_dmabuf *dma) int videobuf_dma_pci_sync(struct pci_dev *dev, struct videobuf_dmabuf *dma) { - if (!dma->sglen) - BUG(); + MAGIC_CHECK(dma->magic,MAGIC_DMABUF); + BUG_ON(!dma->sglen); if (!dma->bus_addr) pci_dma_sync_sg(dev,dma->sglist,dma->nr_pages,dma->direction); @@ -226,6 +231,7 @@ int videobuf_dma_pci_sync(struct pci_dev *dev, struct videobuf_dmabuf *dma) int videobuf_dma_pci_unmap(struct pci_dev *dev, struct videobuf_dmabuf *dma) { + MAGIC_CHECK(dma->magic,MAGIC_DMABUF); if (!dma->sglen) return 0; @@ -239,8 +245,8 @@ int videobuf_dma_pci_unmap(struct pci_dev *dev, struct videobuf_dmabuf *dma) int videobuf_dma_free(struct videobuf_dmabuf *dma) { - if (dma->sglen) - BUG(); + MAGIC_CHECK(dma->magic,MAGIC_DMABUF); + BUG_ON(dma->sglen); if (dma->pages) { int i; @@ -270,6 +276,8 @@ void* videobuf_alloc(unsigned int size) if (NULL != vb) { memset(vb,0,size); init_waitqueue_head(&vb->done); + vb->magic = MAGIC_BUFFER; + vb->dma.magic = MAGIC_DMABUF; } return vb; } @@ -279,6 +287,7 @@ int videobuf_waiton(struct videobuf_buffer *vb, int non_blocking, int intr) int retval = 0; DECLARE_WAITQUEUE(wait, current); + MAGIC_CHECK(vb->magic,MAGIC_BUFFER); add_wait_queue(&vb->done, &wait); while (vb->state == STATE_ACTIVE || vb->state == STATE_QUEUED) { if (non_blocking) { @@ -307,6 +316,7 @@ videobuf_iolock(struct pci_dev *pci, struct videobuf_buffer *vb, int err,pages; dma_addr_t bus; + MAGIC_CHECK(vb->magic,MAGIC_BUFFER); switch (vb->memory) { case V4L2_MEMORY_MMAP: case V4L2_MEMORY_USERPTR: @@ -458,6 +468,8 @@ void videobuf_status(struct v4l2_buffer *b, struct videobuf_buffer *vb, enum v4l2_buf_type type) { + MAGIC_CHECK(vb->magic,MAGIC_BUFFER); + b->index = vb->i; b->type = type; @@ -578,6 +590,7 @@ videobuf_qbuf(struct file *file, struct videobuf_queue *q, buf = q->bufs[b->index]; if (NULL == buf) goto done; + MAGIC_CHECK(buf->magic,MAGIC_BUFFER); if (buf->memory != b->memory) goto done; if (buf->state == STATE_QUEUED || diff --git a/linux/include/media/video-buf.h b/linux/include/media/video-buf.h index 507743a01..097b41a3d 100644 --- a/linux/include/media/video-buf.h +++ b/linux/include/media/video-buf.h @@ -59,6 +59,8 @@ struct scatterlist* videobuf_pages_to_sg(struct page **pages, int nr_pages, */ struct videobuf_dmabuf { + u32 magic; + /* for userland buffer */ int offset; struct page **pages; @@ -134,6 +136,7 @@ enum videobuf_state { struct videobuf_buffer { unsigned int i; + u32 magic; /* info about the buffer */ unsigned int width; diff --git a/v4l/scripts/saa7134.pl b/v4l/scripts/saa7134.pl index 789d1c851..0be247c80 100644 --- a/v4l/scripts/saa7134.pl +++ b/v4l/scripts/saa7134.pl @@ -4,6 +4,8 @@ use strict; my %map = ( "PCI_ANY_ID" => "0", "PCI_VENDOR_ID_PHILIPS" => "1131", + "PCI_VENDOR_ID_ASUSTEK" => "1043", + "PCI_VENDOR_ID_MATROX" => "102B", ); sub fix_id($) { diff --git a/v4l/scripts/update b/v4l/scripts/update index 5c41e552a..c7808f670 100644 --- a/v4l/scripts/update +++ b/v4l/scripts/update @@ -27,6 +27,10 @@ xrmmod cx88xx # saa7134 xrmmod saa7134 +# saa7146 +xrmmod dvb_ttpci +xrmmod saa7146_vv + # common xrmmod btcx-risc xrmmod ir-common @@ -44,7 +48,7 @@ xrmmod tda9887 # common v4l2basic xinsmod video-buf debug=2 -xinsmod btcx-risc debug=1 +xinsmod btcx-risc debug=0 xinsmod ir-common debug=0 repeat=0 xinsmod tuner debug=0 xinsmod msp3400 debug=0 |