]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
V4L/DVB (10730): v4l-dvb: cleanup obsolete references to v4l1 headers.
authorHans Verkuil <hverkuil@xs4all.nl>
Thu, 19 Feb 2009 20:31:17 +0000 (17:31 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Mon, 30 Mar 2009 15:42:59 +0000 (12:42 -0300)
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
[mchehab@redhat.com: fix compilation of tea575x-tuner.c]
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
17 files changed:
drivers/media/common/tuners/mt20xx.c
drivers/media/common/tuners/tda8290.c
drivers/media/common/tuners/tea5761.c
drivers/media/common/tuners/tea5767.c
drivers/media/video/ks0127.h
drivers/media/video/saa6588.c
drivers/media/video/tvaudio.c
drivers/media/video/zoran/videocodec.h
drivers/media/video/zoran/zoran.h
drivers/media/video/zoran/zoran_card.c
drivers/media/video/zoran/zoran_device.c
drivers/media/video/zoran/zoran_device.h
drivers/media/video/zoran/zoran_driver.c
drivers/media/video/zoran/zoran_procfs.c
drivers/media/video/zoran/zr36016.c
drivers/media/video/zoran/zr36050.c
drivers/media/video/zoran/zr36060.c

index 35b763a16d53748abc5aca07905f70981f576267..44608ad4e2d205132e2b9f86cfc62beaddd67fd4 100644 (file)
@@ -6,7 +6,7 @@
  */
 #include <linux/delay.h>
 #include <linux/i2c.h>
-#include <linux/videodev.h>
+#include <linux/videodev2.h>
 #include "tuner-i2c.h"
 #include "mt20xx.h"
 
index 39697fa5925685e3c2fe545bf463b0d6028c55f2..a88e67632c528608acbe7bca59d30293dfbdf297 100644 (file)
@@ -22,7 +22,7 @@
 
 #include <linux/i2c.h>
 #include <linux/delay.h>
-#include <linux/videodev.h>
+#include <linux/videodev2.h>
 #include "tuner-i2c.h"
 #include "tda8290.h"
 #include "tda827x.h"
index b23dadeecd0528ad74d55405948562981b24c234..60ed872f3d44681c4e85656dcf38b10fbd77105c 100644 (file)
@@ -9,7 +9,7 @@
 
 #include <linux/i2c.h>
 #include <linux/delay.h>
-#include <linux/videodev.h>
+#include <linux/videodev2.h>
 #include <media/tuner.h>
 #include "tuner-i2c.h"
 #include "tea5761.h"
index 1f5646334a8ffad1cffeb6183f796abb6c65f711..223a226d20a19e6b137a6316913fca8de46fd5c8 100644 (file)
@@ -12,7 +12,7 @@
 
 #include <linux/i2c.h>
 #include <linux/delay.h>
-#include <linux/videodev.h>
+#include <linux/videodev2.h>
 #include "tuner-i2c.h"
 #include "tea5767.h"
 
index 1ec578833aeacc4044e9e90ab873eb8ecf12cbcc..cb8abd5403b341f12a1243a6e39286a75a2a5d55 100644 (file)
@@ -24,8 +24,6 @@
 #ifndef KS0127_H
 #define KS0127_H
 
-#include <linux/videodev.h>
-
 /* input channels */
 #define KS_INPUT_COMPOSITE_1    0
 #define KS_INPUT_COMPOSITE_2    1
index 258b7b2a1e997fdc1c4660bedcc3ac53da5177b4..0067b281d503284c4079a36a704bbe0d329024d5 100644 (file)
@@ -23,7 +23,7 @@
 #include <linux/kernel.h>
 #include <linux/i2c.h>
 #include <linux/types.h>
-#include <linux/videodev.h>
+#include <linux/videodev2.h>
 #include <linux/init.h>
 #include <linux/errno.h>
 #include <linux/slab.h>
index 0eb3b1694287613f799ad0ae1ffb02f27650f554..e8ab28532d94c6b3ef4beb8b0522a411f413f40d 100644 (file)
@@ -26,7 +26,7 @@
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/slab.h>
-#include <linux/videodev.h>
+#include <linux/videodev2.h>
 #include <linux/i2c.h>
 #include <linux/init.h>
 #include <linux/kthread.h>
index 97a3bbeda5056acfa1a9fed0f05b836d6ce08269..5c27b251354e5019bc1dff232d2e9f087ba2932c 100644 (file)
@@ -97,7 +97,7 @@
               available) - it returns 0 if the mode is possible
    set_size -> this fn-ref. sets the norm and image size for
               compression/decompression (returns 0 on success)
-              the norm param is defined in videodev.h (VIDEO_MODE_*)
+              the norm param is defined in videodev2.h (V4L2_STD_*)
 
    additional setup may be available, too - but the codec should work with
    some default values even without this
@@ -144,9 +144,8 @@ M                       zr36055[1] 0001 0000c001 00000000 (zr36050[1])
 #ifndef __LINUX_VIDEOCODEC_H
 #define __LINUX_VIDEOCODEC_H
 
-#include <linux/videodev.h>
+#include <linux/videodev2.h>
 
-//should be in videodev.h ??? (VID_DO_....)
 #define CODEC_DO_COMPRESSION 0
 #define CODEC_DO_EXPANSION   1
 
@@ -237,10 +236,6 @@ struct vfe_settings {
        __u32 width, height;    /* Area to capture */
        __u16 decimation;       /* Decimation divider */
        __u16 flags;            /* Flags for capture */
-/* flags are the same as in struct video_capture - see videodev.h:
-#define VIDEO_CAPTURE_ODD              0
-#define VIDEO_CAPTURE_EVEN             1
-*/
        __u16 quality;          /* quality of the video */
 };
 
index ab1ced26276d976bf0dbd19a348221b28436ebb8..8beada9613f60619faea7434407cec67e2b3e02d 100644 (file)
@@ -408,7 +408,13 @@ struct zoran {
        /* Video for Linux parameters */
        int input;      /* card's norm and input - norm=VIDEO_MODE_* */
        v4l2_std_id norm;
-       struct video_buffer buffer;     /* Current buffer params */
+
+       /* Current buffer params */
+       void    *vbuf_base;
+       int     vbuf_height, vbuf_width;
+       int     vbuf_depth;
+       int     vbuf_bytesperline;
+
        struct zoran_overlay_settings overlay_settings;
        u32 *overlay_mask;      /* overlay mask */
        enum zoran_lock_activity overlay_active;        /* feature currently in use? */
index 0b64612e35b935cb8e174a9840fabdf3da394106..665a5e370a84a30d283b563729ed1dfae04e1e14 100644 (file)
@@ -38,7 +38,7 @@
 #include <linux/proc_fs.h>
 #include <linux/i2c.h>
 #include <linux/i2c-algo-bit.h>
-#include <linux/videodev.h>
+#include <linux/videodev2.h>
 #include <media/v4l2-common.h>
 #include <linux/spinlock.h>
 #include <linux/sem.h>
@@ -47,8 +47,6 @@
 
 #include <linux/pci.h>
 #include <linux/interrupt.h>
-#include <linux/video_decoder.h>
-#include <linux/video_encoder.h>
 #include <linux/mutex.h>
 
 #include <asm/io.h>
@@ -108,23 +106,6 @@ static int video_nr[BUZ_MAX] = { [0 ... (BUZ_MAX-1)] = -1 };
 module_param_array(video_nr, int, NULL, 0444);
 MODULE_PARM_DESC(video_nr, "Video device number (-1=Auto)");
 
-/*
-   Number and size of grab buffers for Video 4 Linux
-   The vast majority of applications should not need more than 2,
-   the very popular BTTV driver actually does ONLY have 2.
-   Time sensitive applications might need more, the maximum
-   is VIDEO_MAX_FRAME (defined in <linux/videodev.h>).
-
-   The size is set so that the maximum possible request
-   can be satisfied. Decrease  it, if bigphys_area alloc'd
-   memory is low. If you don't have the bigphys_area patch,
-   set it to 128 KB. Will you allow only to grab small
-   images with V4L, but that's better than nothing.
-
-   v4l_bufsize has to be given in KB !
-
-*/
-
 int v4l_nbufs = 4;
 int v4l_bufsize = 810;         /* Everybody should be able to work with this setting */
 module_param(v4l_nbufs, int, 0644);
@@ -1036,20 +1017,19 @@ zr36057_init (struct zoran *zr)
        zr->jpg_buffers.allocated = 0;
        zr->v4l_buffers.allocated = 0;
 
-       zr->buffer.base = (void *) vidmem;
-       zr->buffer.width = 0;
-       zr->buffer.height = 0;
-       zr->buffer.depth = 0;
-       zr->buffer.bytesperline = 0;
+       zr->vbuf_base = (void *) vidmem;
+       zr->vbuf_width = 0;
+       zr->vbuf_height = 0;
+       zr->vbuf_depth = 0;
+       zr->vbuf_bytesperline = 0;
 
        /* Avoid nonsense settings from user for default input/norm */
-       if (default_norm < VIDEO_MODE_PAL &&
-           default_norm > VIDEO_MODE_SECAM)
-               default_norm = VIDEO_MODE_PAL;
-       if (default_norm == VIDEO_MODE_PAL) {
+       if (default_norm < 0 && default_norm > 2)
+               default_norm = 0;
+       if (default_norm == 0) {
                zr->norm = V4L2_STD_PAL;
                zr->timing = zr->card.tvn[0];
-       } else if (default_norm == VIDEO_MODE_NTSC) {
+       } else if (default_norm == 1) {
                zr->norm = V4L2_STD_NTSC;
                zr->timing = zr->card.tvn[1];
        } else {
@@ -1547,9 +1527,6 @@ static int __init zoran_init(void)
                        ZORAN_NAME, vidmem);
        }
 
-       /* random nonsense */
-       dprintk(6, KERN_DEBUG "Jotti is een held!\n");
-
        /* some mainboards might not do PCI-PCI data transfer well */
        if (pci_pci_problems & (PCIPCI_FAIL|PCIAGP_FAIL|PCIPCI_ALIMAGIK)) {
                dprintk(1,
index 3336611c0cdf46d19560e6ea110d4b4f828fae46..49e91b2ed552c71cfad4b901d03091c765b6593b 100644 (file)
@@ -488,11 +488,11 @@ zr36057_overlay (struct zoran *zr,
                 * All error messages are internal driver checking only! */
 
                /* video display top and bottom registers */
-               reg = (long) zr->buffer.base +
+               reg = (long) zr->vbuf_base +
                    zr->overlay_settings.x *
                    ((zr->overlay_settings.format->depth + 7) / 8) +
                    zr->overlay_settings.y *
-                   zr->buffer.bytesperline;
+                   zr->vbuf_bytesperline;
                btwrite(reg, ZR36057_VDTR);
                if (reg & 3)
                        dprintk(1,
@@ -500,15 +500,15 @@ zr36057_overlay (struct zoran *zr,
                                "%s: zr36057_overlay() - video_address not aligned\n",
                                ZR_DEVNAME(zr));
                if (zr->overlay_settings.height > BUZ_MAX_HEIGHT / 2)
-                       reg += zr->buffer.bytesperline;
+                       reg += zr->vbuf_bytesperline;
                btwrite(reg, ZR36057_VDBR);
 
                /* video stride, status, and frame grab register */
-               reg = zr->buffer.bytesperline -
+               reg = zr->vbuf_bytesperline -
                    zr->overlay_settings.width *
                    ((zr->overlay_settings.format->depth + 7) / 8);
                if (zr->overlay_settings.height > BUZ_MAX_HEIGHT / 2)
-                       reg += zr->buffer.bytesperline;
+                       reg += zr->vbuf_bytesperline;
                if (reg & 3)
                        dprintk(1,
                                KERN_ERR
@@ -537,7 +537,7 @@ zr36057_overlay (struct zoran *zr,
 
 void
 write_overlay_mask (struct file       *file,
-                   struct video_clip *vp,
+                   struct v4l2_clip *vp,
                    int                count)
 {
        struct zoran_fh *fh = file->private_data;
@@ -554,10 +554,10 @@ write_overlay_mask (struct file       *file,
 
        for (i = 0; i < count; ++i) {
                /* pick up local copy of clip */
-               x = vp[i].x;
-               y = vp[i].y;
-               width = vp[i].width;
-               height = vp[i].height;
+               x = vp[i].c.left;
+               y = vp[i].c.top;
+               width = vp[i].c.width;
+               height = vp[i].c.height;
 
                /* trim clips that extend beyond the window */
                if (x < 0) {
index 14d4e7aa6cea42a183c3cfddbd7a27394607a683..3520bd54c8bdc37b88c32710f4396400fcaa9e9f 100644 (file)
@@ -55,7 +55,7 @@ extern int jpeg_codec_reset(struct zoran *zr);
 extern void zr36057_overlay(struct zoran *zr,
                            int on);
 extern void write_overlay_mask(struct file *file,
-                              struct video_clip *vp,
+                              struct v4l2_clip *vp,
                               int count);
 extern void zr36057_set_memgrab(struct zoran *zr,
                                int mode);
index b027a68e8c678dd1ab816ffc2a7e4f9e19ad3210..c6da45b4164328e349ebcb6371d05387b5959e02 100644 (file)
@@ -59,7 +59,7 @@
 
 #include <linux/spinlock.h>
 
-#include <linux/videodev.h>
+#include <linux/videodev2.h>
 #include <media/v4l2-common.h>
 #include <media/v4l2-ioctl.h>
 #include "videocodec.h"
@@ -69,8 +69,6 @@
 #include <asm/uaccess.h>
 #include <linux/proc_fs.h>
 
-#include <linux/video_decoder.h>
-#include <linux/video_encoder.h>
 #include <linux/mutex.h>
 #include "zoran.h"
 #include "zoran_device.h"
@@ -1170,12 +1168,12 @@ setup_fbuffer (struct file               *file,
                return -EINVAL;
        }
 
-       zr->buffer.base = (void *) ((unsigned long) base & ~3);
-       zr->buffer.height = height;
-       zr->buffer.width = width;
-       zr->buffer.depth = fmt->depth;
+       zr->vbuf_base = (void *) ((unsigned long) base & ~3);
+       zr->vbuf_height = height;
+       zr->vbuf_width = width;
+       zr->vbuf_depth = fmt->depth;
        zr->overlay_settings.format = fmt;
-       zr->buffer.bytesperline = bytesperline;
+       zr->vbuf_bytesperline = bytesperline;
 
        /* The user should set new window parameters */
        zr->overlay_settings.is_set = 0;
@@ -1190,17 +1188,17 @@ setup_window (struct file       *file,
              int                y,
              int                width,
              int                height,
-             struct video_clip __user *clips,
+             struct v4l2_clip __user *clips,
              int                clipcount,
              void              __user *bitmap)
 {
        struct zoran_fh *fh = file->private_data;
        struct zoran *zr = fh->zr;
-       struct video_clip *vcp = NULL;
+       struct v4l2_clip *vcp = NULL;
        int on, end;
 
 
-       if (!zr->buffer.base) {
+       if (!zr->vbuf_base) {
                dprintk(1,
                        KERN_ERR
                        "%s: setup_window() - frame buffer has to be set first\n",
@@ -1220,13 +1218,13 @@ setup_window (struct file       *file,
         * The video front end needs 4-byte alinged line sizes, we correct that
         * silently here if necessary
         */
-       if (zr->buffer.depth == 15 || zr->buffer.depth == 16) {
+       if (zr->vbuf_depth == 15 || zr->vbuf_depth == 16) {
                end = (x + width) & ~1; /* round down */
                x = (x + 1) & ~1;       /* round up */
                width = end - x;
        }
 
-       if (zr->buffer.depth == 24) {
+       if (zr->vbuf_depth == 24) {
                end = (x + width) & ~3; /* round down */
                x = (x + 3) & ~3;       /* round up */
                width = end - x;
@@ -1281,7 +1279,7 @@ setup_window (struct file       *file,
                }
        } else if (clipcount > 0) {
                /* write our own bitmap from the clips */
-               vcp = vmalloc(sizeof(struct video_clip) * (clipcount + 4));
+               vcp = vmalloc(sizeof(struct v4l2_clip) * (clipcount + 4));
                if (vcp == NULL) {
                        dprintk(1,
                                KERN_ERR
@@ -1290,7 +1288,7 @@ setup_window (struct file       *file,
                        return -ENOMEM;
                }
                if (copy_from_user
-                   (vcp, clips, sizeof(struct video_clip) * clipcount)) {
+                   (vcp, clips, sizeof(struct v4l2_clip) * clipcount)) {
                        vfree(vcp);
                        return -EFAULT;
                }
@@ -1349,7 +1347,7 @@ setup_overlay (struct file *file,
                        zr36057_overlay(zr, 0);
                zr->overlay_mask = NULL;
        } else {
-               if (!zr->buffer.base || !fh->overlay_settings.is_set) {
+               if (!zr->vbuf_base || !fh->overlay_settings.is_set) {
                        dprintk(1,
                                KERN_ERR
                                "%s: setup_overlay() - buffer or window not set\n",
@@ -2200,7 +2198,7 @@ static int zoran_s_fmt_vid_overlay(struct file *file, void *__fh,
                        fmt->fmt.win.w.top,
                        fmt->fmt.win.w.width,
                        fmt->fmt.win.w.height,
-                       (struct video_clip __user *)
+                       (struct v4l2_clip __user *)
                        fmt->fmt.win.clips,
                        fmt->fmt.win.clipcount,
                        fmt->fmt.win.bitmap);
@@ -2357,12 +2355,12 @@ static int zoran_g_fbuf(struct file *file, void *__fh,
 
        memset(fb, 0, sizeof(*fb));
        mutex_lock(&zr->resource_lock);
-       fb->base = zr->buffer.base;
-       fb->fmt.width = zr->buffer.width;
-       fb->fmt.height = zr->buffer.height;
+       fb->base = zr->vbuf_base;
+       fb->fmt.width = zr->vbuf_width;
+       fb->fmt.height = zr->vbuf_height;
        if (zr->overlay_settings.format)
                fb->fmt.pixelformat = fh->overlay_settings.format->fourcc;
-       fb->fmt.bytesperline = zr->buffer.bytesperline;
+       fb->fmt.bytesperline = zr->vbuf_bytesperline;
        mutex_unlock(&zr->resource_lock);
        fb->fmt.colorspace = V4L2_COLORSPACE_SRGB;
        fb->fmt.field = V4L2_FIELD_INTERLACED;
index 870bc5a70e3fdf7fb41f12b5142bba4c050722c4..f1423b777db16e6447863cf1851ef892b9f09b95 100644 (file)
@@ -36,7 +36,7 @@
 #include <linux/pci.h>
 #include <linux/i2c.h>
 #include <linux/i2c-algo-bit.h>
-#include <linux/videodev.h>
+#include <linux/videodev2.h>
 #include <linux/spinlock.h>
 #include <linux/sem.h>
 #include <linux/seq_file.h>
index 00d132bcd1e4fecb64860d9d165a61eedc547b29..21c088ea9046349d2cabb5d58355b01c9f85927f 100644 (file)
 #include <linux/types.h>
 #include <linux/wait.h>
 
-/* includes for structures and defines regarding video
-   #include<linux/videodev.h> */
-
 /* I/O commands, error codes */
 #include <asm/io.h>
-//#include<errno.h>
 
 /* v4l  API */
-#include <linux/videodev.h>
 
 /* headerfile of this module */
 #include"zr36016.h"
index cf8b271a1c8f1907e3885773ba5dad02d67f07cf..639dd87c663f01a6af22d62bb9a3d8ef960fc68e 100644 (file)
 #include <linux/types.h>
 #include <linux/wait.h>
 
-/* includes for structures and defines regarding video
-   #include<linux/videodev.h> */
-
 /* I/O commands, error codes */
 #include <asm/io.h>
-//#include<errno.h>
 
 /* headerfile of this module */
 #include "zr36050.h"
index 8e74054d5ef10ea0615fbf927f3e17b06c04a81e..008746ff7746a45f55856321bb2a24e2cdc375cc 100644 (file)
 #include <linux/types.h>
 #include <linux/wait.h>
 
-/* includes for structures and defines regarding video
-   #include<linux/videodev.h> */
-
 /* I/O commands, error codes */
 #include <asm/io.h>
-//#include<errno.h>
 
 /* headerfile of this module */
 #include "zr36060.h"