The patch number 10730 was added via Hans Verkuil <[email protected]>
to http://linuxtv.org/hg/v4l-dvb master development tree.
Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel
If anyone has any objections, please let us know by sending a message to:
Linux Media Mailing List <[email protected]>
------
From: Hans Verkuil <[email protected]>
v4l-dvb: cleanup obsolete references to v4l1 headers.
Priority: normal
Signed-off-by: Hans Verkuil <[email protected]>
---
linux/drivers/media/common/tuners/mt20xx.c | 2
linux/drivers/media/common/tuners/tda8290.c | 2
linux/drivers/media/common/tuners/tea5761.c | 2
linux/drivers/media/common/tuners/tea5767.c | 2
linux/drivers/media/video/ks0127.h | 2
linux/drivers/media/video/saa6588.c | 2
linux/drivers/media/video/tvaudio.c | 2
linux/drivers/media/video/tvmixer.c | 2
linux/drivers/media/video/zoran/videocodec.h | 11 +---
linux/drivers/media/video/zoran/zoran.h | 8 ++-
linux/drivers/media/video/zoran/zoran_card.c | 43 +++--------------
linux/drivers/media/video/zoran/zoran_device.c | 20 +++----
linux/drivers/media/video/zoran/zoran_device.h | 2
linux/drivers/media/video/zoran/zoran_driver.c | 40 +++++++--------
linux/drivers/media/video/zoran/zoran_procfs.c | 2
linux/drivers/media/video/zoran/zr36016.c | 5 -
linux/drivers/media/video/zoran/zr36050.c | 4 -
linux/drivers/media/video/zoran/zr36060.c | 4 -
linux/include/sound/tea575x-tuner.h | 2
19 files changed, 59 insertions(+), 98 deletions(-)
diff -r a5c93b7614e4 -r 6c37a40e3d05 linux/drivers/media/common/tuners/mt20xx.c
--- a/linux/drivers/media/common/tuners/mt20xx.c Thu Feb 19 20:18:23
2009 +0100
+++ b/linux/drivers/media/common/tuners/mt20xx.c Thu Feb 19 21:31:17
2009 +0100
@@ -7,7 +7,7 @@
#include <linux/delay.h>
#include <linux/i2c.h>
#include "compat.h"
-#include <linux/videodev.h>
+#include <linux/videodev2.h>
#include "tuner-i2c.h"
#include "mt20xx.h"
diff -r a5c93b7614e4 -r 6c37a40e3d05 linux/drivers/media/common/tuners/tda8290.c
--- a/linux/drivers/media/common/tuners/tda8290.c Thu Feb 19 20:18:23
2009 +0100
+++ b/linux/drivers/media/common/tuners/tda8290.c Thu Feb 19 21:31:17
2009 +0100
@@ -23,7 +23,7 @@
#include <linux/i2c.h>
#include <linux/delay.h>
#include "compat.h"
-#include <linux/videodev.h>
+#include <linux/videodev2.h>
#include "tuner-i2c.h"
#include "tda8290.h"
#include "tda827x.h"
diff -r a5c93b7614e4 -r 6c37a40e3d05 linux/drivers/media/common/tuners/tea5761.c
--- a/linux/drivers/media/common/tuners/tea5761.c Thu Feb 19 20:18:23
2009 +0100
+++ b/linux/drivers/media/common/tuners/tea5761.c Thu Feb 19 21:31:17
2009 +0100
@@ -10,7 +10,7 @@
#include <linux/i2c.h>
#include <linux/delay.h>
#include "compat.h"
-#include <linux/videodev.h>
+#include <linux/videodev2.h>
#include <media/tuner.h>
#include "tuner-i2c.h"
#include "tea5761.h"
diff -r a5c93b7614e4 -r 6c37a40e3d05 linux/drivers/media/common/tuners/tea5767.c
--- a/linux/drivers/media/common/tuners/tea5767.c Thu Feb 19 20:18:23
2009 +0100
+++ b/linux/drivers/media/common/tuners/tea5767.c Thu Feb 19 21:31:17
2009 +0100
@@ -13,7 +13,7 @@
#include <linux/i2c.h>
#include <linux/delay.h>
#include "compat.h"
-#include <linux/videodev.h>
+#include <linux/videodev2.h>
#include "tuner-i2c.h"
#include "tea5767.h"
diff -r a5c93b7614e4 -r 6c37a40e3d05 linux/drivers/media/video/ks0127.h
--- a/linux/drivers/media/video/ks0127.h Thu Feb 19 20:18:23 2009 +0100
+++ b/linux/drivers/media/video/ks0127.h Thu Feb 19 21:31:17 2009 +0100
@@ -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
diff -r a5c93b7614e4 -r 6c37a40e3d05 linux/drivers/media/video/saa6588.c
--- a/linux/drivers/media/video/saa6588.c Thu Feb 19 20:18:23 2009 +0100
+++ b/linux/drivers/media/video/saa6588.c Thu Feb 19 21:31:17 2009 +0100
@@ -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>
diff -r a5c93b7614e4 -r 6c37a40e3d05 linux/drivers/media/video/tvaudio.c
--- a/linux/drivers/media/video/tvaudio.c Thu Feb 19 20:18:23 2009 +0100
+++ b/linux/drivers/media/video/tvaudio.c Thu Feb 19 21:31:17 2009 +0100
@@ -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>
diff -r a5c93b7614e4 -r 6c37a40e3d05 linux/drivers/media/video/tvmixer.c
--- a/linux/drivers/media/video/tvmixer.c Thu Feb 19 20:18:23 2009 +0100
+++ b/linux/drivers/media/video/tvmixer.c Thu Feb 19 21:31:17 2009 +0100
@@ -11,7 +11,7 @@
#include <linux/i2c.h>
#include <linux/smp_lock.h>
#include "compat.h"
-#include <linux/videodev.h>
+#include <linux/videodev2.h>
#include <linux/init.h>
#include <linux/kdev_t.h>
#include <linux/sound.h>
diff -r a5c93b7614e4 -r 6c37a40e3d05
linux/drivers/media/video/zoran/videocodec.h
--- a/linux/drivers/media/video/zoran/videocodec.h Thu Feb 19 20:18:23
2009 +0100
+++ b/linux/drivers/media/video/zoran/videocodec.h Thu Feb 19 21:31:17
2009 +0100
@@ -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
@@ -145,9 +145,8 @@ M zr36055[1] 0001
#define __LINUX_VIDEOCODEC_H
#include "compat.h"
-#include <linux/videodev.h>
-
-//should be in videodev.h ??? (VID_DO_....)
+#include <linux/videodev2.h>
+
#define CODEC_DO_COMPRESSION 0
#define CODEC_DO_EXPANSION 1
@@ -238,10 +237,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 */
};
diff -r a5c93b7614e4 -r 6c37a40e3d05 linux/drivers/media/video/zoran/zoran.h
--- a/linux/drivers/media/video/zoran/zoran.h Thu Feb 19 20:18:23 2009 +0100
+++ b/linux/drivers/media/video/zoran/zoran.h Thu Feb 19 21:31:17 2009 +0100
@@ -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? */
diff -r a5c93b7614e4 -r 6c37a40e3d05
linux/drivers/media/video/zoran/zoran_card.c
--- a/linux/drivers/media/video/zoran/zoran_card.c Thu Feb 19 20:18:23
2009 +0100
+++ b/linux/drivers/media/video/zoran/zoran_card.c Thu Feb 19 21:31:17
2009 +0100
@@ -39,7 +39,7 @@
#include <linux/i2c.h>
#include <linux/i2c-algo-bit.h>
#include "compat.h"
-#include <linux/videodev.h>
+#include <linux/videodev2.h>
#include <media/v4l2-common.h>
#include <linux/spinlock.h>
#include <linux/sem.h>
@@ -48,8 +48,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 ...
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 */
@@ -1037,20 +1018,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 {
@@ -1548,9 +1528,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,
diff -r a5c93b7614e4 -r 6c37a40e3d05
linux/drivers/media/video/zoran/zoran_device.c
--- a/linux/drivers/media/video/zoran/zoran_device.c Thu Feb 19 20:18:23
2009 +0100
+++ b/linux/drivers/media/video/zoran/zoran_device.c Thu Feb 19 21:31:17
2009 +0100
@@ -489,11 +489,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,
@@ -501,15 +501,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
@@ -538,7 +538,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;
@@ -555,10 +555,10 @@ write_overlay_mask (struct file *f
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) {
diff -r a5c93b7614e4 -r 6c37a40e3d05
linux/drivers/media/video/zoran/zoran_device.h
--- a/linux/drivers/media/video/zoran/zoran_device.h Thu Feb 19 20:18:23
2009 +0100
+++ b/linux/drivers/media/video/zoran/zoran_device.h Thu Feb 19 21:31:17
2009 +0100
@@ -55,7 +55,7 @@ extern void zr36057_overlay(struct zoran
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);
diff -r a5c93b7614e4 -r 6c37a40e3d05
linux/drivers/media/video/zoran/zoran_driver.c
--- a/linux/drivers/media/video/zoran/zoran_driver.c Thu Feb 19 20:18:23
2009 +0100
+++ b/linux/drivers/media/video/zoran/zoran_driver.c Thu Feb 19 21:31:17
2009 +0100
@@ -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 "compat.h"
#include <linux/mutex.h>
#include "zoran.h"
@@ -1171,12 +1169,12 @@ setup_fbuffer (struct 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;
@@ -1191,17 +1189,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",
@@ -1221,13 +1219,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;
@@ -1282,7 +1280,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
@@ -1291,7 +1289,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;
}
@@ -1350,7 +1348,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",
@@ -2201,7 +2199,7 @@ static int zoran_s_fmt_vid_overlay(struc
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);
@@ -2358,12 +2356,12 @@ static int zoran_g_fbuf(struct file *fil
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;
diff -r a5c93b7614e4 -r 6c37a40e3d05
linux/drivers/media/video/zoran/zoran_procfs.c
--- a/linux/drivers/media/video/zoran/zoran_procfs.c Thu Feb 19 20:18:23
2009 +0100
+++ b/linux/drivers/media/video/zoran/zoran_procfs.c Thu Feb 19 21:31:17
2009 +0100
@@ -37,7 +37,7 @@
#include <linux/i2c.h>
#include <linux/i2c-algo-bit.h>
#include "compat.h"
-#include <linux/videodev.h>
+#include <linux/videodev2.h>
#include <linux/spinlock.h>
#include <linux/sem.h>
#include <linux/seq_file.h>
diff -r a5c93b7614e4 -r 6c37a40e3d05 linux/drivers/media/video/zoran/zr36016.c
--- a/linux/drivers/media/video/zoran/zr36016.c Thu Feb 19 20:18:23 2009 +0100
+++ b/linux/drivers/media/video/zoran/zr36016.c Thu Feb 19 21:31:17 2009 +0100
@@ -34,16 +34,11 @@
#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 "compat.h"
-#include <linux/videodev.h>
/* headerfile of this module */
#include"zr36016.h"
diff -r a5c93b7614e4 -r 6c37a40e3d05 linux/drivers/media/video/zoran/zr36050.c
--- a/linux/drivers/media/video/zoran/zr36050.c Thu Feb 19 20:18:23 2009 +0100
+++ b/linux/drivers/media/video/zoran/zr36050.c Thu Feb 19 21:31:17 2009 +0100
@@ -34,12 +34,8 @@
#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"
diff -r a5c93b7614e4 -r 6c37a40e3d05 linux/drivers/media/video/zoran/zr36060.c
--- a/linux/drivers/media/video/zoran/zr36060.c Thu Feb 19 20:18:23 2009 +0100
+++ b/linux/drivers/media/video/zoran/zr36060.c Thu Feb 19 21:31:17 2009 +0100
@@ -34,12 +34,8 @@
#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"
diff -r a5c93b7614e4 -r 6c37a40e3d05 linux/include/sound/tea575x-tuner.h
--- a/linux/include/sound/tea575x-tuner.h Thu Feb 19 20:18:23 2009 +0100
+++ b/linux/include/sound/tea575x-tuner.h Thu Feb 19 21:31:17 2009 +0100
@@ -23,7 +23,7 @@
*/
#include "compat.h"
-#include <linux/videodev.h>
+#include <linux/videodev2.h>
#include <media/v4l2-dev.h>
#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17)
---
Patch is available at:
http://linuxtv.org/hg/v4l-dvb/rev/6c37a40e3d0564448306113768551b4d452cd24a
_______________________________________________
linuxtv-commits mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits