aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@brturbo.com.br>2005-11-09 00:37:49 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2005-11-09 10:56:21 -0500
commit79436633dbced18aa348f8669ef507109f851303 (patch)
tree46e90aa4e1ebdca2ec5e97bab09e90f06bee1b49 /include
parentde48eebce8b63dbae7272ee80f4fe0eaddb61278 (diff)
[PATCH] v4l: 809: some changes to allow compiling cx88 and saa7134
- Some changes to allow compiling cx88 and saa7134 without V4L1 support. - This patch will help obsoleting V4L1 API. Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/videodev.h74
-rw-r--r--include/linux/videodev2.h76
-rw-r--r--include/media/video-buf.h2
3 files changed, 79 insertions, 73 deletions
diff --git a/include/linux/videodev.h b/include/linux/videodev.h
index 22e6e4bad7b8..23276cede540 100644
--- a/include/linux/videodev.h
+++ b/include/linux/videodev.h
@@ -1,57 +1,16 @@
1#ifndef __LINUX_VIDEODEV_H 1#ifndef __LINUX_VIDEODEV_H
2#define __LINUX_VIDEODEV_H 2#define __LINUX_VIDEODEV_H
3 3
4#include <linux/compiler.h>
5#include <linux/types.h> 4#include <linux/types.h>
6 5
7#define HAVE_V4L2 1 6#define HAVE_V4L1 1
7
8#include <linux/videodev2.h> 8#include <linux/videodev2.h>
9 9
10#ifdef __KERNEL__ 10#ifdef __KERNEL__
11 11
12#include <linux/poll.h>
13#include <linux/mm.h> 12#include <linux/mm.h>
14#include <linux/device.h>
15
16struct video_device
17{
18 /* device info */
19 struct device *dev;
20 char name[32];
21 int type; /* v4l1 */
22 int type2; /* v4l2 */
23 int hardware;
24 int minor;
25
26 /* device ops + callbacks */
27 struct file_operations *fops;
28 void (*release)(struct video_device *vfd);
29
30
31 /* obsolete -- fops->owner is used instead */
32 struct module *owner;
33 /* dev->driver_data will be used instead some day.
34 * Use the video_{get|set}_drvdata() helper functions,
35 * so the switch over will be transparent for you.
36 * Or use {pci|usb}_{get|set}_drvdata() directly. */
37 void *priv;
38
39 /* for videodev.c intenal usage -- please don't touch */
40 int users; /* video_exclusive_{open|close} ... */
41 struct semaphore lock; /* ... helper function uses these */
42 char devfs_name[64]; /* devfs */
43 struct class_device class_dev; /* sysfs */
44};
45
46#define VIDEO_MAJOR 81
47
48#define VFL_TYPE_GRABBER 0
49#define VFL_TYPE_VBI 1
50#define VFL_TYPE_RADIO 2
51#define VFL_TYPE_VTX 3
52 13
53extern int video_register_device(struct video_device *, int type, int nr);
54extern void video_unregister_device(struct video_device *);
55extern struct video_device* video_devdata(struct file*); 14extern struct video_device* video_devdata(struct file*);
56 15
57#define to_video_device(cd) container_of(cd, struct video_device, class_dev) 16#define to_video_device(cd) container_of(cd, struct video_device, class_dev)
@@ -68,11 +27,6 @@ video_device_remove_file(struct video_device *vfd,
68 class_device_remove_file(&vfd->class_dev, attr); 27 class_device_remove_file(&vfd->class_dev, attr);
69} 28}
70 29
71/* helper functions to alloc / release struct video_device, the
72 later can be used for video_device->release() */
73struct video_device *video_device_alloc(void);
74void video_device_release(struct video_device *vfd);
75
76/* helper functions to access driver private data. */ 30/* helper functions to access driver private data. */
77static inline void *video_get_drvdata(struct video_device *dev) 31static inline void *video_get_drvdata(struct video_device *dev)
78{ 32{
@@ -86,27 +40,8 @@ static inline void video_set_drvdata(struct video_device *dev, void *data)
86 40
87extern int video_exclusive_open(struct inode *inode, struct file *file); 41extern int video_exclusive_open(struct inode *inode, struct file *file);
88extern int video_exclusive_release(struct inode *inode, struct file *file); 42extern int video_exclusive_release(struct inode *inode, struct file *file);
89extern int video_usercopy(struct inode *inode, struct file *file,
90 unsigned int cmd, unsigned long arg,
91 int (*func)(struct inode *inode, struct file *file,
92 unsigned int cmd, void *arg));
93#endif /* __KERNEL__ */ 43#endif /* __KERNEL__ */
94 44
95#define VID_TYPE_CAPTURE 1 /* Can capture */
96#define VID_TYPE_TUNER 2 /* Can tune */
97#define VID_TYPE_TELETEXT 4 /* Does teletext */
98#define VID_TYPE_OVERLAY 8 /* Overlay onto frame buffer */
99#define VID_TYPE_CHROMAKEY 16 /* Overlay by chromakey */
100#define VID_TYPE_CLIPPING 32 /* Can clip */
101#define VID_TYPE_FRAMERAM 64 /* Uses the frame buffer memory */
102#define VID_TYPE_SCALES 128 /* Scalable */
103#define VID_TYPE_MONOCHROME 256 /* Monochrome only */
104#define VID_TYPE_SUBCAPTURE 512 /* Can capture subareas of the image */
105#define VID_TYPE_MPEG_DECODER 1024 /* Can decode MPEG streams */
106#define VID_TYPE_MPEG_ENCODER 2048 /* Can encode MPEG streams */
107#define VID_TYPE_MJPEG_DECODER 4096 /* Can decode MJPEG streams */
108#define VID_TYPE_MJPEG_ENCODER 8192 /* Can encode MJPEG streams */
109
110struct video_capability 45struct video_capability
111{ 46{
112 char name[32]; 47 char name[32];
@@ -260,9 +195,6 @@ struct video_key
260 __u32 flags; 195 __u32 flags;
261}; 196};
262 197
263
264#define VIDEO_MAX_FRAME 32
265
266struct video_mbuf 198struct video_mbuf
267{ 199{
268 int size; /* Total memory to map */ 200 int size; /* Total memory to map */
@@ -270,10 +202,8 @@ struct video_mbuf
270 int offsets[VIDEO_MAX_FRAME]; 202 int offsets[VIDEO_MAX_FRAME];
271}; 203};
272 204
273
274#define VIDEO_NO_UNIT (-1) 205#define VIDEO_NO_UNIT (-1)
275 206
276
277struct video_unit 207struct video_unit
278{ 208{
279 int video; /* Video minor */ 209 int video; /* Video minor */
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h
index 090091560c36..df0f9a24944a 100644
--- a/include/linux/videodev2.h
+++ b/include/linux/videodev2.h
@@ -18,6 +18,82 @@
18#endif 18#endif
19#include <linux/compiler.h> /* need __user */ 19#include <linux/compiler.h> /* need __user */
20 20
21#include <linux/poll.h>
22#include <linux/device.h>
23
24#define HAVE_V4L2 1
25
26/*
27 * Common stuff for both V4L1 and V4L2
28 * Moved from videodev.h
29 */
30
31#define VIDEO_MAX_FRAME 32
32
33#define VFL_TYPE_GRABBER 0
34#define VFL_TYPE_VBI 1
35#define VFL_TYPE_RADIO 2
36#define VFL_TYPE_VTX 3
37
38struct video_device
39{
40 /* device info */
41 struct device *dev;
42 char name[32];
43 int type; /* v4l1 */
44 int type2; /* v4l2 */
45 int hardware;
46 int minor;
47
48 /* device ops + callbacks */
49 struct file_operations *fops;
50 void (*release)(struct video_device *vfd);
51
52
53 /* obsolete -- fops->owner is used instead */
54 struct module *owner;
55 /* dev->driver_data will be used instead some day.
56 * Use the video_{get|set}_drvdata() helper functions,
57 * so the switch over will be transparent for you.
58 * Or use {pci|usb}_{get|set}_drvdata() directly. */
59 void *priv;
60
61 /* for videodev.c intenal usage -- please don't touch */
62 int users; /* video_exclusive_{open|close} ... */
63 struct semaphore lock; /* ... helper function uses these */
64 char devfs_name[64]; /* devfs */
65 struct class_device class_dev; /* sysfs */
66};
67
68#define VIDEO_MAJOR 81
69
70#define VID_TYPE_CAPTURE 1 /* Can capture */
71#define VID_TYPE_TUNER 2 /* Can tune */
72#define VID_TYPE_TELETEXT 4 /* Does teletext */
73#define VID_TYPE_OVERLAY 8 /* Overlay onto frame buffer */
74#define VID_TYPE_CHROMAKEY 16 /* Overlay by chromakey */
75#define VID_TYPE_CLIPPING 32 /* Can clip */
76#define VID_TYPE_FRAMERAM 64 /* Uses the frame buffer memory */
77#define VID_TYPE_SCALES 128 /* Scalable */
78#define VID_TYPE_MONOCHROME 256 /* Monochrome only */
79#define VID_TYPE_SUBCAPTURE 512 /* Can capture subareas of the image */
80#define VID_TYPE_MPEG_DECODER 1024 /* Can decode MPEG streams */
81#define VID_TYPE_MPEG_ENCODER 2048 /* Can encode MPEG streams */
82#define VID_TYPE_MJPEG_DECODER 4096 /* Can decode MJPEG streams */
83#define VID_TYPE_MJPEG_ENCODER 8192 /* Can encode MJPEG streams */
84
85extern int video_register_device(struct video_device *, int type, int nr);
86extern void video_unregister_device(struct video_device *);
87extern int video_usercopy(struct inode *inode, struct file *file,
88 unsigned int cmd, unsigned long arg,
89 int (*func)(struct inode *inode, struct file *file,
90 unsigned int cmd, void *arg));
91
92/* helper functions to alloc / release struct video_device, the
93 later can be used for video_device->release() */
94struct video_device *video_device_alloc(void);
95void video_device_release(struct video_device *vfd);
96
21/* 97/*
22 * M I S C E L L A N E O U S 98 * M I S C E L L A N E O U S
23 */ 99 */
diff --git a/include/media/video-buf.h b/include/media/video-buf.h
index ee8eb15c0ea6..8ecfd78e0027 100644
--- a/include/media/video-buf.h
+++ b/include/media/video-buf.h
@@ -17,7 +17,7 @@
17 * (at your option) any later version. 17 * (at your option) any later version.
18 */ 18 */
19 19
20#include <linux/videodev.h> 20#include <linux/videodev2.h>
21 21
22#define UNSET (-1U) 22#define UNSET (-1U)
23 23