]> err.no Git - linux-2.6/blobdiff - drivers/media/video/bttvp.h
V4L/DVB (3354e): bttv semaphore to mutex conversion
[linux-2.6] / drivers / media / video / bttvp.h
index e0e7c7a84bc53015d1c4064d48b323aea570a691..9cb72f176f7da705e1f82d85e3e40fff912c9bf6 100644 (file)
@@ -35,6 +35,7 @@
 #include <linux/videodev.h>
 #include <linux/pci.h>
 #include <linux/input.h>
+#include <linux/mutex.h>
 #include <asm/scatterlist.h>
 #include <asm/io.h>
 
@@ -45,6 +46,7 @@
 #include <media/tveeprom.h>
 #include <media/ir-common.h>
 
+
 #include "bt848.h"
 #include "bttv.h"
 #include "btcx-risc.h"
 
 #define UNSET (-1U)
 
+#define clamp(x, low, high) min (max (low, x), high)
+
 /* ---------------------------------------------------------- */
 
 struct bttv_tvnorm {
        int   v4l2_id;
        char  *name;
-        u32   Fsc;
-        u16   swidth, sheight; /* scaled standard width, height */
+       u32   Fsc;
+       u16   swidth, sheight; /* scaled standard width, height */
        u16   totalwidth;
        u8    adelay, bdelay, iform;
        u32   scaledtwidth;
        u16   hdelayx1, hactivex1;
        u16   vdelay;
-        u8    vbipack;
+       u8    vbipack;
        u16   vtotal;
        int   sram;
+       /* ITU-R frame line number of the first VBI line we can
+          capture, of the first and second field. */
+       u16   vbistart[2];
 };
 extern const struct bttv_tvnorm bttv_tvnorms[];
 
@@ -267,12 +274,14 @@ struct bttv {
 
        /* card configuration info */
        unsigned int cardid;   /* pci subsystem id (bt878 based ones) */
-        unsigned int tuner_type;  /* tuner chip type */
-        unsigned int pinnacle_id;
+       unsigned int tuner_type;  /* tuner chip type */
+       unsigned int tda9887_conf;
        unsigned int svhs;
        struct bttv_pll_info pll;
        int triton1;
        int gpioirq;
+       int (*custom_irq)(struct bttv *btv);
+
        int use_i2c_hw;
 
        /* old gpio interface */
@@ -297,13 +306,13 @@ struct bttv {
 
        /* infrared remote */
        int has_remote;
-       struct bttv_input *remote;
+       struct bttv_ir *remote;
 
        /* locking */
        spinlock_t s_lock;
-        struct semaphore lock;
+       struct mutex lock;
        int resources;
-        struct semaphore reslock;
+       struct mutex reslock;
 #ifdef VIDIOC_G_PRIORITY
        struct v4l2_prio_state prio;
 #endif