aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2012-09-03 08:05:10 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-09-26 08:25:41 -0400
commit8e19b3475072682312de71f4dddf6d4f4081e143 (patch)
treefdf02011cfe343f9684d2e19da087e6dc6b6f80e /include
parent8fd207a1f7b65bee0a9b7948cb310d96fb11cc9e (diff)
[media] videodev2.h: split off controls into v4l2-controls.h
During the 2012 Media Workshop it was decided to split off the control definitions into their own v4l2-controls.h header, included by videodev2.h. Because controls make up such a large part of V4L2 they made it hard to read videodev2.h. Splitting off the control definitions makes life easier. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/Kbuild1
-rw-r--r--include/linux/v4l2-controls.h761
-rw-r--r--include/linux/videodev2.h697
3 files changed, 764 insertions, 695 deletions
diff --git a/include/linux/Kbuild b/include/linux/Kbuild
index fa217607c582..e53840d941d4 100644
--- a/include/linux/Kbuild
+++ b/include/linux/Kbuild
@@ -387,6 +387,7 @@ header-y += utsname.h
387header-y += uuid.h 387header-y += uuid.h
388header-y += uvcvideo.h 388header-y += uvcvideo.h
389header-y += v4l2-common.h 389header-y += v4l2-common.h
390header-y += v4l2-controls.h
390header-y += v4l2-dv-timings.h 391header-y += v4l2-dv-timings.h
391header-y += v4l2-mediabus.h 392header-y += v4l2-mediabus.h
392header-y += v4l2-subdev.h 393header-y += v4l2-subdev.h
diff --git a/include/linux/v4l2-controls.h b/include/linux/v4l2-controls.h
new file mode 100644
index 000000000000..421d24c7f686
--- /dev/null
+++ b/include/linux/v4l2-controls.h
@@ -0,0 +1,761 @@
1/*
2 * Video for Linux Two controls header file
3 *
4 * Copyright (C) 1999-2012 the contributors
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * Alternatively you can redistribute this file under the terms of the
17 * BSD license as stated below:
18 *
19 * Redistribution and use in source and binary forms, with or without
20 * modification, are permitted provided that the following conditions
21 * are met:
22 * 1. Redistributions of source code must retain the above copyright
23 * notice, this list of conditions and the following disclaimer.
24 * 2. Redistributions in binary form must reproduce the above copyright
25 * notice, this list of conditions and the following disclaimer in
26 * the documentation and/or other materials provided with the
27 * distribution.
28 * 3. The names of its contributors may not be used to endorse or promote
29 * products derived from this software without specific prior written
30 * permission.
31 *
32 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
33 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
34 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
35 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
36 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
37 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
38 * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
39 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
40 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
41 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
42 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
43 *
44 * The contents of this header was split off from videodev2.h. All control
45 * definitions should be added to this header, which is included by
46 * videodev2.h.
47 */
48
49#ifndef __LINUX_V4L2_CONTROLS_H
50#define __LINUX_V4L2_CONTROLS_H
51
52/* Control classes */
53#define V4L2_CTRL_CLASS_USER 0x00980000 /* Old-style 'user' controls */
54#define V4L2_CTRL_CLASS_MPEG 0x00990000 /* MPEG-compression controls */
55#define V4L2_CTRL_CLASS_CAMERA 0x009a0000 /* Camera class controls */
56#define V4L2_CTRL_CLASS_FM_TX 0x009b0000 /* FM Modulator control class */
57#define V4L2_CTRL_CLASS_FLASH 0x009c0000 /* Camera flash controls */
58#define V4L2_CTRL_CLASS_JPEG 0x009d0000 /* JPEG-compression controls */
59#define V4L2_CTRL_CLASS_IMAGE_SOURCE 0x009e0000 /* Image source controls */
60#define V4L2_CTRL_CLASS_IMAGE_PROC 0x009f0000 /* Image processing controls */
61#define V4L2_CTRL_CLASS_DV 0x00a00000 /* Digital Video controls */
62
63/* User-class control IDs */
64
65#define V4L2_CID_BASE (V4L2_CTRL_CLASS_USER | 0x900)
66#define V4L2_CID_USER_BASE V4L2_CID_BASE
67#define V4L2_CID_USER_CLASS (V4L2_CTRL_CLASS_USER | 1)
68#define V4L2_CID_BRIGHTNESS (V4L2_CID_BASE+0)
69#define V4L2_CID_CONTRAST (V4L2_CID_BASE+1)
70#define V4L2_CID_SATURATION (V4L2_CID_BASE+2)
71#define V4L2_CID_HUE (V4L2_CID_BASE+3)
72#define V4L2_CID_AUDIO_VOLUME (V4L2_CID_BASE+5)
73#define V4L2_CID_AUDIO_BALANCE (V4L2_CID_BASE+6)
74#define V4L2_CID_AUDIO_BASS (V4L2_CID_BASE+7)
75#define V4L2_CID_AUDIO_TREBLE (V4L2_CID_BASE+8)
76#define V4L2_CID_AUDIO_MUTE (V4L2_CID_BASE+9)
77#define V4L2_CID_AUDIO_LOUDNESS (V4L2_CID_BASE+10)
78#define V4L2_CID_BLACK_LEVEL (V4L2_CID_BASE+11) /* Deprecated */
79#define V4L2_CID_AUTO_WHITE_BALANCE (V4L2_CID_BASE+12)
80#define V4L2_CID_DO_WHITE_BALANCE (V4L2_CID_BASE+13)
81#define V4L2_CID_RED_BALANCE (V4L2_CID_BASE+14)
82#define V4L2_CID_BLUE_BALANCE (V4L2_CID_BASE+15)
83#define V4L2_CID_GAMMA (V4L2_CID_BASE+16)
84#define V4L2_CID_WHITENESS (V4L2_CID_GAMMA) /* Deprecated */
85#define V4L2_CID_EXPOSURE (V4L2_CID_BASE+17)
86#define V4L2_CID_AUTOGAIN (V4L2_CID_BASE+18)
87#define V4L2_CID_GAIN (V4L2_CID_BASE+19)
88#define V4L2_CID_HFLIP (V4L2_CID_BASE+20)
89#define V4L2_CID_VFLIP (V4L2_CID_BASE+21)
90
91/* Deprecated; use V4L2_CID_PAN_RESET and V4L2_CID_TILT_RESET */
92#define V4L2_CID_HCENTER (V4L2_CID_BASE+22)
93#define V4L2_CID_VCENTER (V4L2_CID_BASE+23)
94
95#define V4L2_CID_POWER_LINE_FREQUENCY (V4L2_CID_BASE+24)
96enum v4l2_power_line_frequency {
97 V4L2_CID_POWER_LINE_FREQUENCY_DISABLED = 0,
98 V4L2_CID_POWER_LINE_FREQUENCY_50HZ = 1,
99 V4L2_CID_POWER_LINE_FREQUENCY_60HZ = 2,
100 V4L2_CID_POWER_LINE_FREQUENCY_AUTO = 3,
101};
102#define V4L2_CID_HUE_AUTO (V4L2_CID_BASE+25)
103#define V4L2_CID_WHITE_BALANCE_TEMPERATURE (V4L2_CID_BASE+26)
104#define V4L2_CID_SHARPNESS (V4L2_CID_BASE+27)
105#define V4L2_CID_BACKLIGHT_COMPENSATION (V4L2_CID_BASE+28)
106#define V4L2_CID_CHROMA_AGC (V4L2_CID_BASE+29)
107#define V4L2_CID_COLOR_KILLER (V4L2_CID_BASE+30)
108#define V4L2_CID_COLORFX (V4L2_CID_BASE+31)
109enum v4l2_colorfx {
110 V4L2_COLORFX_NONE = 0,
111 V4L2_COLORFX_BW = 1,
112 V4L2_COLORFX_SEPIA = 2,
113 V4L2_COLORFX_NEGATIVE = 3,
114 V4L2_COLORFX_EMBOSS = 4,
115 V4L2_COLORFX_SKETCH = 5,
116 V4L2_COLORFX_SKY_BLUE = 6,
117 V4L2_COLORFX_GRASS_GREEN = 7,
118 V4L2_COLORFX_SKIN_WHITEN = 8,
119 V4L2_COLORFX_VIVID = 9,
120 V4L2_COLORFX_AQUA = 10,
121 V4L2_COLORFX_ART_FREEZE = 11,
122 V4L2_COLORFX_SILHOUETTE = 12,
123 V4L2_COLORFX_SOLARIZATION = 13,
124 V4L2_COLORFX_ANTIQUE = 14,
125 V4L2_COLORFX_SET_CBCR = 15,
126};
127#define V4L2_CID_AUTOBRIGHTNESS (V4L2_CID_BASE+32)
128#define V4L2_CID_BAND_STOP_FILTER (V4L2_CID_BASE+33)
129
130#define V4L2_CID_ROTATE (V4L2_CID_BASE+34)
131#define V4L2_CID_BG_COLOR (V4L2_CID_BASE+35)
132
133#define V4L2_CID_CHROMA_GAIN (V4L2_CID_BASE+36)
134
135#define V4L2_CID_ILLUMINATORS_1 (V4L2_CID_BASE+37)
136#define V4L2_CID_ILLUMINATORS_2 (V4L2_CID_BASE+38)
137
138#define V4L2_CID_MIN_BUFFERS_FOR_CAPTURE (V4L2_CID_BASE+39)
139#define V4L2_CID_MIN_BUFFERS_FOR_OUTPUT (V4L2_CID_BASE+40)
140
141#define V4L2_CID_ALPHA_COMPONENT (V4L2_CID_BASE+41)
142#define V4L2_CID_COLORFX_CBCR (V4L2_CID_BASE+42)
143
144/* last CID + 1 */
145#define V4L2_CID_LASTP1 (V4L2_CID_BASE+43)
146
147
148/* MPEG-class control IDs */
149
150#define V4L2_CID_MPEG_BASE (V4L2_CTRL_CLASS_MPEG | 0x900)
151#define V4L2_CID_MPEG_CLASS (V4L2_CTRL_CLASS_MPEG | 1)
152
153/* MPEG streams, specific to multiplexed streams */
154#define V4L2_CID_MPEG_STREAM_TYPE (V4L2_CID_MPEG_BASE+0)
155enum v4l2_mpeg_stream_type {
156 V4L2_MPEG_STREAM_TYPE_MPEG2_PS = 0, /* MPEG-2 program stream */
157 V4L2_MPEG_STREAM_TYPE_MPEG2_TS = 1, /* MPEG-2 transport stream */
158 V4L2_MPEG_STREAM_TYPE_MPEG1_SS = 2, /* MPEG-1 system stream */
159 V4L2_MPEG_STREAM_TYPE_MPEG2_DVD = 3, /* MPEG-2 DVD-compatible stream */
160 V4L2_MPEG_STREAM_TYPE_MPEG1_VCD = 4, /* MPEG-1 VCD-compatible stream */
161 V4L2_MPEG_STREAM_TYPE_MPEG2_SVCD = 5, /* MPEG-2 SVCD-compatible stream */
162};
163#define V4L2_CID_MPEG_STREAM_PID_PMT (V4L2_CID_MPEG_BASE+1)
164#define V4L2_CID_MPEG_STREAM_PID_AUDIO (V4L2_CID_MPEG_BASE+2)
165#define V4L2_CID_MPEG_STREAM_PID_VIDEO (V4L2_CID_MPEG_BASE+3)
166#define V4L2_CID_MPEG_STREAM_PID_PCR (V4L2_CID_MPEG_BASE+4)
167#define V4L2_CID_MPEG_STREAM_PES_ID_AUDIO (V4L2_CID_MPEG_BASE+5)