aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-04-27 17:18:45 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-04-27 17:18:45 -0400
commitaa5bc2b58e3344da57f26b62e99e13e91c9e0a94 (patch)
treec6e9ea1b3ee8af88b3a050b3fba160ea2f77e404 /include/linux
parentd868772fff6c4b881d66af8640251714e1aefa98 (diff)
parentd455cf5d0db9e3eb1b204cd4a61d8c5ccfe4305f (diff)
Merge branch 'master' of ssh://master.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb
* 'master' of ssh://master.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb: (184 commits) V4L/DVB (5563): Radio-maestro.c Replace radio_ioctl to use video_ioctl2 V4L/DVB (5562): Radio-gemtek-pci.c Replace gemtek_pci_ioctl to use video_ioctl2 V4L/DVB (5560): Ivtv: fix incorrect bitwise-and for command flags. V4L/DVB (5558): Opera: use 7-bit i2c addresses V4L/DVB (5557): Cafe_ccic: check return value of pci_enable_device V4L/DVB (5556): Radio-gemtek.c Replace gemtek_ioctl to use video_ioctl2 V4L/DVB (5555): Radio-aimslab.c Replace rt_ioctl to use video_ioctl2 V4L/DVB (5554): Fix: vidioc_g_parm were not zeroing the memory V4L/DVB (5553): Replace typhoon_do_ioctl to use video_ioctl2 V4L/DVB (5552): Plan-b: Switch to refcounting PCI API V4L/DVB (5551): Plan-b: header change V4L/DVB (5550): Radio-sf16fmi.c Replace fmi_do_ioctl to use video_ioctl2 V4L/DVB (5549): Radio-sf16fmr2.c Replace fmr2_do_ioctl to use video_ioctl2 V4L/DVB (5548): Fix v4l2 buffer to the length V4L/DVB (5547): Add ENUM_FRAMESIZES and ENUM_FRAMEINTERVALS ioctls V4L/DVB (5546): Radio-terratec.c Replace tt_do_ioctl to use video_ioctl2 V4L/DVB (5545): Saa7146: Release capture buffers on device close V4L/DVB (5544): Budget-av: Make inversion setting configurable, add KNC ONE V1.0 card V4L/DVB (5543): Tda10023: Add support for frontend TDA10023 V4L/DVB (5542): Budget-av: Remove polarity switching of the clock for DVB-C ...
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/dvb/audio.h5
-rw-r--r--include/linux/dvb/version.h2
-rw-r--r--include/linux/dvb/video.h62
-rw-r--r--include/linux/videodev2.h83
4 files changed, 128 insertions, 24 deletions
diff --git a/include/linux/dvb/audio.h b/include/linux/dvb/audio.h
index 0874a67c6b92..89412e18f571 100644
--- a/include/linux/dvb/audio.h
+++ b/include/linux/dvb/audio.h
@@ -47,7 +47,9 @@ typedef enum {
47typedef enum { 47typedef enum {
48 AUDIO_STEREO, 48 AUDIO_STEREO,
49 AUDIO_MONO_LEFT, 49 AUDIO_MONO_LEFT,
50 AUDIO_MONO_RIGHT 50 AUDIO_MONO_RIGHT,
51 AUDIO_MONO,
52 AUDIO_STEREO_SWAPPED
51} audio_channel_select_t; 53} audio_channel_select_t;
52 54
53 55
@@ -133,5 +135,6 @@ typedef uint16_t audio_attributes_t;
133 * extracted by the PES parser. 135 * extracted by the PES parser.
134 */ 136 */
135#define AUDIO_GET_PTS _IOR('o', 19, __u64) 137#define AUDIO_GET_PTS _IOR('o', 19, __u64)
138#define AUDIO_BILINGUAL_CHANNEL_SELECT _IO('o', 20)
136 139
137#endif /* _DVBAUDIO_H_ */ 140#endif /* _DVBAUDIO_H_ */
diff --git a/include/linux/dvb/version.h b/include/linux/dvb/version.h
index 6183c9c4849e..126e0c26cb09 100644
--- a/include/linux/dvb/version.h
+++ b/include/linux/dvb/version.h
@@ -24,6 +24,6 @@
24#define _DVBVERSION_H_ 24#define _DVBVERSION_H_
25 25
26#define DVB_API_VERSION 3 26#define DVB_API_VERSION 3
27#define DVB_API_VERSION_MINOR 1 27#define DVB_API_VERSION_MINOR 2
28 28
29#endif /*_DVBVERSION_H_*/ 29#endif /*_DVBVERSION_H_*/
diff --git a/include/linux/dvb/video.h b/include/linux/dvb/video.h
index faebfda397ff..93e4c3a6d190 100644
--- a/include/linux/dvb/video.h
+++ b/include/linux/dvb/video.h
@@ -80,14 +80,70 @@ typedef enum {
80} video_play_state_t; 80} video_play_state_t;
81 81
82 82
83/* Decoder commands */
84#define VIDEO_CMD_PLAY (0)
85#define VIDEO_CMD_STOP (1)
86#define VIDEO_CMD_FREEZE (2)
87#define VIDEO_CMD_CONTINUE (3)
88
89/* Flags for VIDEO_CMD_FREEZE */
90#define VIDEO_CMD_FREEZE_TO_BLACK (1 << 0)
91
92/* Flags for VIDEO_CMD_STOP */
93#define VIDEO_CMD_STOP_TO_BLACK (1 << 0)
94#define VIDEO_CMD_STOP_IMMEDIATELY (1 << 1)
95
96/* Play input formats: */
97/* The decoder has no special format requirements */
98#define VIDEO_PLAY_FMT_NONE (0)
99/* The decoder requires full GOPs */
100#define VIDEO_PLAY_FMT_GOP (1)
101
102/* The structure must be zeroed before use by the application
103 This ensures it can be extended safely in the future. */
104struct video_command {
105 __u32 cmd;
106 __u32 flags;
107 union {
108 struct {
109 __u64 pts;
110 } stop;
111
112 struct {
113 /* 0 or 1000 specifies normal speed,
114 1 specifies forward single stepping,
115 -1 specifies backward single stepping,
116 >1: playback at speed/1000 of the normal speed,
117 <-1: reverse playback at (-speed/1000) of the normal speed. */
118 __s32 speed;
119 __u32 format;
120 } play;
121
122 struct {
123 __u32 data[16];
124 } raw;
125 };
126};
127
128/* FIELD_UNKNOWN can be used if the hardware does not know whether
129 the Vsync is for an odd, even or progressive (i.e. non-interlaced)
130 field. */
131#define VIDEO_VSYNC_FIELD_UNKNOWN (0)
132#define VIDEO_VSYNC_FIELD_ODD (1)
133#define VIDEO_VSYNC_FIELD_EVEN (2)
134#define VIDEO_VSYNC_FIELD_PROGRESSIVE (3)
135
83struct video_event { 136struct video_event {
84 int32_t type; 137 int32_t type;
85#define VIDEO_EVENT_SIZE_CHANGED 1 138#define VIDEO_EVENT_SIZE_CHANGED 1
86#define VIDEO_EVENT_FRAME_RATE_CHANGED 2 139#define VIDEO_EVENT_FRAME_RATE_CHANGED 2
140#define VIDEO_EVENT_DECODER_STOPPED 3
141#define VIDEO_EVENT_VSYNC 4
87 time_t timestamp; 142 time_t timestamp;
88 union { 143 union {
89 video_size_t size; 144 video_size_t size;
90 unsigned int frame_rate; /* in frames per 1000sec */ 145 unsigned int frame_rate; /* in frames per 1000sec */
146 unsigned char vsync_field; /* unknown/odd/even/progressive */
91 } u; 147 } u;
92}; 148};
93 149
@@ -213,4 +269,10 @@ typedef uint16_t video_attributes_t;
213 */ 269 */
214#define VIDEO_GET_PTS _IOR('o', 57, __u64) 270#define VIDEO_GET_PTS _IOR('o', 57, __u64)
215 271
272/* Read the number of displayed frames since the decoder was started */
273#define VIDEO_GET_FRAME_COUNT _IOR('o', 58, __u64)
274
275#define VIDEO_COMMAND _IOWR('o', 59, struct video_command)
276#define VIDEO_TRY_COMMAND _IOWR('o', 60, struct video_command)
277
216#endif /*_DVBVIDEO_H_*/ 278#endif /*_DVBVIDEO_H_*/
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h
index 441b877bf150..a25c2afa67e1 100644
--- a/include/linux/videodev2.h
+++ b/include/linux/videodev2.h
@@ -96,44 +96,60 @@
96 * E N U M S 96 * E N U M S
97 */ 97 */
98enum v4l2_field { 98enum v4l2_field {
99 V4L2_FIELD_ANY = 0, /* driver can choose from none, 99 V4L2_FIELD_ANY = 0, /* driver can choose from none,
100 top, bottom, interlaced 100 top, bottom, interlaced
101 depending on whatever it thinks 101 depending on whatever it thinks
102 is approximate ... */ 102 is approximate ... */
103 V4L2_FIELD_NONE = 1, /* this device has no fields ... */ 103 V4L2_FIELD_NONE = 1, /* this device has no fields ... */
104 V4L2_FIELD_TOP = 2, /* top field only */ 104 V4L2_FIELD_TOP = 2, /* top field only */
105 V4L2_FIELD_BOTTOM = 3, /* bottom field only */ 105 V4L2_FIELD_BOTTOM = 3, /* bottom field only */
106 V4L2_FIELD_INTERLACED = 4, /* both fields interlaced */ 106 V4L2_FIELD_INTERLACED = 4, /* both fields interlaced */
107 V4L2_FIELD_SEQ_TB = 5, /* both fields sequential into one 107 V4L2_FIELD_SEQ_TB = 5, /* both fields sequential into one
108 buffer, top-bottom order */ 108 buffer, top-bottom order */
109 V4L2_FIELD_SEQ_BT = 6, /* same as above + bottom-top order */ 109 V4L2_FIELD_SEQ_BT = 6, /* same as above + bottom-top order */
110 V4L2_FIELD_ALTERNATE = 7, /* both fields alternating into 110 V4L2_FIELD_ALTERNATE = 7, /* both fields alternating into
111 separate buffers */ 111 separate buffers */
112 V4L2_FIELD_INTERLACED_TB = 8, /* both fields interlaced, top field
113 first and the top field is
114 transmitted first */
115 V4L2_FIELD_INTERLACED_BT = 9, /* both fields interlaced, top field
116 first and the bottom field is
117 transmitted first */
112}; 118};
113#define V4L2_FIELD_HAS_TOP(field) \ 119#define V4L2_FIELD_HAS_TOP(field) \
114 ((field) == V4L2_FIELD_TOP ||\ 120 ((field) == V4L2_FIELD_TOP ||\
115 (field) == V4L2_FIELD_INTERLACED ||\ 121 (field) == V4L2_FIELD_INTERLACED ||\
122 (field) == V4L2_FIELD_INTERLACED_TB ||\
123 (field) == V4L2_FIELD_INTERLACED_BT ||\
116 (field) == V4L2_FIELD_SEQ_TB ||\ 124 (field) == V4L2_FIELD_SEQ_TB ||\
117 (field) == V4L2_FIELD_SEQ_BT) 125 (field) == V4L2_FIELD_SEQ_BT)
118#define V4L2_FIELD_HAS_BOTTOM(field) \ 126#define V4L2_FIELD_HAS_BOTTOM(field) \
119 ((field) == V4L2_FIELD_BOTTOM ||\ 127 ((field) == V4L2_FIELD_BOTTOM ||\
120 (field) == V4L2_FIELD_INTERLACED ||\ 128 (field) == V4L2_FIELD_INTERLACED ||\
129 (field) == V4L2_FIELD_INTERLACED_TB ||\
130 (field) == V4L2_FIELD_INTERLACED_BT ||\
121 (field) == V4L2_FIELD_SEQ_TB ||\ 131 (field) == V4L2_FIELD_SEQ_TB ||\
122 (field) == V4L2_FIELD_SEQ_BT) 132 (field) == V4L2_FIELD_SEQ_BT)
123#define V4L2_FIELD_HAS_BOTH(field) \ 133#define V4L2_FIELD_HAS_BOTH(field) \
124 ((field) == V4L2_FIELD_INTERLACED ||\ 134 ((field) == V4L2_FIELD_INTERLACED ||\
125 (field) == V4L2_FIELD_SEQ_TB ||\ 135 (field) == V4L2_FIELD_INTERLACED_TB ||\
136 (field) == V4L2_FIELD_INTERLACED_BT ||\
137 (field) == V4L2_FIELD_SEQ_TB ||\
126 (field) == V4L2_FIELD_SEQ_BT) 138 (field) == V4L2_FIELD_SEQ_BT)
127 139
128enum v4l2_buf_type { 140enum v4l2_buf_type {
129 V4L2_BUF_TYPE_VIDEO_CAPTURE = 1, 141 V4L2_BUF_TYPE_VIDEO_CAPTURE = 1,
130 V4L2_BUF_TYPE_VIDEO_OUTPUT = 2, 142 V4L2_BUF_TYPE_VIDEO_OUTPUT = 2,
131 V4L2_BUF_TYPE_VIDEO_OVERLAY = 3, 143 V4L2_BUF_TYPE_VIDEO_OVERLAY = 3,
132 V4L2_BUF_TYPE_VBI_CAPTURE = 4, 144 V4L2_BUF_TYPE_VBI_CAPTURE = 4,
133 V4L2_BUF_TYPE_VBI_OUTPUT = 5, 145 V4L2_BUF_TYPE_VBI_OUTPUT = 5,
134 V4L2_BUF_TYPE_SLICED_VBI_CAPTURE = 6, 146 V4L2_BUF_TYPE_SLICED_VBI_CAPTURE = 6,
135 V4L2_BUF_TYPE_SLICED_VBI_OUTPUT = 7, 147 V4L2_BUF_TYPE_SLICED_VBI_OUTPUT = 7,
136 V4L2_BUF_TYPE_PRIVATE = 0x80, 148#if 1
149 /* Experimental */
150 V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY = 8,
151#endif
152 V4L2_BUF_TYPE_PRIVATE = 0x80,
137}; 153};
138 154
139enum v4l2_ctrl_type { 155enum v4l2_ctrl_type {
@@ -227,6 +243,8 @@ struct v4l2_capability
227#define V4L2_CAP_SLICED_VBI_CAPTURE 0x00000040 /* Is a sliced VBI capture device */ 243#define V4L2_CAP_SLICED_VBI_CAPTURE 0x00000040 /* Is a sliced VBI capture device */
228#define V4L2_CAP_SLICED_VBI_OUTPUT 0x00000080 /* Is a sliced VBI output device */ 244#define V4L2_CAP_SLICED_VBI_OUTPUT 0x00000080 /* Is a sliced VBI output device */
229#define V4L2_CAP_RDS_CAPTURE 0x00000100 /* RDS data capture */ 245#define V4L2_CAP_RDS_CAPTURE 0x00000100 /* RDS data capture */
246#define V4L2_CAP_VIDEO_OUTPUT_POS 0x00000200 /* Video output can have x,y coords */
247#define V4L2_CAP_VIDEO_OUTPUT_OVERLAY 0x00000400 /* Can do video output overlay */
230 248
231#define V4L2_CAP_TUNER 0x00010000 /* has a tuner */ 249#define V4L2_CAP_TUNER 0x00010000 /* has a tuner */
232#define V4L2_CAP_AUDIO 0x00020000 /* has audio support */ 250#define V4L2_CAP_AUDIO 0x00020000 /* has audio support */
@@ -249,6 +267,8 @@ struct v4l2_pix_format
249 __u32 sizeimage; 267 __u32 sizeimage;
250 enum v4l2_colorspace colorspace; 268 enum v4l2_colorspace colorspace;
251 __u32 priv; /* private data, depends on pixelformat */ 269 __u32 priv; /* private data, depends on pixelformat */
270 __u32 left; /* only valid if V4L2_CAP_VIDEO_OUTPUT_POS is set */
271 __u32 top; /* only valid if V4L2_CAP_VIDEO_OUTPUT_POS is set */
252}; 272};
253 273
254/* Pixel format FOURCC depth Description */ 274/* Pixel format FOURCC depth Description */
@@ -596,10 +616,14 @@ struct v4l2_framebuffer
596#define V4L2_FBUF_CAP_CHROMAKEY 0x0002 616#define V4L2_FBUF_CAP_CHROMAKEY 0x0002
597#define V4L2_FBUF_CAP_LIST_CLIPPING 0x0004 617#define V4L2_FBUF_CAP_LIST_CLIPPING 0x0004
598#define V4L2_FBUF_CAP_BITMAP_CLIPPING 0x0008 618#define V4L2_FBUF_CAP_BITMAP_CLIPPING 0x0008
619#define V4L2_FBUF_CAP_LOCAL_ALPHA 0x0010
620#define V4L2_FBUF_CAP_GLOBAL_ALPHA 0x0020
599/* Flags for the 'flags' field. */ 621/* Flags for the 'flags' field. */
600#define V4L2_FBUF_FLAG_PRIMARY 0x0001 622#define V4L2_FBUF_FLAG_PRIMARY 0x0001
601#define V4L2_FBUF_FLAG_OVERLAY 0x0002 623#define V4L2_FBUF_FLAG_OVERLAY 0x0002
602#define V4L2_FBUF_FLAG_CHROMAKEY 0x0004 624#define V4L2_FBUF_FLAG_CHROMAKEY 0x0004
625#define V4L2_FBUF_FLAG_LOCAL_ALPHA 0x0008
626#define V4L2_FBUF_FLAG_GLOBAL_ALPHA 0x0010
603 627
604struct v4l2_clip 628struct v4l2_clip
605{ 629{
@@ -615,6 +639,7 @@ struct v4l2_window
615 struct v4l2_clip __user *clips; 639 struct v4l2_clip __user *clips;
616 __u32 clipcount; 640 __u32 clipcount;
617 void __user *bitmap; 641 void __user *bitmap;
642 __u8 global_alpha;
618}; 643};
619 644
620/* 645/*
@@ -1037,6 +1062,7 @@ enum v4l2_mpeg_audio_crc {
1037 V4L2_MPEG_AUDIO_CRC_NONE = 0, 1062 V4L2_MPEG_AUDIO_CRC_NONE = 0,
1038 V4L2_MPEG_AUDIO_CRC_CRC16 = 1, 1063 V4L2_MPEG_AUDIO_CRC_CRC16 = 1,
1039}; 1064};
1065#define V4L2_CID_MPEG_AUDIO_MUTE (V4L2_CID_MPEG_BASE+109)
1040 1066
1041/* MPEG video */ 1067/* MPEG video */
1042#define V4L2_CID_MPEG_VIDEO_ENCODING (V4L2_CID_MPEG_BASE+200) 1068#define V4L2_CID_MPEG_VIDEO_ENCODING (V4L2_CID_MPEG_BASE+200)
@@ -1063,6 +1089,8 @@ enum v4l2_mpeg_video_bitrate_mode {
1063#define V4L2_CID_MPEG_VIDEO_BITRATE (V4L2_CID_MPEG_BASE+207) 1089#define V4L2_CID_MPEG_VIDEO_BITRATE (V4L2_CID_MPEG_BASE+207)
1064#define V4L2_CID_MPEG_VIDEO_BITRATE_PEAK (V4L2_CID_MPEG_BASE+208) 1090#define V4L2_CID_MPEG_VIDEO_BITRATE_PEAK (V4L2_CID_MPEG_BASE+208)
1065#define V4L2_CID_MPEG_VIDEO_TEMPORAL_DECIMATION (V4L2_CID_MPEG_BASE+209) 1091#define V4L2_CID_MPEG_VIDEO_TEMPORAL_DECIMATION (V4L2_CID_MPEG_BASE+209)
1092#define V4L2_CID_MPEG_VIDEO_MUTE (V4L2_CID_MPEG_BASE+210)
1093#define V4L2_CID_MPEG_VIDEO_MUTE_YUV (V4L2_CID_MPEG_BASE+211)
1066 1094
1067/* MPEG-class control IDs specific to the CX2584x driver as defined by V4L2 */ 1095/* MPEG-class control IDs specific to the CX2584x driver as defined by V4L2 */
1068#define V4L2_CID_MPEG_CX2341X_BASE (V4L2_CTRL_CLASS_MPEG | 0x1000) 1096#define V4L2_CID_MPEG_CX2341X_BASE (V4L2_CTRL_CLASS_MPEG | 0x1000)
@@ -1103,6 +1131,7 @@ enum v4l2_mpeg_cx2341x_video_median_filter_type {
1103#define V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_MEDIAN_FILTER_TOP (V4L2_CID_MPEG_CX2341X_BASE+8) 1131#define V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_MEDIAN_FILTER_TOP (V4L2_CID_MPEG_CX2341X_BASE+8)
1104#define V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_BOTTOM (V4L2_CID_MPEG_CX2341X_BASE+9) 1132#define V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_BOTTOM (V4L2_CID_MPEG_CX2341X_BASE+9)
1105#define V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_TOP (V4L2_CID_MPEG_CX2341X_BASE+10) 1133#define V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_TOP (V4L2_CID_MPEG_CX2341X_BASE+10)
1134#define V4L2_CID_MPEG_CX2341X_STREAM_INSERT_NAV_PACKETS (V4L2_CID_MPEG_CX2341X_BASE+11)
1106 1135
1107/* 1136/*
1108 * T U N I N G 1137 * T U N I N G
@@ -1369,6 +1398,14 @@ struct v4l2_register {
1369 __u64 val; 1398 __u64 val;
1370}; 1399};
1371 1400
1401/* VIDIOC_G_CHIP_IDENT */
1402struct v4l2_chip_ident {
1403 __u32 match_type; /* Match type */
1404 __u32 match_chip; /* Match this chip, meaning determined by match_type */
1405 __u32 ident; /* chip identifier as specified in <media/v4l2-chip-ident.h> */
1406 __u32 revision; /* chip revision, chip specific */
1407};
1408
1372/* 1409/*
1373 * I O C T L C O D E S F O R V I D E O D E V I C E S 1410 * I O C T L C O D E S F O R V I D E O D E V I C E S
1374 * 1411 *
@@ -1442,6 +1479,8 @@ struct v4l2_register {
1442/* Experimental, only implemented if CONFIG_VIDEO_ADV_DEBUG is defined */ 1479/* Experimental, only implemented if CONFIG_VIDEO_ADV_DEBUG is defined */
1443#define VIDIOC_DBG_S_REGISTER _IOW ('V', 79, struct v4l2_register) 1480#define VIDIOC_DBG_S_REGISTER _IOW ('V', 79, struct v4l2_register)
1444#define VIDIOC_DBG_G_REGISTER _IOWR ('V', 80, struct v4l2_register) 1481#define VIDIOC_DBG_G_REGISTER _IOWR ('V', 80, struct v4l2_register)
1482
1483#define VIDIOC_G_CHIP_IDENT _IOWR ('V', 81, struct v4l2_chip_ident)
1445#endif 1484#endif
1446 1485
1447#ifdef __OLD_VIDIOC_ 1486#ifdef __OLD_VIDIOC_