fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git] / drivers / media / video / cx88 / cx88-vbi.c
index 672d1b4..aa2a697 100644 (file)
@@ -1,8 +1,8 @@
 /*
- * $Id: cx88-vbi.c,v 1.14 2004/11/07 13:17:15 kraxel Exp $
  */
 #include <linux/kernel.h>
 #include <linux/module.h>
+#include <linux/moduleparam.h>
 #include <linux/init.h>
 #include <linux/slab.h>
 
@@ -34,8 +34,8 @@ void cx8800_vbi_fmt(struct cx8800_dev *dev, struct v4l2_format *f)
        if (dev->core->tvnorm->id & V4L2_STD_525_60) {
                /* ntsc */
                f->fmt.vbi.sampling_rate = 28636363;
-               f->fmt.vbi.start[0] = 10 -1;
-               f->fmt.vbi.start[1] = 273 -1;
+               f->fmt.vbi.start[0] = 10;
+               f->fmt.vbi.start[1] = 273;
 
        } else if (dev->core->tvnorm->id & V4L2_STD_625_50) {
                /* pal */
@@ -45,7 +45,7 @@ void cx8800_vbi_fmt(struct cx8800_dev *dev, struct v4l2_format *f)
        }
 }
 
-int cx8800_start_vbi_dma(struct cx8800_dev    *dev,
+static int cx8800_start_vbi_dma(struct cx8800_dev    *dev,
                         struct cx88_dmaqueue *q,
                         struct cx88_buffer   *buf)
 {
@@ -64,7 +64,7 @@ int cx8800_start_vbi_dma(struct cx8800_dev    *dev,
        q->count = 1;
 
        /* enable irqs */
-       cx_set(MO_PCI_INTMSK, 0x00fc01);
+       cx_set(MO_PCI_INTMSK, core->pci_irqmask | 0x01);
        cx_set(MO_VID_INTMSK, 0x0f0088);
 
        /* enable capture */
@@ -175,7 +175,7 @@ vbi_prepare(struct videobuf_queue *q, struct videobuf_buffer *vb,
                buf->vb.size   = size;
                buf->vb.field  = V4L2_FIELD_SEQ_TB;
 
-               if (0 != (rc = videobuf_iolock(dev->pci,&buf->vb,NULL)))
+               if (0 != (rc = videobuf_iolock(q,&buf->vb,NULL)))
                        goto fail;
                cx88_risc_buffer(dev->pci, &buf->risc,
                                 buf->vb.dma.sglist,
@@ -187,7 +187,7 @@ vbi_prepare(struct videobuf_queue *q, struct videobuf_buffer *vb,
        return 0;
 
  fail:
-       cx88_free_buffer(dev->pci,buf);
+       cx88_free_buffer(q,buf);
        return rc;
 }
 
@@ -227,9 +227,8 @@ vbi_queue(struct videobuf_queue *vq, struct videobuf_buffer *vb)
 static void vbi_release(struct videobuf_queue *q, struct videobuf_buffer *vb)
 {
        struct cx88_buffer *buf = container_of(vb,struct cx88_buffer,vb);
-       struct cx8800_fh   *fh  = q->priv_data;
 
-       cx88_free_buffer(fh->dev->pci,buf);
+       cx88_free_buffer(q,buf);
 }
 
 struct videobuf_queue_ops cx8800_vbi_qops = {