Commit 88ae7624a6fe890e5a8ca57b25420f66e1389f8b

Authored by Mauro Carvalho Chehab
1 parent 58c66df3e3

[media] V4L1 removal: Remove linux/videodev.h

There's no sense on keeping it on 2.6.38, as nobody is using it
anymore, at the kernel tree, and installing it at the userspace
API.

As two deprecated drivers still need it, move it to their internal
directories.

Reviewed-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

Showing 11 changed files with 640 additions and 431 deletions Side-by-side Diff

Documentation/feature-removal-schedule.txt
... ... @@ -97,23 +97,6 @@
97 97  
98 98 ---------------------------
99 99  
100   -What: Video4Linux API 1 ioctls and from Video devices.
101   -When: kernel 2.6.39
102   -Files: include/linux/videodev.h
103   -Check: include/linux/videodev.h
104   -Why: V4L1 AP1 was replaced by V4L2 API during migration from 2.4 to 2.6
105   - series. The old API have lots of drawbacks and don't provide enough
106   - means to work with all video and audio standards. The newer API is
107   - already available on the main drivers and should be used instead.
108   -
109   - The userspace libv4l1 library can convert V4L1 calls to V4L2. This
110   - replaces the kernel V4L1 compatibility module which was removed in
111   - 2.6.38. The last V4L1 drivers will either be converted to V4L2 or
112   - removed for 2.6.39 at which point the V4L1 API will cease to exist.
113   -Who: Mauro Carvalho Chehab <mchehab@infradead.org>
114   -
115   ----------------------------
116   -
117 100 What: Video4Linux obsolete drivers using V4L1 API
118 101 When: kernel 2.6.39
119 102 Files: drivers/staging/se401/* drivers/staging/usbvideo/*
drivers/media/video/v4l2-compat-ioctl32.c
... ... @@ -15,7 +15,6 @@
15 15  
16 16 #include <linux/compat.h>
17 17 #define __OLD_VIDIOC_ /* To allow fixing old calls*/
18   -#include <linux/videodev.h>
19 18 #include <linux/videodev2.h>
20 19 #include <linux/module.h>
21 20 #include <media/v4l2-ioctl.h>
drivers/staging/se401/se401.h
... ... @@ -3,7 +3,7 @@
3 3 #define __LINUX_se401_H
4 4  
5 5 #include <linux/uaccess.h>
6   -#include <linux/videodev.h>
  6 +#include "videodev.h"
7 7 #include <media/v4l2-common.h>
8 8 #include <media/v4l2-ioctl.h>
9 9 #include <linux/mutex.h>
drivers/staging/se401/videodev.h
  1 +/*
  2 + * Video for Linux version 1 - OBSOLETE
  3 + *
  4 + * Header file for v4l1 drivers and applications, for
  5 + * Linux kernels 2.2.x or 2.4.x.
  6 + *
  7 + * Provides header for legacy drivers and applications
  8 + *
  9 + * See http://linuxtv.org for more info
  10 + *
  11 + */
  12 +#ifndef __LINUX_VIDEODEV_H
  13 +#define __LINUX_VIDEODEV_H
  14 +
  15 +#include <linux/types.h>
  16 +#include <linux/ioctl.h>
  17 +#include <linux/videodev2.h>
  18 +
  19 +#define VID_TYPE_CAPTURE 1 /* Can capture */
  20 +#define VID_TYPE_TUNER 2 /* Can tune */
  21 +#define VID_TYPE_TELETEXT 4 /* Does teletext */
  22 +#define VID_TYPE_OVERLAY 8 /* Overlay onto frame buffer */
  23 +#define VID_TYPE_CHROMAKEY 16 /* Overlay by chromakey */
  24 +#define VID_TYPE_CLIPPING 32 /* Can clip */
  25 +#define VID_TYPE_FRAMERAM 64 /* Uses the frame buffer memory */
  26 +#define VID_TYPE_SCALES 128 /* Scalable */
  27 +#define VID_TYPE_MONOCHROME 256 /* Monochrome only */
  28 +#define VID_TYPE_SUBCAPTURE 512 /* Can capture subareas of the image */
  29 +#define VID_TYPE_MPEG_DECODER 1024 /* Can decode MPEG streams */
  30 +#define VID_TYPE_MPEG_ENCODER 2048 /* Can encode MPEG streams */
  31 +#define VID_TYPE_MJPEG_DECODER 4096 /* Can decode MJPEG streams */
  32 +#define VID_TYPE_MJPEG_ENCODER 8192 /* Can encode MJPEG streams */
  33 +
  34 +struct video_capability
  35 +{
  36 + char name[32];
  37 + int type;
  38 + int channels; /* Num channels */
  39 + int audios; /* Num audio devices */
  40 + int maxwidth; /* Supported width */
  41 + int maxheight; /* And height */
  42 + int minwidth; /* Supported width */
  43 + int minheight; /* And height */
  44 +};
  45 +
  46 +
  47 +struct video_channel
  48 +{
  49 + int channel;
  50 + char name[32];
  51 + int tuners;
  52 + __u32 flags;
  53 +#define VIDEO_VC_TUNER 1 /* Channel has a tuner */
  54 +#define VIDEO_VC_AUDIO 2 /* Channel has audio */
  55 + __u16 type;
  56 +#define VIDEO_TYPE_TV 1
  57 +#define VIDEO_TYPE_CAMERA 2
  58 + __u16 norm; /* Norm set by channel */
  59 +};
  60 +
  61 +struct video_tuner
  62 +{
  63 + int tuner;
  64 + char name[32];
  65 + unsigned long rangelow, rangehigh; /* Tuner range */
  66 + __u32 flags;
  67 +#define VIDEO_TUNER_PAL 1
  68 +#define VIDEO_TUNER_NTSC 2
  69 +#define VIDEO_TUNER_SECAM 4
  70 +#define VIDEO_TUNER_LOW 8 /* Uses KHz not MHz */
  71 +#define VIDEO_TUNER_NORM 16 /* Tuner can set norm */
  72 +#define VIDEO_TUNER_STEREO_ON 128 /* Tuner is seeing stereo */
  73 +#define VIDEO_TUNER_RDS_ON 256 /* Tuner is seeing an RDS datastream */
  74 +#define VIDEO_TUNER_MBS_ON 512 /* Tuner is seeing an MBS datastream */
  75 + __u16 mode; /* PAL/NTSC/SECAM/OTHER */
  76 +#define VIDEO_MODE_PAL 0
  77 +#define VIDEO_MODE_NTSC 1
  78 +#define VIDEO_MODE_SECAM 2
  79 +#define VIDEO_MODE_AUTO 3
  80 + __u16 signal; /* Signal strength 16bit scale */
  81 +};
  82 +
  83 +struct video_picture
  84 +{
  85 + __u16 brightness;
  86 + __u16 hue;
  87 + __u16 colour;
  88 + __u16 contrast;
  89 + __u16 whiteness; /* Black and white only */
  90 + __u16 depth; /* Capture depth */
  91 + __u16 palette; /* Palette in use */
  92 +#define VIDEO_PALETTE_GREY 1 /* Linear greyscale */
  93 +#define VIDEO_PALETTE_HI240 2 /* High 240 cube (BT848) */
  94 +#define VIDEO_PALETTE_RGB565 3 /* 565 16 bit RGB */
  95 +#define VIDEO_PALETTE_RGB24 4 /* 24bit RGB */
  96 +#define VIDEO_PALETTE_RGB32 5 /* 32bit RGB */
  97 +#define VIDEO_PALETTE_RGB555 6 /* 555 15bit RGB */
  98 +#define VIDEO_PALETTE_YUV422 7 /* YUV422 capture */
  99 +#define VIDEO_PALETTE_YUYV 8
  100 +#define VIDEO_PALETTE_UYVY 9 /* The great thing about standards is ... */
  101 +#define VIDEO_PALETTE_YUV420 10
  102 +#define VIDEO_PALETTE_YUV411 11 /* YUV411 capture */
  103 +#define VIDEO_PALETTE_RAW 12 /* RAW capture (BT848) */
  104 +#define VIDEO_PALETTE_YUV422P 13 /* YUV 4:2:2 Planar */
  105 +#define VIDEO_PALETTE_YUV411P 14 /* YUV 4:1:1 Planar */
  106 +#define VIDEO_PALETTE_YUV420P 15 /* YUV 4:2:0 Planar */
  107 +#define VIDEO_PALETTE_YUV410P 16 /* YUV 4:1:0 Planar */
  108 +#define VIDEO_PALETTE_PLANAR 13 /* start of planar entries */
  109 +#define VIDEO_PALETTE_COMPONENT 7 /* start of component entries */
  110 +};
  111 +
  112 +struct video_audio
  113 +{
  114 + int audio; /* Audio channel */
  115 + __u16 volume; /* If settable */
  116 + __u16 bass, treble;
  117 + __u32 flags;
  118 +#define VIDEO_AUDIO_MUTE 1
  119 +#define VIDEO_AUDIO_MUTABLE 2
  120 +#define VIDEO_AUDIO_VOLUME 4
  121 +#define VIDEO_AUDIO_BASS 8
  122 +#define VIDEO_AUDIO_TREBLE 16
  123 +#define VIDEO_AUDIO_BALANCE 32
  124 + char name[16];
  125 +#define VIDEO_SOUND_MONO 1
  126 +#define VIDEO_SOUND_STEREO 2
  127 +#define VIDEO_SOUND_LANG1 4
  128 +#define VIDEO_SOUND_LANG2 8
  129 + __u16 mode;
  130 + __u16 balance; /* Stereo balance */
  131 + __u16 step; /* Step actual volume uses */
  132 +};
  133 +
  134 +struct video_clip
  135 +{
  136 + __s32 x,y;
  137 + __s32 width, height;
  138 + struct video_clip *next; /* For user use/driver use only */
  139 +};
  140 +
  141 +struct video_window
  142 +{
  143 + __u32 x,y; /* Position of window */
  144 + __u32 width,height; /* Its size */
  145 + __u32 chromakey;
  146 + __u32 flags;
  147 + struct video_clip __user *clips; /* Set only */
  148 + int clipcount;
  149 +#define VIDEO_WINDOW_INTERLACE 1
  150 +#define VIDEO_WINDOW_CHROMAKEY 16 /* Overlay by chromakey */
  151 +#define VIDEO_CLIP_BITMAP -1
  152 +/* bitmap is 1024x625, a '1' bit represents a clipped pixel */
  153 +#define VIDEO_CLIPMAP_SIZE (128 * 625)
  154 +};
  155 +
  156 +struct video_capture
  157 +{
  158 + __u32 x,y; /* Offsets into image */
  159 + __u32 width, height; /* Area to capture */
  160 + __u16 decimation; /* Decimation divider */
  161 + __u16 flags; /* Flags for capture */
  162 +#define VIDEO_CAPTURE_ODD 0 /* Temporal */
  163 +#define VIDEO_CAPTURE_EVEN 1
  164 +};
  165 +
  166 +struct video_buffer
  167 +{
  168 + void *base;
  169 + int height,width;
  170 + int depth;
  171 + int bytesperline;
  172 +};
  173 +
  174 +struct video_mmap
  175 +{
  176 + unsigned int frame; /* Frame (0 - n) for double buffer */
  177 + int height,width;
  178 + unsigned int format; /* should be VIDEO_PALETTE_* */
  179 +};
  180 +
  181 +struct video_key
  182 +{
  183 + __u8 key[8];
  184 + __u32 flags;
  185 +};
  186 +
  187 +struct video_mbuf
  188 +{
  189 + int size; /* Total memory to map */
  190 + int frames; /* Frames */
  191 + int offsets[VIDEO_MAX_FRAME];
  192 +};
  193 +
  194 +#define VIDEO_NO_UNIT (-1)
  195 +
  196 +struct video_unit
  197 +{
  198 + int video; /* Video minor */
  199 + int vbi; /* VBI minor */
  200 + int radio; /* Radio minor */
  201 + int audio; /* Audio minor */
  202 + int teletext; /* Teletext minor */
  203 +};
  204 +
  205 +struct vbi_format {
  206 + __u32 sampling_rate; /* in Hz */
  207 + __u32 samples_per_line;
  208 + __u32 sample_format; /* VIDEO_PALETTE_RAW only (1 byte) */
  209 + __s32 start[2]; /* starting line for each frame */
  210 + __u32 count[2]; /* count of lines for each frame */
  211 + __u32 flags;
  212 +#define VBI_UNSYNC 1 /* can distingues between top/bottom field */
  213 +#define VBI_INTERLACED 2 /* lines are interlaced */
  214 +};
  215 +
  216 +/* video_info is biased towards hardware mpeg encode/decode */
  217 +/* but it could apply generically to any hardware compressor/decompressor */
  218 +struct video_info
  219 +{
  220 + __u32 frame_count; /* frames output since decode/encode began */
  221 + __u32 h_size; /* current unscaled horizontal size */
  222 + __u32 v_size; /* current unscaled veritcal size */
  223 + __u32 smpte_timecode; /* current SMPTE timecode (for current GOP) */
  224 + __u32 picture_type; /* current picture type */
  225 + __u32 temporal_reference; /* current temporal reference */
  226 + __u8 user_data[256]; /* user data last found in compressed stream */
  227 + /* user_data[0] contains user data flags, user_data[1] has count */
  228 +};
  229 +
  230 +/* generic structure for setting playback modes */
  231 +struct video_play_mode
  232 +{
  233 + int mode;
  234 + int p1;
  235 + int p2;
  236 +};
  237 +
  238 +/* for loading microcode / fpga programming */
  239 +struct video_code
  240 +{
  241 + char loadwhat[16]; /* name or tag of file being passed */
  242 + int datasize;
  243 + __u8 *data;
  244 +};
  245 +
  246 +#define VIDIOCGCAP _IOR('v',1,struct video_capability) /* Get capabilities */
  247 +#define VIDIOCGCHAN _IOWR('v',2,struct video_channel) /* Get channel info (sources) */
  248 +#define VIDIOCSCHAN _IOW('v',3,struct video_channel) /* Set channel */
  249 +#define VIDIOCGTUNER _IOWR('v',4,struct video_tuner) /* Get tuner abilities */
  250 +#define VIDIOCSTUNER _IOW('v',5,struct video_tuner) /* Tune the tuner for the current channel */
  251 +#define VIDIOCGPICT _IOR('v',6,struct video_picture) /* Get picture properties */
  252 +#define VIDIOCSPICT _IOW('v',7,struct video_picture) /* Set picture properties */
  253 +#define VIDIOCCAPTURE _IOW('v',8,int) /* Start, end capture */
  254 +#define VIDIOCGWIN _IOR('v',9, struct video_window) /* Get the video overlay window */
  255 +#define VIDIOCSWIN _IOW('v',10, struct video_window) /* Set the video overlay window - passes clip list for hardware smarts , chromakey etc */
  256 +#define VIDIOCGFBUF _IOR('v',11, struct video_buffer) /* Get frame buffer */
  257 +#define VIDIOCSFBUF _IOW('v',12, struct video_buffer) /* Set frame buffer - root only */
  258 +#define VIDIOCKEY _IOR('v',13, struct video_key) /* Video key event - to dev 255 is to all - cuts capture on all DMA windows with this key (0xFFFFFFFF == all) */
  259 +#define VIDIOCGFREQ _IOR('v',14, unsigned long) /* Set tuner */
  260 +#define VIDIOCSFREQ _IOW('v',15, unsigned long) /* Set tuner */
  261 +#define VIDIOCGAUDIO _IOR('v',16, struct video_audio) /* Get audio info */
  262 +#define VIDIOCSAUDIO _IOW('v',17, struct video_audio) /* Audio source, mute etc */
  263 +#define VIDIOCSYNC _IOW('v',18, int) /* Sync with mmap grabbing */
  264 +#define VIDIOCMCAPTURE _IOW('v',19, struct video_mmap) /* Grab frames */
  265 +#define VIDIOCGMBUF _IOR('v',20, struct video_mbuf) /* Memory map buffer info */
  266 +#define VIDIOCGUNIT _IOR('v',21, struct video_unit) /* Get attached units */
  267 +#define VIDIOCGCAPTURE _IOR('v',22, struct video_capture) /* Get subcapture */
  268 +#define VIDIOCSCAPTURE _IOW('v',23, struct video_capture) /* Set subcapture */
  269 +#define VIDIOCSPLAYMODE _IOW('v',24, struct video_play_mode) /* Set output video mode/feature */
  270 +#define VIDIOCSWRITEMODE _IOW('v',25, int) /* Set write mode */
  271 +#define VIDIOCGPLAYINFO _IOR('v',26, struct video_info) /* Get current playback info from hardware */
  272 +#define VIDIOCSMICROCODE _IOW('v',27, struct video_code) /* Load microcode into hardware */
  273 +#define VIDIOCGVBIFMT _IOR('v',28, struct vbi_format) /* Get VBI information */
  274 +#define VIDIOCSVBIFMT _IOW('v',29, struct vbi_format) /* Set VBI information */
  275 +
  276 +
  277 +#define BASE_VIDIOCPRIVATE 192 /* 192-255 are private */
  278 +
  279 +/* VIDIOCSWRITEMODE */
  280 +#define VID_WRITE_MPEG_AUD 0
  281 +#define VID_WRITE_MPEG_VID 1
  282 +#define VID_WRITE_OSD 2
  283 +#define VID_WRITE_TTX 3
  284 +#define VID_WRITE_CC 4
  285 +#define VID_WRITE_MJPEG 5
  286 +
  287 +/* VIDIOCSPLAYMODE */
  288 +#define VID_PLAY_VID_OUT_MODE 0
  289 + /* p1: = VIDEO_MODE_PAL, VIDEO_MODE_NTSC, etc ... */
  290 +#define VID_PLAY_GENLOCK 1
  291 + /* p1: 0 = OFF, 1 = ON */
  292 + /* p2: GENLOCK FINE DELAY value */
  293 +#define VID_PLAY_NORMAL 2
  294 +#define VID_PLAY_PAUSE 3
  295 +#define VID_PLAY_SINGLE_FRAME 4
  296 +#define VID_PLAY_FAST_FORWARD 5
  297 +#define VID_PLAY_SLOW_MOTION 6
  298 +#define VID_PLAY_IMMEDIATE_NORMAL 7
  299 +#define VID_PLAY_SWITCH_CHANNELS 8
  300 +#define VID_PLAY_FREEZE_FRAME 9
  301 +#define VID_PLAY_STILL_MODE 10
  302 +#define VID_PLAY_MASTER_MODE 11
  303 + /* p1: see below */
  304 +#define VID_PLAY_MASTER_NONE 1
  305 +#define VID_PLAY_MASTER_VIDEO 2
  306 +#define VID_PLAY_MASTER_AUDIO 3
  307 +#define VID_PLAY_ACTIVE_SCANLINES 12
  308 + /* p1 = first active; p2 = last active */
  309 +#define VID_PLAY_RESET 13
  310 +#define VID_PLAY_END_MARK 14
  311 +
  312 +#endif /* __LINUX_VIDEODEV_H */
  313 +
  314 +/*
  315 + * Local variables:
  316 + * c-basic-offset: 8
  317 + * End:
  318 + */
drivers/staging/usbvideo/usbvideo.h
... ... @@ -16,7 +16,7 @@
16 16 #ifndef usbvideo_h
17 17 #define usbvideo_h
18 18  
19   -#include <linux/videodev.h>
  19 +#include "videodev.h"
20 20 #include <media/v4l2-common.h>
21 21 #include <media/v4l2-ioctl.h>
22 22 #include <linux/usb.h>
drivers/staging/usbvideo/vicam.c
... ... @@ -38,7 +38,7 @@
38 38 #include <linux/kernel.h>
39 39 #include <linux/module.h>
40 40 #include <linux/init.h>
41   -#include <linux/videodev.h>
  41 +#include "videodev.h"
42 42 #include <linux/usb.h>
43 43 #include <linux/vmalloc.h>
44 44 #include <linux/mm.h>
drivers/staging/usbvideo/videodev.h
  1 +/*
  2 + * Video for Linux version 1 - OBSOLETE
  3 + *
  4 + * Header file for v4l1 drivers and applications, for
  5 + * Linux kernels 2.2.x or 2.4.x.
  6 + *
  7 + * Provides header for legacy drivers and applications
  8 + *
  9 + * See http://linuxtv.org for more info
  10 + *
  11 + */
  12 +#ifndef __LINUX_VIDEODEV_H
  13 +#define __LINUX_VIDEODEV_H
  14 +
  15 +#include <linux/types.h>
  16 +#include <linux/ioctl.h>
  17 +#include <linux/videodev2.h>
  18 +
  19 +#define VID_TYPE_CAPTURE 1 /* Can capture */
  20 +#define VID_TYPE_TUNER 2 /* Can tune */
  21 +#define VID_TYPE_TELETEXT 4 /* Does teletext */
  22 +#define VID_TYPE_OVERLAY 8 /* Overlay onto frame buffer */
  23 +#define VID_TYPE_CHROMAKEY 16 /* Overlay by chromakey */
  24 +#define VID_TYPE_CLIPPING 32 /* Can clip */
  25 +#define VID_TYPE_FRAMERAM 64 /* Uses the frame buffer memory */
  26 +#define VID_TYPE_SCALES 128 /* Scalable */
  27 +#define VID_TYPE_MONOCHROME 256 /* Monochrome only */
  28 +#define VID_TYPE_SUBCAPTURE 512 /* Can capture subareas of the image */
  29 +#define VID_TYPE_MPEG_DECODER 1024 /* Can decode MPEG streams */
  30 +#define VID_TYPE_MPEG_ENCODER 2048 /* Can encode MPEG streams */
  31 +#define VID_TYPE_MJPEG_DECODER 4096 /* Can decode MJPEG streams */
  32 +#define VID_TYPE_MJPEG_ENCODER 8192 /* Can encode MJPEG streams */
  33 +
  34 +struct video_capability
  35 +{
  36 + char name[32];
  37 + int type;
  38 + int channels; /* Num channels */
  39 + int audios; /* Num audio devices */
  40 + int maxwidth; /* Supported width */
  41 + int maxheight; /* And height */
  42 + int minwidth; /* Supported width */
  43 + int minheight; /* And height */
  44 +};
  45 +
  46 +
  47 +struct video_channel
  48 +{
  49 + int channel;
  50 + char name[32];
  51 + int tuners;
  52 + __u32 flags;
  53 +#define VIDEO_VC_TUNER 1 /* Channel has a tuner */
  54 +#define VIDEO_VC_AUDIO 2 /* Channel has audio */
  55 + __u16 type;
  56 +#define VIDEO_TYPE_TV 1
  57 +#define VIDEO_TYPE_CAMERA 2
  58 + __u16 norm; /* Norm set by channel */
  59 +};
  60 +
  61 +struct video_tuner
  62 +{
  63 + int tuner;
  64 + char name[32];
  65 + unsigned long rangelow, rangehigh; /* Tuner range */
  66 + __u32 flags;
  67 +#define VIDEO_TUNER_PAL 1
  68 +#define VIDEO_TUNER_NTSC 2
  69 +#define VIDEO_TUNER_SECAM 4
  70 +#define VIDEO_TUNER_LOW 8 /* Uses KHz not MHz */
  71 +#define VIDEO_TUNER_NORM 16 /* Tuner can set norm */
  72 +#define VIDEO_TUNER_STEREO_ON 128 /* Tuner is seeing stereo */
  73 +#define VIDEO_TUNER_RDS_ON 256 /* Tuner is seeing an RDS datastream */
  74 +#define VIDEO_TUNER_MBS_ON 512 /* Tuner is seeing an MBS datastream */
  75 + __u16 mode; /* PAL/NTSC/SECAM/OTHER */
  76 +#define VIDEO_MODE_PAL 0
  77 +#define VIDEO_MODE_NTSC 1
  78 +#define VIDEO_MODE_SECAM 2
  79 +#define VIDEO_MODE_AUTO 3
  80 + __u16 signal; /* Signal strength 16bit scale */
  81 +};
  82 +
  83 +struct video_picture
  84 +{
  85 + __u16 brightness;
  86 + __u16 hue;
  87 + __u16 colour;
  88 + __u16 contrast;
  89 + __u16 whiteness; /* Black and white only */
  90 + __u16 depth; /* Capture depth */
  91 + __u16 palette; /* Palette in use */
  92 +#define VIDEO_PALETTE_GREY 1 /* Linear greyscale */
  93 +#define VIDEO_PALETTE_HI240 2 /* High 240 cube (BT848) */
  94 +#define VIDEO_PALETTE_RGB565 3 /* 565 16 bit RGB */
  95 +#define VIDEO_PALETTE_RGB24 4 /* 24bit RGB */
  96 +#define VIDEO_PALETTE_RGB32 5 /* 32bit RGB */
  97 +#define VIDEO_PALETTE_RGB555 6 /* 555 15bit RGB */
  98 +#define VIDEO_PALETTE_YUV422 7 /* YUV422 capture */
  99 +#define VIDEO_PALETTE_YUYV 8
  100 +#define VIDEO_PALETTE_UYVY 9 /* The great thing about standards is ... */
  101 +#define VIDEO_PALETTE_YUV420 10
  102 +#define VIDEO_PALETTE_YUV411 11 /* YUV411 capture */
  103 +#define VIDEO_PALETTE_RAW 12 /* RAW capture (BT848) */
  104 +#define VIDEO_PALETTE_YUV422P 13 /* YUV 4:2:2 Planar */
  105 +#define VIDEO_PALETTE_YUV411P 14 /* YUV 4:1:1 Planar */
  106 +#define VIDEO_PALETTE_YUV420P 15 /* YUV 4:2:0 Planar */
  107 +#define VIDEO_PALETTE_YUV410P 16 /* YUV 4:1:0 Planar */
  108 +#define VIDEO_PALETTE_PLANAR 13 /* start of planar entries */
  109 +#define VIDEO_PALETTE_COMPONENT 7 /* start of component entries */
  110 +};
  111 +
  112 +struct video_audio
  113 +{
  114 + int audio; /* Audio channel */
  115 + __u16 volume; /* If settable */
  116 + __u16 bass, treble;
  117 + __u32 flags;
  118 +#define VIDEO_AUDIO_MUTE 1
  119 +#define VIDEO_AUDIO_MUTABLE 2
  120 +#define VIDEO_AUDIO_VOLUME 4
  121 +#define VIDEO_AUDIO_BASS 8
  122 +#define VIDEO_AUDIO_TREBLE 16
  123 +#define VIDEO_AUDIO_BALANCE 32
  124 + char name[16];
  125 +#define VIDEO_SOUND_MONO 1
  126 +#define VIDEO_SOUND_STEREO 2
  127 +#define VIDEO_SOUND_LANG1 4
  128 +#define VIDEO_SOUND_LANG2 8
  129 + __u16 mode;
  130 + __u16 balance; /* Stereo balance */
  131 + __u16 step; /* Step actual volume uses */
  132 +};
  133 +
  134 +struct video_clip
  135 +{
  136 + __s32 x,y;
  137 + __s32 width, height;
  138 + struct video_clip *next; /* For user use/driver use only */
  139 +};
  140 +
  141 +struct video_window
  142 +{
  143 + __u32 x,y; /* Position of window */
  144 + __u32 width,height; /* Its size */
  145 + __u32 chromakey;
  146 + __u32 flags;
  147 + struct video_clip __user *clips; /* Set only */
  148 + int clipcount;
  149 +#define VIDEO_WINDOW_INTERLACE 1
  150 +#define VIDEO_WINDOW_CHROMAKEY 16 /* Overlay by chromakey */
  151 +#define VIDEO_CLIP_BITMAP -1
  152 +/* bitmap is 1024x625, a '1' bit represents a clipped pixel */
  153 +#define VIDEO_CLIPMAP_SIZE (128 * 625)
  154 +};
  155 +
  156 +struct video_capture
  157 +{
  158 + __u32 x,y; /* Offsets into image */
  159 + __u32 width, height; /* Area to capture */
  160 + __u16 decimation; /* Decimation divider */
  161 + __u16 flags; /* Flags for capture */
  162 +#define VIDEO_CAPTURE_ODD 0 /* Temporal */
  163 +#define VIDEO_CAPTURE_EVEN 1
  164 +};
  165 +
  166 +struct video_buffer
  167 +{
  168 + void *base;
  169 + int height,width;
  170 + int depth;
  171 + int bytesperline;
  172 +};
  173 +
  174 +struct video_mmap
  175 +{
  176 + unsigned int frame; /* Frame (0 - n) for double buffer */
  177 + int height,width;
  178 + unsigned int format; /* should be VIDEO_PALETTE_* */
  179 +};
  180 +
  181 +struct video_key
  182 +{
  183 + __u8 key[8];
  184 + __u32 flags;
  185 +};
  186 +
  187 +struct video_mbuf
  188 +{
  189 + int size; /* Total memory to map */
  190 + int frames; /* Frames */
  191 + int offsets[VIDEO_MAX_FRAME];
  192 +};
  193 +
  194 +#define VIDEO_NO_UNIT (-1)
  195 +
  196 +struct video_unit
  197 +{
  198 + int video; /* Video minor */
  199 + int vbi; /* VBI minor */
  200 + int radio; /* Radio minor */
  201 + int audio; /* Audio minor */
  202 + int teletext; /* Teletext minor */
  203 +};
  204 +
  205 +struct vbi_format {
  206 + __u32 sampling_rate; /* in Hz */
  207 + __u32 samples_per_line;
  208 + __u32 sample_format; /* VIDEO_PALETTE_RAW only (1 byte) */
  209 + __s32 start[2]; /* starting line for each frame */
  210 + __u32 count[2]; /* count of lines for each frame */
  211 + __u32 flags;
  212 +#define VBI_UNSYNC 1 /* can distingues between top/bottom field */
  213 +#define VBI_INTERLACED 2 /* lines are interlaced */
  214 +};
  215 +
  216 +/* video_info is biased towards hardware mpeg encode/decode */
  217 +/* but it could apply generically to any hardware compressor/decompressor */
  218 +struct video_info
  219 +{
  220 + __u32 frame_count; /* frames output since decode/encode began */
  221 + __u32 h_size; /* current unscaled horizontal size */
  222 + __u32 v_size; /* current unscaled veritcal size */
  223 + __u32 smpte_timecode; /* current SMPTE timecode (for current GOP) */
  224 + __u32 picture_type; /* current picture type */
  225 + __u32 temporal_reference; /* current temporal reference */
  226 + __u8 user_data[256]; /* user data last found in compressed stream */
  227 + /* user_data[0] contains user data flags, user_data[1] has count */
  228 +};
  229 +
  230 +/* generic structure for setting playback modes */
  231 +struct video_play_mode
  232 +{
  233 + int mode;
  234 + int p1;
  235 + int p2;
  236 +};
  237 +
  238 +/* for loading microcode / fpga programming */
  239 +struct video_code
  240 +{
  241 + char loadwhat[16]; /* name or tag of file being passed */
  242 + int datasize;
  243 + __u8 *data;
  244 +};
  245 +
  246 +#define VIDIOCGCAP _IOR('v',1,struct video_capability) /* Get capabilities */
  247 +#define VIDIOCGCHAN _IOWR('v',2,struct video_channel) /* Get channel info (sources) */
  248 +#define VIDIOCSCHAN _IOW('v',3,struct video_channel) /* Set channel */
  249 +#define VIDIOCGTUNER _IOWR('v',4,struct video_tuner) /* Get tuner abilities */
  250 +#define VIDIOCSTUNER _IOW('v',5,struct video_tuner) /* Tune the tuner for the current channel */
  251 +#define VIDIOCGPICT _IOR('v',6,struct video_picture) /* Get picture properties */
  252 +#define VIDIOCSPICT _IOW('v',7,struct video_picture) /* Set picture properties */
  253 +#define VIDIOCCAPTURE _IOW('v',8,int) /* Start, end capture */
  254 +#define VIDIOCGWIN _IOR('v',9, struct video_window) /* Get the video overlay window */
  255 +#define VIDIOCSWIN _IOW('v',10, struct video_window) /* Set the video overlay window - passes clip list for hardware smarts , chromakey etc */
  256 +#define VIDIOCGFBUF _IOR('v',11, struct video_buffer) /* Get frame buffer */
  257 +#define VIDIOCSFBUF _IOW('v',12, struct video_buffer) /* Set frame buffer - root only */
  258 +#define VIDIOCKEY _IOR('v',13, struct video_key) /* Video key event - to dev 255 is to all - cuts capture on all DMA windows with this key (0xFFFFFFFF == all) */
  259 +#define VIDIOCGFREQ _IOR('v',14, unsigned long) /* Set tuner */
  260 +#define VIDIOCSFREQ _IOW('v',15, unsigned long) /* Set tuner */
  261 +#define VIDIOCGAUDIO _IOR('v',16, struct video_audio) /* Get audio info */
  262 +#define VIDIOCSAUDIO _IOW('v',17, struct video_audio) /* Audio source, mute etc */
  263 +#define VIDIOCSYNC _IOW('v',18, int) /* Sync with mmap grabbing */
  264 +#define VIDIOCMCAPTURE _IOW('v',19, struct video_mmap) /* Grab frames */
  265 +#define VIDIOCGMBUF _IOR('v',20, struct video_mbuf) /* Memory map buffer info */
  266 +#define VIDIOCGUNIT _IOR('v',21, struct video_unit) /* Get attached units */
  267 +#define VIDIOCGCAPTURE _IOR('v',22, struct video_capture) /* Get subcapture */
  268 +#define VIDIOCSCAPTURE _IOW('v',23, struct video_capture) /* Set subcapture */
  269 +#define VIDIOCSPLAYMODE _IOW('v',24, struct video_play_mode) /* Set output video mode/feature */
  270 +#define VIDIOCSWRITEMODE _IOW('v',25, int) /* Set write mode */
  271 +#define VIDIOCGPLAYINFO _IOR('v',26, struct video_info) /* Get current playback info from hardware */
  272 +#define VIDIOCSMICROCODE _IOW('v',27, struct video_code) /* Load microcode into hardware */
  273 +#define VIDIOCGVBIFMT _IOR('v',28, struct vbi_format) /* Get VBI information */
  274 +#define VIDIOCSVBIFMT _IOW('v',29, struct vbi_format) /* Set VBI information */
  275 +
  276 +
  277 +#define BASE_VIDIOCPRIVATE 192 /* 192-255 are private */
  278 +
  279 +/* VIDIOCSWRITEMODE */
  280 +#define VID_WRITE_MPEG_AUD 0
  281 +#define VID_WRITE_MPEG_VID 1
  282 +#define VID_WRITE_OSD 2
  283 +#define VID_WRITE_TTX 3
  284 +#define VID_WRITE_CC 4
  285 +#define VID_WRITE_MJPEG 5
  286 +
  287 +/* VIDIOCSPLAYMODE */
  288 +#define VID_PLAY_VID_OUT_MODE 0
  289 + /* p1: = VIDEO_MODE_PAL, VIDEO_MODE_NTSC, etc ... */
  290 +#define VID_PLAY_GENLOCK 1
  291 + /* p1: 0 = OFF, 1 = ON */
  292 + /* p2: GENLOCK FINE DELAY value */
  293 +#define VID_PLAY_NORMAL 2
  294 +#define VID_PLAY_PAUSE 3
  295 +#define VID_PLAY_SINGLE_FRAME 4
  296 +#define VID_PLAY_FAST_FORWARD 5
  297 +#define VID_PLAY_SLOW_MOTION 6
  298 +#define VID_PLAY_IMMEDIATE_NORMAL 7
  299 +#define VID_PLAY_SWITCH_CHANNELS 8
  300 +#define VID_PLAY_FREEZE_FRAME 9
  301 +#define VID_PLAY_STILL_MODE 10
  302 +#define VID_PLAY_MASTER_MODE 11
  303 + /* p1: see below */
  304 +#define VID_PLAY_MASTER_NONE 1
  305 +#define VID_PLAY_MASTER_VIDEO 2
  306 +#define VID_PLAY_MASTER_AUDIO 3
  307 +#define VID_PLAY_ACTIVE_SCANLINES 12
  308 + /* p1 = first active; p2 = last active */
  309 +#define VID_PLAY_RESET 13
  310 +#define VID_PLAY_END_MARK 14
  311 +
  312 +#endif /* __LINUX_VIDEODEV_H */
  313 +
  314 +/*
  315 + * Local variables:
  316 + * c-basic-offset: 8
  317 + * End:
  318 + */
... ... @@ -42,7 +42,7 @@
42 42 #include <linux/tty.h>
43 43 #include <linux/vt_kern.h>
44 44 #include <linux/fb.h>
45   -#include <linux/videodev.h>
  45 +#include <linux/videodev2.h>
46 46 #include <linux/netdevice.h>
47 47 #include <linux/raw.h>
48 48 #include <linux/blkdev.h>
include/linux/Kbuild
... ... @@ -367,7 +367,6 @@
367 367 header-y += utsname.h
368 368 header-y += veth.h
369 369 header-y += vhost.h
370   -header-y += videodev.h
371 370 header-y += videodev2.h
372 371 header-y += virtio_9p.h
373 372 header-y += virtio_balloon.h
include/linux/videodev.h
1   -/*
2   - * Video for Linux version 1 - OBSOLETE
3   - *
4   - * Header file for v4l1 drivers and applications, for
5   - * Linux kernels 2.2.x or 2.4.x.
6   - *
7   - * Provides header for legacy drivers and applications
8   - *
9   - * See http://linuxtv.org for more info
10   - *
11   - */
12   -#ifndef __LINUX_VIDEODEV_H
13   -#define __LINUX_VIDEODEV_H
14   -
15   -#include <linux/types.h>
16   -#include <linux/ioctl.h>
17   -#include <linux/videodev2.h>
18   -
19   -#define VID_TYPE_CAPTURE 1 /* Can capture */
20   -#define VID_TYPE_TUNER 2 /* Can tune */
21   -#define VID_TYPE_TELETEXT 4 /* Does teletext */
22   -#define VID_TYPE_OVERLAY 8 /* Overlay onto frame buffer */
23   -#define VID_TYPE_CHROMAKEY 16 /* Overlay by chromakey */
24   -#define VID_TYPE_CLIPPING 32 /* Can clip */
25   -#define VID_TYPE_FRAMERAM 64 /* Uses the frame buffer memory */
26   -#define VID_TYPE_SCALES 128 /* Scalable */
27   -#define VID_TYPE_MONOCHROME 256 /* Monochrome only */
28   -#define VID_TYPE_SUBCAPTURE 512 /* Can capture subareas of the image */
29   -#define VID_TYPE_MPEG_DECODER 1024 /* Can decode MPEG streams */
30   -#define VID_TYPE_MPEG_ENCODER 2048 /* Can encode MPEG streams */
31   -#define VID_TYPE_MJPEG_DECODER 4096 /* Can decode MJPEG streams */
32   -#define VID_TYPE_MJPEG_ENCODER 8192 /* Can encode MJPEG streams */
33   -
34   -struct video_capability
35   -{
36   - char name[32];
37   - int type;
38   - int channels; /* Num channels */
39   - int audios; /* Num audio devices */
40   - int maxwidth; /* Supported width */
41   - int maxheight; /* And height */
42   - int minwidth; /* Supported width */
43   - int minheight; /* And height */
44   -};
45   -
46   -
47   -struct video_channel
48   -{
49   - int channel;
50   - char name[32];
51   - int tuners;
52   - __u32 flags;
53   -#define VIDEO_VC_TUNER 1 /* Channel has a tuner */
54   -#define VIDEO_VC_AUDIO 2 /* Channel has audio */
55   - __u16 type;
56   -#define VIDEO_TYPE_TV 1
57   -#define VIDEO_TYPE_CAMERA 2
58   - __u16 norm; /* Norm set by channel */
59   -};
60   -
61   -struct video_tuner
62   -{
63   - int tuner;
64   - char name[32];
65   - unsigned long rangelow, rangehigh; /* Tuner range */
66   - __u32 flags;
67   -#define VIDEO_TUNER_PAL 1
68   -#define VIDEO_TUNER_NTSC 2
69   -#define VIDEO_TUNER_SECAM 4
70   -#define VIDEO_TUNER_LOW 8 /* Uses KHz not MHz */
71   -#define VIDEO_TUNER_NORM 16 /* Tuner can set norm */
72   -#define VIDEO_TUNER_STEREO_ON 128 /* Tuner is seeing stereo */
73   -#define VIDEO_TUNER_RDS_ON 256 /* Tuner is seeing an RDS datastream */
74   -#define VIDEO_TUNER_MBS_ON 512 /* Tuner is seeing an MBS datastream */
75   - __u16 mode; /* PAL/NTSC/SECAM/OTHER */
76   -#define VIDEO_MODE_PAL 0
77   -#define VIDEO_MODE_NTSC 1
78   -#define VIDEO_MODE_SECAM 2
79   -#define VIDEO_MODE_AUTO 3
80   - __u16 signal; /* Signal strength 16bit scale */
81   -};
82   -
83   -struct video_picture
84   -{
85   - __u16 brightness;
86   - __u16 hue;
87   - __u16 colour;
88   - __u16 contrast;
89   - __u16 whiteness; /* Black and white only */
90   - __u16 depth; /* Capture depth */
91   - __u16 palette; /* Palette in use */
92   -#define VIDEO_PALETTE_GREY 1 /* Linear greyscale */
93   -#define VIDEO_PALETTE_HI240 2 /* High 240 cube (BT848) */
94   -#define VIDEO_PALETTE_RGB565 3 /* 565 16 bit RGB */
95   -#define VIDEO_PALETTE_RGB24 4 /* 24bit RGB */
96   -#define VIDEO_PALETTE_RGB32 5 /* 32bit RGB */
97   -#define VIDEO_PALETTE_RGB555 6 /* 555 15bit RGB */
98   -#define VIDEO_PALETTE_YUV422 7 /* YUV422 capture */
99   -#define VIDEO_PALETTE_YUYV 8
100   -#define VIDEO_PALETTE_UYVY 9 /* The great thing about standards is ... */
101   -#define VIDEO_PALETTE_YUV420 10
102   -#define VIDEO_PALETTE_YUV411 11 /* YUV411 capture */
103   -#define VIDEO_PALETTE_RAW 12 /* RAW capture (BT848) */
104   -#define VIDEO_PALETTE_YUV422P 13 /* YUV 4:2:2 Planar */
105   -#define VIDEO_PALETTE_YUV411P 14 /* YUV 4:1:1 Planar */
106   -#define VIDEO_PALETTE_YUV420P 15 /* YUV 4:2:0 Planar */
107   -#define VIDEO_PALETTE_YUV410P 16 /* YUV 4:1:0 Planar */
108   -#define VIDEO_PALETTE_PLANAR 13 /* start of planar entries */
109   -#define VIDEO_PALETTE_COMPONENT 7 /* start of component entries */
110   -};
111   -
112   -struct video_audio
113   -{
114   - int audio; /* Audio channel */
115   - __u16 volume; /* If settable */
116   - __u16 bass, treble;
117   - __u32 flags;
118   -#define VIDEO_AUDIO_MUTE 1
119   -#define VIDEO_AUDIO_MUTABLE 2
120   -#define VIDEO_AUDIO_VOLUME 4
121   -#define VIDEO_AUDIO_BASS 8
122   -#define VIDEO_AUDIO_TREBLE 16
123   -#define VIDEO_AUDIO_BALANCE 32
124   - char name[16];
125   -#define VIDEO_SOUND_MONO 1
126   -#define VIDEO_SOUND_STEREO 2
127   -#define VIDEO_SOUND_LANG1 4
128   -#define VIDEO_SOUND_LANG2 8
129   - __u16 mode;
130   - __u16 balance; /* Stereo balance */
131   - __u16 step; /* Step actual volume uses */
132   -};
133   -
134   -struct video_clip
135   -{
136   - __s32 x,y;
137   - __s32 width, height;
138   - struct video_clip *next; /* For user use/driver use only */
139   -};
140   -
141   -struct video_window
142   -{
143   - __u32 x,y; /* Position of window */
144   - __u32 width,height; /* Its size */
145   - __u32 chromakey;
146   - __u32 flags;
147   - struct video_clip __user *clips; /* Set only */
148   - int clipcount;
149   -#define VIDEO_WINDOW_INTERLACE 1
150   -#define VIDEO_WINDOW_CHROMAKEY 16 /* Overlay by chromakey */
151   -#define VIDEO_CLIP_BITMAP -1
152   -/* bitmap is 1024x625, a '1' bit represents a clipped pixel */
153   -#define VIDEO_CLIPMAP_SIZE (128 * 625)
154   -};
155   -
156   -struct video_capture
157   -{
158   - __u32 x,y; /* Offsets into image */
159   - __u32 width, height; /* Area to capture */
160   - __u16 decimation; /* Decimation divider */
161   - __u16 flags; /* Flags for capture */
162   -#define VIDEO_CAPTURE_ODD 0 /* Temporal */
163   -#define VIDEO_CAPTURE_EVEN 1
164   -};
165   -
166   -struct video_buffer
167   -{
168   - void *base;
169   - int height,width;
170   - int depth;
171   - int bytesperline;
172   -};
173   -
174   -struct video_mmap
175   -{
176   - unsigned int frame; /* Frame (0 - n) for double buffer */
177   - int height,width;
178   - unsigned int format; /* should be VIDEO_PALETTE_* */
179   -};
180   -
181   -struct video_key
182   -{
183   - __u8 key[8];
184   - __u32 flags;
185   -};
186   -
187   -struct video_mbuf
188   -{
189   - int size; /* Total memory to map */
190   - int frames; /* Frames */
191   - int offsets[VIDEO_MAX_FRAME];
192   -};
193   -
194   -#define VIDEO_NO_UNIT (-1)
195   -
196   -struct video_unit
197   -{
198   - int video; /* Video minor */
199   - int vbi; /* VBI minor */
200   - int radio; /* Radio minor */
201   - int audio; /* Audio minor */
202   - int teletext; /* Teletext minor */
203   -};
204   -
205   -struct vbi_format {
206   - __u32 sampling_rate; /* in Hz */
207   - __u32 samples_per_line;
208   - __u32 sample_format; /* VIDEO_PALETTE_RAW only (1 byte) */
209   - __s32 start[2]; /* starting line for each frame */
210   - __u32 count[2]; /* count of lines for each frame */
211   - __u32 flags;
212   -#define VBI_UNSYNC 1 /* can distingues between top/bottom field */
213   -#define VBI_INTERLACED 2 /* lines are interlaced */
214   -};
215   -
216   -/* video_info is biased towards hardware mpeg encode/decode */
217   -/* but it could apply generically to any hardware compressor/decompressor */
218   -struct video_info
219   -{
220   - __u32 frame_count; /* frames output since decode/encode began */
221   - __u32 h_size; /* current unscaled horizontal size */
222   - __u32 v_size; /* current unscaled veritcal size */
223   - __u32 smpte_timecode; /* current SMPTE timecode (for current GOP) */
224   - __u32 picture_type; /* current picture type */
225   - __u32 temporal_reference; /* current temporal reference */
226   - __u8 user_data[256]; /* user data last found in compressed stream */
227   - /* user_data[0] contains user data flags, user_data[1] has count */
228   -};
229   -
230   -/* generic structure for setting playback modes */
231   -struct video_play_mode
232   -{
233   - int mode;
234   - int p1;
235   - int p2;
236   -};
237   -
238   -/* for loading microcode / fpga programming */
239   -struct video_code
240   -{
241   - char loadwhat[16]; /* name or tag of file being passed */
242   - int datasize;
243   - __u8 *data;
244   -};
245   -
246   -#define VIDIOCGCAP _IOR('v',1,struct video_capability) /* Get capabilities */
247   -#define VIDIOCGCHAN _IOWR('v',2,struct video_channel) /* Get channel info (sources) */
248   -#define VIDIOCSCHAN _IOW('v',3,struct video_channel) /* Set channel */
249   -#define VIDIOCGTUNER _IOWR('v',4,struct video_tuner) /* Get tuner abilities */
250   -#define VIDIOCSTUNER _IOW('v',5,struct video_tuner) /* Tune the tuner for the current channel */
251   -#define VIDIOCGPICT _IOR('v',6,struct video_picture) /* Get picture properties */
252   -#define VIDIOCSPICT _IOW('v',7,struct video_picture) /* Set picture properties */
253   -#define VIDIOCCAPTURE _IOW('v',8,int) /* Start, end capture */
254   -#define VIDIOCGWIN _IOR('v',9, struct video_window) /* Get the video overlay window */
255   -#define VIDIOCSWIN _IOW('v',10, struct video_window) /* Set the video overlay window - passes clip list for hardware smarts , chromakey etc */
256   -#define VIDIOCGFBUF _IOR('v',11, struct video_buffer) /* Get frame buffer */
257   -#define VIDIOCSFBUF _IOW('v',12, struct video_buffer) /* Set frame buffer - root only */
258   -#define VIDIOCKEY _IOR('v',13, struct video_key) /* Video key event - to dev 255 is to all - cuts capture on all DMA windows with this key (0xFFFFFFFF == all) */
259   -#define VIDIOCGFREQ _IOR('v',14, unsigned long) /* Set tuner */
260   -#define VIDIOCSFREQ _IOW('v',15, unsigned long) /* Set tuner */
261   -#define VIDIOCGAUDIO _IOR('v',16, struct video_audio) /* Get audio info */
262   -#define VIDIOCSAUDIO _IOW('v',17, struct video_audio) /* Audio source, mute etc */
263   -#define VIDIOCSYNC _IOW('v',18, int) /* Sync with mmap grabbing */
264   -#define VIDIOCMCAPTURE _IOW('v',19, struct video_mmap) /* Grab frames */
265   -#define VIDIOCGMBUF _IOR('v',20, struct video_mbuf) /* Memory map buffer info */
266   -#define VIDIOCGUNIT _IOR('v',21, struct video_unit) /* Get attached units */
267   -#define VIDIOCGCAPTURE _IOR('v',22, struct video_capture) /* Get subcapture */
268   -#define VIDIOCSCAPTURE _IOW('v',23, struct video_capture) /* Set subcapture */
269   -#define VIDIOCSPLAYMODE _IOW('v',24, struct video_play_mode) /* Set output video mode/feature */
270   -#define VIDIOCSWRITEMODE _IOW('v',25, int) /* Set write mode */
271   -#define VIDIOCGPLAYINFO _IOR('v',26, struct video_info) /* Get current playback info from hardware */
272   -#define VIDIOCSMICROCODE _IOW('v',27, struct video_code) /* Load microcode into hardware */
273   -#define VIDIOCGVBIFMT _IOR('v',28, struct vbi_format) /* Get VBI information */
274   -#define VIDIOCSVBIFMT _IOW('v',29, struct vbi_format) /* Set VBI information */
275   -
276   -
277   -#define BASE_VIDIOCPRIVATE 192 /* 192-255 are private */
278   -
279   -/* VIDIOCSWRITEMODE */
280   -#define VID_WRITE_MPEG_AUD 0
281   -#define VID_WRITE_MPEG_VID 1
282   -#define VID_WRITE_OSD 2
283   -#define VID_WRITE_TTX 3
284   -#define VID_WRITE_CC 4
285   -#define VID_WRITE_MJPEG 5
286   -
287   -/* VIDIOCSPLAYMODE */
288   -#define VID_PLAY_VID_OUT_MODE 0
289   - /* p1: = VIDEO_MODE_PAL, VIDEO_MODE_NTSC, etc ... */
290   -#define VID_PLAY_GENLOCK 1
291   - /* p1: 0 = OFF, 1 = ON */
292   - /* p2: GENLOCK FINE DELAY value */
293   -#define VID_PLAY_NORMAL 2
294   -#define VID_PLAY_PAUSE 3
295   -#define VID_PLAY_SINGLE_FRAME 4
296   -#define VID_PLAY_FAST_FORWARD 5
297   -#define VID_PLAY_SLOW_MOTION 6
298   -#define VID_PLAY_IMMEDIATE_NORMAL 7
299   -#define VID_PLAY_SWITCH_CHANNELS 8
300   -#define VID_PLAY_FREEZE_FRAME 9
301   -#define VID_PLAY_STILL_MODE 10
302   -#define VID_PLAY_MASTER_MODE 11
303   - /* p1: see below */
304   -#define VID_PLAY_MASTER_NONE 1
305   -#define VID_PLAY_MASTER_VIDEO 2
306   -#define VID_PLAY_MASTER_AUDIO 3
307   -#define VID_PLAY_ACTIVE_SCANLINES 12
308   - /* p1 = first active; p2 = last active */
309   -#define VID_PLAY_RESET 13
310   -#define VID_PLAY_END_MARK 14
311   -
312   -#endif /* __LINUX_VIDEODEV_H */
313   -
314   -/*
315   - * Local variables:
316   - * c-basic-offset: 8
317   - * End:
318   - */
include/media/ovcamchip.h
1   -/* OmniVision* camera chip driver API
2   - *
3   - * Copyright (c) 1999-2004 Mark McClelland
4   - *
5   - * This program is free software; you can redistribute it and/or modify it
6   - * under the terms of the GNU General Public License as published by the
7   - * Free Software Foundation; either version 2 of the License, or (at your
8   - * option) any later version. NO WARRANTY OF ANY KIND is expressed or implied.
9   - *
10   - * * OmniVision is a trademark of OmniVision Technologies, Inc. This driver
11   - * is not sponsored or developed by them.
12   - */
13   -
14   -#ifndef __LINUX_OVCAMCHIP_H
15   -#define __LINUX_OVCAMCHIP_H
16   -
17   -#include <linux/videodev.h>
18   -#include <media/v4l2-common.h>
19   -
20   -/* --------------------------------- */
21   -/* ENUMERATIONS */
22   -/* --------------------------------- */
23   -
24   -/* Controls */
25   -enum {
26   - OVCAMCHIP_CID_CONT, /* Contrast */
27   - OVCAMCHIP_CID_BRIGHT, /* Brightness */
28   - OVCAMCHIP_CID_SAT, /* Saturation */
29   - OVCAMCHIP_CID_HUE, /* Hue */
30   - OVCAMCHIP_CID_EXP, /* Exposure */
31   - OVCAMCHIP_CID_FREQ, /* Light frequency */
32   - OVCAMCHIP_CID_BANDFILT, /* Banding filter */
33   - OVCAMCHIP_CID_AUTOBRIGHT, /* Auto brightness */
34   - OVCAMCHIP_CID_AUTOEXP, /* Auto exposure */
35   - OVCAMCHIP_CID_BACKLIGHT, /* Back light compensation */
36   - OVCAMCHIP_CID_MIRROR, /* Mirror horizontally */
37   -};
38   -
39   -/* Chip types */
40   -#define NUM_CC_TYPES 9
41   -enum {
42   - CC_UNKNOWN,
43   - CC_OV76BE,
44   - CC_OV7610,
45   - CC_OV7620,
46   - CC_OV7620AE,
47   - CC_OV6620,
48   - CC_OV6630,
49   - CC_OV6630AE,
50   - CC_OV6630AF,
51   -};
52   -
53   -/* --------------------------------- */
54   -/* I2C ADDRESSES */
55   -/* --------------------------------- */
56   -
57   -#define OV7xx0_SID (0x42 >> 1)
58   -#define OV6xx0_SID (0xC0 >> 1)
59   -
60   -/* --------------------------------- */
61   -/* API */
62   -/* --------------------------------- */
63   -
64   -struct ovcamchip_control {
65   - __u32 id;
66   - __s32 value;
67   -};
68   -
69   -struct ovcamchip_window {
70   - int x;
71   - int y;
72   - int width;
73   - int height;
74   - int format;
75   - int quarter; /* Scale width and height down 2x */
76   -
77   - /* This stuff will be removed eventually */
78   - int clockdiv; /* Clock divisor setting */
79   -};
80   -
81   -/* Commands */
82   -#define OVCAMCHIP_CMD_Q_SUBTYPE _IOR (0x88, 0x00, int)
83   -#define OVCAMCHIP_CMD_INITIALIZE _IOW (0x88, 0x01, int)
84   -/* You must call OVCAMCHIP_CMD_INITIALIZE before any of commands below! */
85   -#define OVCAMCHIP_CMD_S_CTRL _IOW (0x88, 0x02, struct ovcamchip_control)
86   -#define OVCAMCHIP_CMD_G_CTRL _IOWR (0x88, 0x03, struct ovcamchip_control)
87   -#define OVCAMCHIP_CMD_S_MODE _IOW (0x88, 0x04, struct ovcamchip_window)
88   -#define OVCAMCHIP_MAX_CMD _IO (0x88, 0x3f)
89   -
90   -#endif