add v4l2 api
PATCH 1/1 add v4l2 api
Hi Linus,
This patch adds the v4l2 API to the linux kernel.
The first, original video4linux API has a number of design bugs. They are fixed in this new API revision. It already exists for quite some time. Last weeks it got a number of cleanups based on the experiences of the last years (drop stuff nobody uses, fix some inconsistencies). We consider it being in a pretty good shape now and like to see it in 2.6.
This patch is basically the header file with all the structs and ioctls in there. A small module with some helper functions for v4l2 drivers is included too. Related updates (bttv, ...) will follow as separate patches.
Gerd
drivers/media/Kconfig +8 -3
@@ -12,9 +12,14 @@ this are available from <ftp://ftp.uk.linux.org/pub/linux/video4linux/>. - If you are interested in writing a driver for such an audio/video - device or user software interacting with such a driver, please read - the file <file:Documentation/video4linux/API.html>. + This kernel includes support for the new Video for Linux Two API, + (V4L2) as well as the original system. Drivers and applications + need to be rewritten to use V4L2, but drivers for popular cards + and applications for most video capture functions already exist. + + Documentation for the original API is included in the file + Documentation/video4linux/API.html. Documentation for V4L2 is + available on the web at http://bytesex.org/v4l/ This driver is also available as a module called videodev.o ( = code which can be inserted in and removed from the running kernel
drivers/media/video/Makefile +3 -2
@@ -5,13 +5,14 @@ # All of the (potential) objects that export symbols. # This list comes from 'grep -l EXPORT_SYMBOL *.[hc]'. -export-objs := videodev.o bttv-if.o cpia.o video-buf.o +export-objs := videodev.o v4l2-common.o \ + bttv-if.o cpia.o video-buf.o bttv-objs := bttv-driver.o bttv-cards.o bttv-if.o \ bttv-risc.o bttv-vbi.o zoran-objs := zr36120.o zr36120_i2c.o zr36120_mem.o -obj-$(CONFIG_VIDEO_DEV) += videodev.o +obj-$(CONFIG_VIDEO_DEV) += videodev.o v4l2-common.o obj-$(CONFIG_VIDEO_BT848) += bttv.o msp3400.o tvaudio.o \ tda7432.o tda9875.o tuner.o video-buf.o
drivers/media/video/v4l2-common.c +211 -0
211 lines not on this page · raw message
include/linux/videodev.h +4 -7
@@ -4,10 +4,10 @@#include <linux/types.h> #include <linux/version.h> -#if 0 +#if 1 /* * v4l2 is still work-in-progress, integration planed for 2.5.x -* v4l2 project homepage: http://www.thedirks.org/v4l2/ +* documentation: http://bytesex.org/v4l/ * patches available from: http://bytesex.org/patches/ */ # define HAVE_V4L2 1
@@ -32,10 +32,7 @@int minor;/* new interface -- we will use file_operations directly -* like soundcore does. -* kernel_ioctl() will be called by video_generic_ioctl. -* video_generic_ioctl() does the userspace copying of the -* ioctl arguments */ +* like soundcore does. */ struct file_operations *fops;void *priv;/* Used to be 'private' but that upsets C++ */
@@ -397,7 +394,7 @@#define VID_HARDWARE_PWC 31/* Philips webcams */ #define VID_HARDWARE_MEYE 32/* Sony Vaio MotionEye cameras */ #define VID_HARDWARE_CPIA2 33 -#define VID_HARDWARE_VICAM 34 +#define VID_HARDWARE_VICAM 34#endif /* __LINUX_VIDEODEV_H */
include/linux/videodev2.h +859 -0
859 lines not on this page · raw message
Signature · 3 lines
You can't please everybody. And usually if you _try_ to please everybody, the end result is one big mess. -- Linus Torvalds, 2002-04-20