1 /* SPDX-License-Identifier: ((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause) */
2 /*
3  *  Video for Linux Two controls header file
4  *
5  *  Copyright (C) 1999-2012 the contributors
6  *
7  *  This program is free software; you can redistribute it and/or modify
8  *  it under the terms of the GNU General Public License as published by
9  *  the Free Software Foundation; either version 2 of the License, or
10  *  (at your option) any later version.
11  *
12  *  This program is distributed in the hope that it will be useful,
13  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  *  GNU General Public License for more details.
16  *
17  *  Alternatively you can redistribute this file under the terms of the
18  *  BSD license as stated below:
19  *
20  *  Redistribution and use in source and binary forms, with or without
21  *  modification, are permitted provided that the following conditions
22  *  are met:
23  *  1. Redistributions of source code must retain the above copyright
24  *     notice, this list of conditions and the following disclaimer.
25  *  2. Redistributions in binary form must reproduce the above copyright
26  *     notice, this list of conditions and the following disclaimer in
27  *     the documentation and/or other materials provided with the
28  *     distribution.
29  *  3. The names of its contributors may not be used to endorse or promote
30  *     products derived from this software without specific prior written
31  *     permission.
32  *
33  *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
34  *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
35  *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
36  *  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
37  *  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
38  *  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
39  *  TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
40  *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
41  *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
42  *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
43  *  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
44  *
45  *  The contents of this header was split off from videodev2.h. All control
46  *  definitions should be added to this header, which is included by
47  *  videodev2.h.
48  */
49 
50 #ifndef __LINUX_V4L2_CONTROLS_H
51 #define __LINUX_V4L2_CONTROLS_H
52 
53 /* Control classes */
54 #define V4L2_CTRL_CLASS_USER		0x00980000	/* Old-style 'user' controls */
55 #define V4L2_CTRL_CLASS_MPEG		0x00990000	/* MPEG-compression controls */
56 #define V4L2_CTRL_CLASS_CAMERA		0x009a0000	/* Camera class controls */
57 #define V4L2_CTRL_CLASS_FM_TX		0x009b0000	/* FM Modulator controls */
58 #define V4L2_CTRL_CLASS_FLASH		0x009c0000	/* Camera flash controls */
59 #define V4L2_CTRL_CLASS_JPEG		0x009d0000	/* JPEG-compression controls */
60 #define V4L2_CTRL_CLASS_IMAGE_SOURCE	0x009e0000	/* Image source controls */
61 #define V4L2_CTRL_CLASS_IMAGE_PROC	0x009f0000	/* Image processing controls */
62 #define V4L2_CTRL_CLASS_DV		0x00a00000	/* Digital Video controls */
63 #define V4L2_CTRL_CLASS_FM_RX		0x00a10000	/* FM Receiver controls */
64 #define V4L2_CTRL_CLASS_RF_TUNER	0x00a20000	/* RF tuner controls */
65 #define V4L2_CTRL_CLASS_DETECT		0x00a30000	/* Detection controls */
66 
67 /* User-class control IDs */
68 
69 #define V4L2_CID_BASE			(V4L2_CTRL_CLASS_USER | 0x900)
70 #define V4L2_CID_USER_BASE		V4L2_CID_BASE
71 #define V4L2_CID_USER_CLASS		(V4L2_CTRL_CLASS_USER | 1)
72 #define V4L2_CID_BRIGHTNESS		(V4L2_CID_BASE+0)
73 #define V4L2_CID_CONTRAST		(V4L2_CID_BASE+1)
74 #define V4L2_CID_SATURATION		(V4L2_CID_BASE+2)
75 #define V4L2_CID_HUE			(V4L2_CID_BASE+3)
76 #define V4L2_CID_AUDIO_VOLUME		(V4L2_CID_BASE+5)
77 #define V4L2_CID_AUDIO_BALANCE		(V4L2_CID_BASE+6)
78 #define V4L2_CID_AUDIO_BASS		(V4L2_CID_BASE+7)
79 #define V4L2_CID_AUDIO_TREBLE		(V4L2_CID_BASE+8)
80 #define V4L2_CID_AUDIO_MUTE		(V4L2_CID_BASE+9)
81 #define V4L2_CID_AUDIO_LOUDNESS		(V4L2_CID_BASE+10)
82 #define V4L2_CID_BLACK_LEVEL		(V4L2_CID_BASE+11) /* Deprecated */
83 #define V4L2_CID_AUTO_WHITE_BALANCE	(V4L2_CID_BASE+12)
84 #define V4L2_CID_DO_WHITE_BALANCE	(V4L2_CID_BASE+13)
85 #define V4L2_CID_RED_BALANCE		(V4L2_CID_BASE+14)
86 #define V4L2_CID_BLUE_BALANCE		(V4L2_CID_BASE+15)
87 #define V4L2_CID_GAMMA			(V4L2_CID_BASE+16)
88 #define V4L2_CID_WHITENESS		(V4L2_CID_GAMMA) /* Deprecated */
89 #define V4L2_CID_EXPOSURE		(V4L2_CID_BASE+17)
90 #define V4L2_CID_AUTOGAIN		(V4L2_CID_BASE+18)
91 #define V4L2_CID_GAIN			(V4L2_CID_BASE+19)
92 #define V4L2_CID_HFLIP			(V4L2_CID_BASE+20)
93 #define V4L2_CID_VFLIP			(V4L2_CID_BASE+21)
94 
95 #define V4L2_CID_POWER_LINE_FREQUENCY	(V4L2_CID_BASE+24)
96 enum 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)
109 enum 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 /* USER-class private control IDs */
148 
149 /* The base for the meye driver controls. See linux/meye.h for the list
150  * of controls. We reserve 16 controls for this driver. */
151 #define V4L2_CID_USER_MEYE_BASE			(V4L2_CID_USER_BASE + 0x1000)
152 
153 /* The base for the bttv driver controls.
154  * We reserve 32 controls for this driver. */
155 #define V4L2_CID_USER_BTTV_BASE			(V4L2_CID_USER_BASE + 0x1010)
156 
157 
158 /* The base for the s2255 driver controls.
159  * We reserve 16 controls for this driver. */
160 #define V4L2_CID_USER_S2255_BASE		(V4L2_CID_USER_BASE + 0x1030)
161 
162 /*
163  * The base for the si476x driver controls. See include/media/drv-intf/si476x.h
164  * for the list of controls. Total of 16 controls is reserved for this driver
165  */
166 #define V4L2_CID_USER_SI476X_BASE		(V4L2_CID_USER_BASE + 0x1040)
167 
168 /* The base for the TI VPE driver controls. Total of 16 controls is reserved for
169  * this driver */
170 #define V4L2_CID_USER_TI_VPE_BASE		(V4L2_CID_USER_BASE + 0x1050)
171 
172 /* The base for the saa7134 driver controls.
173  * We reserve 16 controls for this driver. */
174 #define V4L2_CID_USER_SAA7134_BASE		(V4L2_CID_USER_BASE + 0x1060)
175 
176 /* The base for the adv7180 driver controls.
177  * We reserve 16 controls for this driver. */
178 #define V4L2_CID_USER_ADV7180_BASE		(V4L2_CID_USER_BASE + 0x1070)
179 
180 /* The base for the tc358743 driver controls.
181  * We reserve 16 controls for this driver. */
182 #define V4L2_CID_USER_TC358743_BASE		(V4L2_CID_USER_BASE + 0x1080)
183 
184 /* The base for the max217x driver controls.
185  * We reserve 32 controls for this driver
186  */
187 #define V4L2_CID_USER_MAX217X_BASE		(V4L2_CID_USER_BASE + 0x1090)
188 
189 /* The base for the imx driver controls.
190  * We reserve 16 controls for this driver. */
191 #define V4L2_CID_USER_IMX_BASE			(V4L2_CID_USER_BASE + 0x10b0)
192 
193 /* MPEG-class control IDs */
194 /* The MPEG controls are applicable to all codec controls
195  * and the 'MPEG' part of the define is historical */
196 
197 #define V4L2_CID_MPEG_BASE			(V4L2_CTRL_CLASS_MPEG | 0x900)
198 #define V4L2_CID_MPEG_CLASS			(V4L2_CTRL_CLASS_MPEG | 1)
199 
200 /*  MPEG streams, specific to multiplexed streams */
201 #define V4L2_CID_MPEG_STREAM_TYPE		(V4L2_CID_MPEG_BASE+0)
202 enum v4l2_mpeg_stream_type {
203 	V4L2_MPEG_STREAM_TYPE_MPEG2_PS   = 0, /* MPEG-2 program stream */
204 	V4L2_MPEG_STREAM_TYPE_MPEG2_TS   = 1, /* MPEG-2 transport stream */
205 	V4L2_MPEG_STREAM_TYPE_MPEG1_SS   = 2, /* MPEG-1 system stream */
206 	V4L2_MPEG_STREAM_TYPE_MPEG2_DVD  = 3, /* MPEG-2 DVD-compatible stream */
207 	V4L2_MPEG_STREAM_TYPE_MPEG1_VCD  = 4, /* MPEG-1 VCD-compatible stream */
208 	V4L2_MPEG_STREAM_TYPE_MPEG2_SVCD = 5, /* MPEG-2 SVCD-compatible stream */
209 };
210 #define V4L2_CID_MPEG_STREAM_PID_PMT		(V4L2_CID_MPEG_BASE+1)
211 #define V4L2_CID_MPEG_STREAM_PID_AUDIO		(V4L2_CID_MPEG_BASE+2)
212 #define V4L2_CID_MPEG_STREAM_PID_VIDEO		(V4L2_CID_MPEG_BASE+3)
213 #define V4L2_CID_MPEG_STREAM_PID_PCR		(V4L2_CID_MPEG_BASE+4)
214 #define V4L2_CID_MPEG_STREAM_PES_ID_AUDIO	(V4L2_CID_MPEG_BASE+5)
215 #define V4L2_CID_MPEG_STREAM_PES_ID_VIDEO	(V4L2_CID_MPEG_BASE+6)
216 #define V4L2_CID_MPEG_STREAM_VBI_FMT		(V4L2_CID_MPEG_BASE+7)
217 enum v4l2_mpeg_stream_vbi_fmt {
218 	V4L2_MPEG_STREAM_VBI_FMT_NONE = 0,  /* No VBI in the MPEG stream */
219 	V4L2_MPEG_STREAM_VBI_FMT_IVTV = 1,  /* VBI in private packets, IVTV format */
220 };
221 
222 /*  MPEG audio controls specific to multiplexed streams  */
223 #define V4L2_CID_MPEG_AUDIO_SAMPLING_FREQ	(V4L2_CID_MPEG_BASE+100)
224 enum v4l2_mpeg_audio_sampling_freq {
225 	V4L2_MPEG_AUDIO_SAMPLING_FREQ_44100 = 0,
226 	V4L2_MPEG_AUDIO_SAMPLING_FREQ_48000 = 1,
227 	V4L2_MPEG_AUDIO_SAMPLING_FREQ_32000 = 2,
228 };
229 #define V4L2_CID_MPEG_AUDIO_ENCODING		(V4L2_CID_MPEG_BASE+101)
230 enum v4l2_mpeg_audio_encoding {
231 	V4L2_MPEG_AUDIO_ENCODING_LAYER_1 = 0,
232 	V4L2_MPEG_AUDIO_ENCODING_LAYER_2 = 1,
233 	V4L2_MPEG_AUDIO_ENCODING_LAYER_3 = 2,
234 	V4L2_MPEG_AUDIO_ENCODING_AAC     = 3,
235 	V4L2_MPEG_AUDIO_ENCODING_AC3     = 4,
236 };
237 #define V4L2_CID_MPEG_AUDIO_L1_BITRATE		(V4L2_CID_MPEG_BASE+102)
238 enum v4l2_mpeg_audio_l1_bitrate {
239 	V4L2_MPEG_AUDIO_L1_BITRATE_32K  = 0,
240 	V4L2_MPEG_AUDIO_L1_BITRATE_64K  = 1,
241 	V4L2_MPEG_AUDIO_L1_BITRATE_96K  = 2,
242 	V4L2_MPEG_AUDIO_L1_BITRATE_128K = 3,
243 	V4L2_MPEG_AUDIO_L1_BITRATE_160K = 4,
244 	V4L2_MPEG_AUDIO_L1_BITRATE_192K = 5,
245 	V4L2_MPEG_AUDIO_L1_BITRATE_224K = 6,
246 	V4L2_MPEG_AUDIO_L1_BITRATE_256K = 7,
247 	V4L2_MPEG_AUDIO_L1_BITRATE_288K = 8,
248 	V4L2_MPEG_AUDIO_L1_BITRATE_320K = 9,
249 	V4L2_MPEG_AUDIO_L1_BITRATE_352K = 10,
250 	V4L2_MPEG_AUDIO_L1_BITRATE_384K = 11,
251 	V4L2_MPEG_AUDIO_L1_BITRATE_416K = 12,
252 	V4L2_MPEG_AUDIO_L1_BITRATE_448K = 13,
253 };
254 #define V4L2_CID_MPEG_AUDIO_L2_BITRATE		(V4L2_CID_MPEG_BASE+103)
255 enum v4l2_mpeg_audio_l2_bitrate {
256 	V4L2_MPEG_AUDIO_L2_BITRATE_32K  = 0,
257 	V4L2_MPEG_AUDIO_L2_BITRATE_48K  = 1,
258 	V4L2_MPEG_AUDIO_L2_BITRATE_56K  = 2,
259 	V4L2_MPEG_AUDIO_L2_BITRATE_64K  = 3,
260 	V4L2_MPEG_AUDIO_L2_BITRATE_80K  = 4,
261 	V4L2_MPEG_AUDIO_L2_BITRATE_96K  = 5,
262 	V4L2_MPEG_AUDIO_L2_BITRATE_112K = 6,
263 	V4L2_MPEG_AUDIO_L2_BITRATE_128K = 7,
264 	V4L2_MPEG_AUDIO_L2_BITRATE_160K = 8,
265 	V4L2_MPEG_AUDIO_L2_BITRATE_192K = 9,
266 	V4L2_MPEG_AUDIO_L2_BITRATE_224K = 10,
267 	V4L2_MPEG_AUDIO_L2_BITRATE_256K = 11,
268 	V4L2_MPEG_AUDIO_L2_BITRATE_320K = 12,
269 	V4L2_MPEG_AUDIO_L2_BITRATE_384K = 13,
270 };
271 #define V4L2_CID_MPEG_AUDIO_L3_BITRATE		(V4L2_CID_MPEG_BASE+104)
272 enum v4l2_mpeg_audio_l3_bitrate {
273 	V4L2_MPEG_AUDIO_L3_BITRATE_32K  = 0,
274 	V4L2_MPEG_AUDIO_L3_BITRATE_40K  = 1,
275 	V4L2_MPEG_AUDIO_L3_BITRATE_48K  = 2,
276 	V4L2_MPEG_AUDIO_L3_BITRATE_56K  = 3,
277 	V4L2_MPEG_AUDIO_L3_BITRATE_64K  = 4,
278 	V4L2_MPEG_AUDIO_L3_BITRATE_80K  = 5,
279 	V4L2_MPEG_AUDIO_L3_BITRATE_96K  = 6,
280 	V4L2_MPEG_AUDIO_L3_BITRATE_112K = 7,
281 	V4L2_MPEG_AUDIO_L3_BITRATE_128K = 8,
282 	V4L2_MPEG_AUDIO_L3_BITRATE_160K = 9,
283 	V4L2_MPEG_AUDIO_L3_BITRATE_192K = 10,
284 	V4L2_MPEG_AUDIO_L3_BITRATE_224K = 11,
285 	V4L2_MPEG_AUDIO_L3_BITRATE_256K = 12,
286 	V4L2_MPEG_AUDIO_L3_BITRATE_320K = 13,
287 };
288 #define V4L2_CID_MPEG_AUDIO_MODE		(V4L2_CID_MPEG_BASE+105)
289 enum v4l2_mpeg_audio_mode {
290 	V4L2_MPEG_AUDIO_MODE_STEREO       = 0,
291 	V4L2_MPEG_AUDIO_MODE_JOINT_STEREO = 1,
292 	V4L2_MPEG_AUDIO_MODE_DUAL         = 2,
293 	V4L2_MPEG_AUDIO_MODE_MONO         = 3,
294 };
295 #define V4L2_CID_MPEG_AUDIO_MODE_EXTENSION	(V4L2_CID_MPEG_BASE+106)
296 enum v4l2_mpeg_audio_mode_extension {
297 	V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_4  = 0,
298 	V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_8  = 1,
299 	V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_12 = 2,
300 	V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_16 = 3,
301 };
302 #define V4L2_CID_MPEG_AUDIO_EMPHASIS		(V4L2_CID_MPEG_BASE+107)
303 enum v4l2_mpeg_audio_emphasis {
304 	V4L2_MPEG_AUDIO_EMPHASIS_NONE         = 0,
305 	V4L2_MPEG_AUDIO_EMPHASIS_50_DIV_15_uS = 1,
306 	V4L2_MPEG_AUDIO_EMPHASIS_CCITT_J17    = 2,
307 };
308 #define V4L2_CID_MPEG_AUDIO_CRC			(V4L2_CID_MPEG_BASE+108)
309 enum v4l2_mpeg_audio_crc {
310 	V4L2_MPEG_AUDIO_CRC_NONE  = 0,
311 	V4L2_MPEG_AUDIO_CRC_CRC16 = 1,
312 };
313 #define V4L2_CID_MPEG_AUDIO_MUTE		(V4L2_CID_MPEG_BASE+109)
314 #define V4L2_CID_MPEG_AUDIO_AAC_BITRATE		(V4L2_CID_MPEG_BASE+110)
315 #define V4L2_CID_MPEG_AUDIO_AC3_BITRATE		(V4L2_CID_MPEG_BASE+111)
316 enum v4l2_mpeg_audio_ac3_bitrate {
317 	V4L2_MPEG_AUDIO_AC3_BITRATE_32K  = 0,
318 	V4L2_MPEG_AUDIO_AC3_BITRATE_40K  = 1,
319 	V4L2_MPEG_AUDIO_AC3_BITRATE_48K  = 2,
320 	V4L2_MPEG_AUDIO_AC3_BITRATE_56K  = 3,
321 	V4L2_MPEG_AUDIO_AC3_BITRATE_64K  = 4,
322 	V4L2_MPEG_AUDIO_AC3_BITRATE_80K  = 5,
323 	V4L2_MPEG_AUDIO_AC3_BITRATE_96K  = 6,
324 	V4L2_MPEG_AUDIO_AC3_BITRATE_112K = 7,
325 	V4L2_MPEG_AUDIO_AC3_BITRATE_128K = 8,
326 	V4L2_MPEG_AUDIO_AC3_BITRATE_160K = 9,
327 	V4L2_MPEG_AUDIO_AC3_BITRATE_192K = 10,
328 	V4L2_MPEG_AUDIO_AC3_BITRATE_224K = 11,
329 	V4L2_MPEG_AUDIO_AC3_BITRATE_256K = 12,
330 	V4L2_MPEG_AUDIO_AC3_BITRATE_320K = 13,
331 	V4L2_MPEG_AUDIO_AC3_BITRATE_384K = 14,
332 	V4L2_MPEG_AUDIO_AC3_BITRATE_448K = 15,
333 	V4L2_MPEG_AUDIO_AC3_BITRATE_512K = 16,
334 	V4L2_MPEG_AUDIO_AC3_BITRATE_576K = 17,
335 	V4L2_MPEG_AUDIO_AC3_BITRATE_640K = 18,
336 };
337 #define V4L2_CID_MPEG_AUDIO_DEC_PLAYBACK	(V4L2_CID_MPEG_BASE+112)
338 enum v4l2_mpeg_audio_dec_playback {
339 	V4L2_MPEG_AUDIO_DEC_PLAYBACK_AUTO	    = 0,
340 	V4L2_MPEG_AUDIO_DEC_PLAYBACK_STEREO	    = 1,
341 	V4L2_MPEG_AUDIO_DEC_PLAYBACK_LEFT	    = 2,
342 	V4L2_MPEG_AUDIO_DEC_PLAYBACK_RIGHT	    = 3,
343 	V4L2_MPEG_AUDIO_DEC_PLAYBACK_MONO	    = 4,
344 	V4L2_MPEG_AUDIO_DEC_PLAYBACK_SWAPPED_STEREO = 5,
345 };
346 #define V4L2_CID_MPEG_AUDIO_DEC_MULTILINGUAL_PLAYBACK (V4L2_CID_MPEG_BASE+113)
347 
348 /*  MPEG video controls specific to multiplexed streams */
349 #define V4L2_CID_MPEG_VIDEO_ENCODING		(V4L2_CID_MPEG_BASE+200)
350 enum v4l2_mpeg_video_encoding {
351 	V4L2_MPEG_VIDEO_ENCODING_MPEG_1     = 0,
352 	V4L2_MPEG_VIDEO_ENCODING_MPEG_2     = 1,
353 	V4L2_MPEG_VIDEO_ENCODING_MPEG_4_AVC = 2,
354 };
355 #define V4L2_CID_MPEG_VIDEO_ASPECT		(V4L2_CID_MPEG_BASE+201)
356 enum v4l2_mpeg_video_aspect {
357 	V4L2_MPEG_VIDEO_ASPECT_1x1     = 0,
358 	V4L2_MPEG_VIDEO_ASPECT_4x3     = 1,
359 	V4L2_MPEG_VIDEO_ASPECT_16x9    = 2,
360 	V4L2_MPEG_VIDEO_ASPECT_221x100 = 3,
361 };
362 #define V4L2_CID_MPEG_VIDEO_B_FRAMES		(V4L2_CID_MPEG_BASE+202)
363 #define V4L2_CID_MPEG_VIDEO_GOP_SIZE		(V4L2_CID_MPEG_BASE+203)
364 #define V4L2_CID_MPEG_VIDEO_GOP_CLOSURE		(V4L2_CID_MPEG_BASE+204)
365 #define V4L2_CID_MPEG_VIDEO_PULLDOWN		(V4L2_CID_MPEG_BASE+205)
366 #define V4L2_CID_MPEG_VIDEO_BITRATE_MODE	(V4L2_CID_MPEG_BASE+206)
367 enum v4l2_mpeg_video_bitrate_mode {
368 	/* CFR Modes */
369 	V4L2_MPEG_VIDEO_BITRATE_MODE_VBR = 0,
370 	V4L2_MPEG_VIDEO_BITRATE_MODE_CBR = 1,
371 	V4L2_MPEG_VIDEO_BITRATE_MODE_MBR = 2,
372 	/* VFR Modes */
373 	V4L2_MPEG_VIDEO_BITRATE_MODE_CBR_VFR = 3,
374 	V4L2_MPEG_VIDEO_BITRATE_MODE_MBR_VFR = 4,
375 	V4L2_MPEG_VIDEO_BITRATE_MODE_CQ = 5,
376 };
377 #define V4L2_CID_MPEG_VIDEO_BITRATE		(V4L2_CID_MPEG_BASE+207)
378 #define V4L2_CID_MPEG_VIDEO_BITRATE_PEAK	(V4L2_CID_MPEG_BASE+208)
379 #define V4L2_CID_MPEG_VIDEO_TEMPORAL_DECIMATION (V4L2_CID_MPEG_BASE+209)
380 #define V4L2_CID_MPEG_VIDEO_MUTE		(V4L2_CID_MPEG_BASE+210)
381 #define V4L2_CID_MPEG_VIDEO_MUTE_YUV		(V4L2_CID_MPEG_BASE+211)
382 #define V4L2_CID_MPEG_VIDEO_DECODER_SLICE_INTERFACE		(V4L2_CID_MPEG_BASE+212)
383 #define V4L2_CID_MPEG_VIDEO_DECODER_MPEG4_DEBLOCK_FILTER	(V4L2_CID_MPEG_BASE+213)
384 #define V4L2_CID_MPEG_VIDEO_CYCLIC_INTRA_REFRESH_MB		(V4L2_CID_MPEG_BASE+214)
385 #define V4L2_CID_MPEG_VIDEO_FRAME_RC_ENABLE			(V4L2_CID_MPEG_BASE+215)
386 #define V4L2_CID_MPEG_VIDEO_HEADER_MODE				(V4L2_CID_MPEG_BASE+216)
387 enum v4l2_mpeg_video_header_mode {
388 	V4L2_MPEG_VIDEO_HEADER_MODE_SEPARATE			= 0,
389 	V4L2_MPEG_VIDEO_HEADER_MODE_JOINED_WITH_1ST_FRAME	= 1,
390 	V4L2_MPEG_VIDEO_HEADER_MODE_JOINED_WITH_I_FRAME         = 2,
391 
392 };
393 #define V4L2_CID_MPEG_VIDEO_MAX_REF_PIC			(V4L2_CID_MPEG_BASE+217)
394 #define V4L2_CID_MPEG_VIDEO_MB_RC_ENABLE		(V4L2_CID_MPEG_BASE+218)
395 #define V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MAX_BYTES	(V4L2_CID_MPEG_BASE+219)
396 #define V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MAX_MB		(V4L2_CID_MPEG_BASE+220)
397 #define V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MODE		(V4L2_CID_MPEG_BASE+221)
398 enum v4l2_mpeg_video_multi_slice_mode {
399 	V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_SINGLE		= 0,
400 	V4L2_MPEG_VIDEO_MULTI_SICE_MODE_MAX_MB		= 1,
401 	V4L2_MPEG_VIDEO_MULTI_SICE_MODE_MAX_BYTES	= 2,
402 	V4L2_MPEG_VIDEO_MULTI_SLICE_GOB                 = 3,
403 };
404 #define V4L2_CID_MPEG_VIDEO_VBV_SIZE			(V4L2_CID_MPEG_BASE+222)
405 #define V4L2_CID_MPEG_VIDEO_DEC_PTS			(V4L2_CID_MPEG_BASE+223)
406 #define V4L2_CID_MPEG_VIDEO_DEC_FRAME			(V4L2_CID_MPEG_BASE+224)
407 #define V4L2_CID_MPEG_VIDEO_VBV_DELAY			(V4L2_CID_MPEG_BASE+225)
408 #define V4L2_CID_MPEG_VIDEO_REPEAT_SEQ_HEADER		(V4L2_CID_MPEG_BASE+226)
409 #define V4L2_CID_MPEG_VIDEO_MV_H_SEARCH_RANGE		(V4L2_CID_MPEG_BASE+227)
410 #define V4L2_CID_MPEG_VIDEO_MV_V_SEARCH_RANGE		(V4L2_CID_MPEG_BASE+228)
411 #define V4L2_CID_MPEG_VIDEO_FORCE_KEY_FRAME		(V4L2_CID_MPEG_BASE+229)
412 
413 #define V4L2_CID_MPEG_VIDEO_H263_I_FRAME_QP		(V4L2_CID_MPEG_BASE+300)
414 #define V4L2_CID_MPEG_VIDEO_H263_P_FRAME_QP		(V4L2_CID_MPEG_BASE+301)
415 #define V4L2_CID_MPEG_VIDEO_H263_B_FRAME_QP		(V4L2_CID_MPEG_BASE+302)
416 #define V4L2_CID_MPEG_VIDEO_H263_MIN_QP			(V4L2_CID_MPEG_BASE+303)
417 #define V4L2_CID_MPEG_VIDEO_H263_MAX_QP			(V4L2_CID_MPEG_BASE+304)
418 #define V4L2_CID_MPEG_VIDEO_H264_I_FRAME_QP		(V4L2_CID_MPEG_BASE+350)
419 #define V4L2_CID_MPEG_VIDEO_H264_P_FRAME_QP		(V4L2_CID_MPEG_BASE+351)
420 #define V4L2_CID_MPEG_VIDEO_H264_B_FRAME_QP		(V4L2_CID_MPEG_BASE+352)
421 #define V4L2_CID_MPEG_VIDEO_H264_MIN_QP			(V4L2_CID_MPEG_BASE+353)
422 #define V4L2_CID_MPEG_VIDEO_H264_MAX_QP			(V4L2_CID_MPEG_BASE+354)
423 #define V4L2_CID_MPEG_VIDEO_H264_8X8_TRANSFORM		(V4L2_CID_MPEG_BASE+355)
424 #define V4L2_CID_MPEG_VIDEO_H264_CPB_SIZE		(V4L2_CID_MPEG_BASE+356)
425 #define V4L2_CID_MPEG_VIDEO_H264_ENTROPY_MODE		(V4L2_CID_MPEG_BASE+357)
426 enum v4l2_mpeg_video_h264_entropy_mode {
427 	V4L2_MPEG_VIDEO_H264_ENTROPY_MODE_CAVLC	= 0,
428 	V4L2_MPEG_VIDEO_H264_ENTROPY_MODE_CABAC	= 1,
429 };
430 #define V4L2_CID_MPEG_VIDEO_H264_I_PERIOD		(V4L2_CID_MPEG_BASE+358)
431 #define V4L2_CID_MPEG_VIDEO_H264_LEVEL			(V4L2_CID_MPEG_BASE+359)
432 enum v4l2_mpeg_video_h264_level {
433 	V4L2_MPEG_VIDEO_H264_LEVEL_1_0	= 0,
434 	V4L2_MPEG_VIDEO_H264_LEVEL_1B	= 1,
435 	V4L2_MPEG_VIDEO_H264_LEVEL_1_1	= 2,
436 	V4L2_MPEG_VIDEO_H264_LEVEL_1_2	= 3,
437 	V4L2_MPEG_VIDEO_H264_LEVEL_1_3	= 4,
438 	V4L2_MPEG_VIDEO_H264_LEVEL_2_0	= 5,
439 	V4L2_MPEG_VIDEO_H264_LEVEL_2_1	= 6,
440 	V4L2_MPEG_VIDEO_H264_LEVEL_2_2	= 7,
441 	V4L2_MPEG_VIDEO_H264_LEVEL_3_0	= 8,
442 	V4L2_MPEG_VIDEO_H264_LEVEL_3_1	= 9,
443 	V4L2_MPEG_VIDEO_H264_LEVEL_3_2	= 10,
444 	V4L2_MPEG_VIDEO_H264_LEVEL_4_0	= 11,
445 	V4L2_MPEG_VIDEO_H264_LEVEL_4_1	= 12,
446 	V4L2_MPEG_VIDEO_H264_LEVEL_4_2	= 13,
447 	V4L2_MPEG_VIDEO_H264_LEVEL_5_0	= 14,
448 	V4L2_MPEG_VIDEO_H264_LEVEL_5_1	= 15,
449 	V4L2_MPEG_VIDEO_H264_LEVEL_5_2	= 16,
450 	V4L2_MPEG_VIDEO_H264_LEVEL_6_0	= 17,
451 	V4L2_MPEG_VIDEO_H264_LEVEL_6_1	= 18,
452 	V4L2_MPEG_VIDEO_H264_LEVEL_6_2	= 19,
453 	V4L2_MPEG_VIDEO_H264_LEVEL_UNKNOWN = 20,
454 };
455 #define V4L2_CID_MPEG_VIDEO_H264_LOOP_FILTER_ALPHA	(V4L2_CID_MPEG_BASE+360)
456 #define V4L2_CID_MPEG_VIDEO_H264_LOOP_FILTER_BETA	(V4L2_CID_MPEG_BASE+361)
457 #define V4L2_CID_MPEG_VIDEO_H264_LOOP_FILTER_MODE	(V4L2_CID_MPEG_BASE+362)
458 enum v4l2_mpeg_video_h264_loop_filter_mode {
459 	V4L2_MPEG_VIDEO_H264_LOOP_FILTER_MODE_ENABLED				= 0,
460 	V4L2_MPEG_VIDEO_H264_LOOP_FILTER_MODE_DISABLED				= 1,
461 	V4L2_MPEG_VIDEO_H264_LOOP_FILTER_MODE_DISABLED_AT_SLICE_BOUNDARY	= 2,
462 };
463 #define V4L2_CID_MPEG_VIDEO_H264_PROFILE		(V4L2_CID_MPEG_BASE+363)
464 enum v4l2_mpeg_video_h264_profile {
465 	V4L2_MPEG_VIDEO_H264_PROFILE_BASELINE			= 0,
466 	V4L2_MPEG_VIDEO_H264_PROFILE_CONSTRAINED_BASELINE	= 1,
467 	V4L2_MPEG_VIDEO_H264_PROFILE_MAIN			= 2,
468 	V4L2_MPEG_VIDEO_H264_PROFILE_EXTENDED			= 3,
469 	V4L2_MPEG_VIDEO_H264_PROFILE_HIGH			= 4,
470 	V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_10			= 5,
471 	V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_422			= 6,
472 	V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_444_PREDICTIVE	= 7,
473 	V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_10_INTRA		= 8,
474 	V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_422_INTRA		= 9,
475 	V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_444_INTRA		= 10,
476 	V4L2_MPEG_VIDEO_H264_PROFILE_CAVLC_444_INTRA		= 11,
477 	V4L2_MPEG_VIDEO_H264_PROFILE_SCALABLE_BASELINE		= 12,
478 	V4L2_MPEG_VIDEO_H264_PROFILE_SCALABLE_HIGH		= 13,
479 	V4L2_MPEG_VIDEO_H264_PROFILE_SCALABLE_HIGH_INTRA	= 14,
480 	V4L2_MPEG_VIDEO_H264_PROFILE_STEREO_HIGH		= 15,
481 	V4L2_MPEG_VIDEO_H264_PROFILE_MULTIVIEW_HIGH		= 16,
482 	V4L2_MPEG_VIDEO_H264_PROFILE_CONSTRAINED_HIGH		= 17,
483 };
484 #define V4L2_CID_MPEG_VIDEO_H264_VUI_EXT_SAR_HEIGHT	(V4L2_CID_MPEG_BASE+364)
485 #define V4L2_CID_MPEG_VIDEO_H264_VUI_EXT_SAR_WIDTH	(V4L2_CID_MPEG_BASE+365)
486 #define V4L2_CID_MPEG_VIDEO_H264_VUI_SAR_ENABLE		(V4L2_CID_MPEG_BASE+366)
487 #define V4L2_CID_MPEG_VIDEO_H264_VUI_SAR_IDC		(V4L2_CID_MPEG_BASE+367)
488 enum v4l2_mpeg_video_h264_vui_sar_idc {
489 	V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_UNSPECIFIED	= 0,
490 	V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_1x1		= 1,
491 	V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_12x11		= 2,
492 	V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_10x11		= 3,
493 	V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_16x11		= 4,
494 	V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_40x33		= 5,
495 	V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_24x11		= 6,
496 	V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_20x11		= 7,
497 	V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_32x11		= 8,
498 	V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_80x33		= 9,
499 	V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_18x11		= 10,
500 	V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_15x11		= 11,
501 	V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_64x33		= 12,
502 	V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_160x99		= 13,
503 	V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_4x3		= 14,
504 	V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_3x2		= 15,
505 	V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_2x1		= 16,
506 	V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_EXTENDED	= 17,
507 };
508 #define V4L2_CID_MPEG_VIDEO_H264_SEI_FRAME_PACKING		(V4L2_CID_MPEG_BASE+368)
509 #define V4L2_CID_MPEG_VIDEO_H264_SEI_FP_CURRENT_FRAME_0		(V4L2_CID_MPEG_BASE+369)
510 #define V4L2_CID_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE	(V4L2_CID_MPEG_BASE+370)
511 enum v4l2_mpeg_video_h264_sei_fp_arrangement_type {
512 	V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_CHECKERBOARD	= 0,
513 	V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_COLUMN		= 1,
514 	V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_ROW		= 2,
515 	V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_SIDE_BY_SIDE	= 3,
516 	V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_TOP_BOTTOM		= 4,
517 	V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_TEMPORAL		= 5,
518 };
519 #define V4L2_CID_MPEG_VIDEO_H264_FMO			(V4L2_CID_MPEG_BASE+371)
520 #define V4L2_CID_MPEG_VIDEO_H264_FMO_MAP_TYPE		(V4L2_CID_MPEG_BASE+372)
521 enum v4l2_mpeg_video_h264_fmo_map_type {
522 	V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_INTERLEAVED_SLICES		= 0,
523 	V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_SCATTERED_SLICES		= 1,
524 	V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_FOREGROUND_WITH_LEFT_OVER	= 2,
525 	V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_BOX_OUT			= 3,
526 	V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_RASTER_SCAN			= 4,
527 	V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_WIPE_SCAN			= 5,
528 	V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_EXPLICIT			= 6,
529 };
530 #define V4L2_CID_MPEG_VIDEO_H264_FMO_SLICE_GROUP	(V4L2_CID_MPEG_BASE+373)
531 #define V4L2_CID_MPEG_VIDEO_H264_FMO_CHANGE_DIRECTION	(V4L2_CID_MPEG_BASE+374)
532 enum v4l2_mpeg_video_h264_fmo_change_dir {
533 	V4L2_MPEG_VIDEO_H264_FMO_CHANGE_DIR_RIGHT	= 0,
534 	V4L2_MPEG_VIDEO_H264_FMO_CHANGE_DIR_LEFT	= 1,
535 };
536 #define V4L2_CID_MPEG_VIDEO_H264_FMO_CHANGE_RATE	(V4L2_CID_MPEG_BASE+375)
537 #define V4L2_CID_MPEG_VIDEO_H264_FMO_RUN_LENGTH		(V4L2_CID_MPEG_BASE+376)
538 #define V4L2_CID_MPEG_VIDEO_H264_ASO			(V4L2_CID_MPEG_BASE+377)
539 #define V4L2_CID_MPEG_VIDEO_H264_ASO_SLICE_ORDER	(V4L2_CID_MPEG_BASE+378)
540 #define V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING		(V4L2_CID_MPEG_BASE+379)
541 #define V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING_TYPE	(V4L2_CID_MPEG_BASE+380)
542 enum v4l2_mpeg_video_h264_hierarchical_coding_type {
543 	V4L2_MPEG_VIDEO_H264_HIERARCHICAL_CODING_B	= 0,
544 	V4L2_MPEG_VIDEO_H264_HIERARCHICAL_CODING_P	= 1,
545 };
546 #define V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING_LAYER	(V4L2_CID_MPEG_BASE+381)
547 #define V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING_LAYER_QP	(V4L2_CID_MPEG_BASE+382)
548 #define V4L2_CID_MPEG_VIDEO_H264_CHROMA_QP_INDEX_OFFSET		(V4L2_CID_MPEG_BASE+384)
549 #define V4L2_CID_MPEG_VIDEO_MPEG4_I_FRAME_QP	(V4L2_CID_MPEG_BASE+400)
550 #define V4L2_CID_MPEG_VIDEO_MPEG4_P_FRAME_QP	(V4L2_CID_MPEG_BASE+401)
551 #define V4L2_CID_MPEG_VIDEO_MPEG4_B_FRAME_QP	(V4L2_CID_MPEG_BASE+402)
552 #define V4L2_CID_MPEG_VIDEO_MPEG4_MIN_QP	(V4L2_CID_MPEG_BASE+403)
553 #define V4L2_CID_MPEG_VIDEO_MPEG4_MAX_QP	(V4L2_CID_MPEG_BASE+404)
554 #define V4L2_CID_MPEG_VIDEO_MPEG4_LEVEL		(V4L2_CID_MPEG_BASE+405)
555 enum v4l2_mpeg_video_mpeg4_level {
556 	V4L2_MPEG_VIDEO_MPEG4_LEVEL_0	= 0,
557 	V4L2_MPEG_VIDEO_MPEG4_LEVEL_0B	= 1,
558 	V4L2_MPEG_VIDEO_MPEG4_LEVEL_1	= 2,
559 	V4L2_MPEG_VIDEO_MPEG4_LEVEL_2	= 3,
560 	V4L2_MPEG_VIDEO_MPEG4_LEVEL_3	= 4,
561 	V4L2_MPEG_VIDEO_MPEG4_LEVEL_3B	= 5,
562 	V4L2_MPEG_VIDEO_MPEG4_LEVEL_4	= 6,
563 	V4L2_MPEG_VIDEO_MPEG4_LEVEL_5	= 7,
564 };
565 #define V4L2_CID_MPEG_VIDEO_MPEG4_PROFILE	(V4L2_CID_MPEG_BASE+406)
566 enum v4l2_mpeg_video_mpeg4_profile {
567 	V4L2_MPEG_VIDEO_MPEG4_PROFILE_SIMPLE				= 0,
568 	V4L2_MPEG_VIDEO_MPEG4_PROFILE_ADVANCED_SIMPLE			= 1,
569 	V4L2_MPEG_VIDEO_MPEG4_PROFILE_CORE				= 2,
570 	V4L2_MPEG_VIDEO_MPEG4_PROFILE_SIMPLE_SCALABLE			= 3,
571 	V4L2_MPEG_VIDEO_MPEG4_PROFILE_ADVANCED_CODING_EFFICIENCY	= 4,
572 };
573 #define V4L2_CID_MPEG_VIDEO_MPEG4_QPEL		(V4L2_CID_MPEG_BASE+407)
574 
575 /*  Control IDs for VP8 streams
576  *  Although VP8 is not part of MPEG we add these controls to the MPEG class
577  *  as that class is already handling other video compression standards
578  */
579 #define V4L2_CID_MPEG_VIDEO_VPX_NUM_PARTITIONS		(V4L2_CID_MPEG_BASE+500)
580 enum v4l2_vp8_num_partitions {
581 	V4L2_CID_MPEG_VIDEO_VPX_1_PARTITION	= 0,
582 	V4L2_CID_MPEG_VIDEO_VPX_2_PARTITIONS	= 1,
583 	V4L2_CID_MPEG_VIDEO_VPX_4_PARTITIONS	= 2,
584 	V4L2_CID_MPEG_VIDEO_VPX_8_PARTITIONS	= 3,
585 };
586 #define V4L2_CID_MPEG_VIDEO_VPX_IMD_DISABLE_4X4		(V4L2_CID_MPEG_BASE+501)
587 #define V4L2_CID_MPEG_VIDEO_VPX_NUM_REF_FRAMES		(V4L2_CID_MPEG_BASE+502)
588 enum v4l2_vp8_num_ref_frames {
589 	V4L2_CID_MPEG_VIDEO_VPX_1_REF_FRAME	= 0,
590 	V4L2_CID_MPEG_VIDEO_VPX_2_REF_FRAME	= 1,
591 	V4L2_CID_MPEG_VIDEO_VPX_3_REF_FRAME	= 2,
592 };
593 #define V4L2_CID_MPEG_VIDEO_VPX_FILTER_LEVEL		(V4L2_CID_MPEG_BASE+503)
594 #define V4L2_CID_MPEG_VIDEO_VPX_FILTER_SHARPNESS	(V4L2_CID_MPEG_BASE+504)
595 #define V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_REF_PERIOD	(V4L2_CID_MPEG_BASE+505)
596 #define V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_SEL	(V4L2_CID_MPEG_BASE+506)
597 enum v4l2_vp8_golden_frame_sel {
598 	V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_USE_PREV		= 0,
599 	V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_USE_REF_PERIOD	= 1,
600 };
601 #define V4L2_CID_MPEG_VIDEO_VPX_MIN_QP			(V4L2_CID_MPEG_BASE+507)
602 #define V4L2_CID_MPEG_VIDEO_VPX_MAX_QP			(V4L2_CID_MPEG_BASE+508)
603 #define V4L2_CID_MPEG_VIDEO_VPX_I_FRAME_QP		(V4L2_CID_MPEG_BASE+509)
604 #define V4L2_CID_MPEG_VIDEO_VPX_P_FRAME_QP		(V4L2_CID_MPEG_BASE+510)
605 
606 #define V4L2_CID_MPEG_VIDEO_VP8_PROFILE			(V4L2_CID_MPEG_BASE+511)
607 enum v4l2_mpeg_video_vp8_profile {
608 	V4L2_MPEG_VIDEO_VP8_PROFILE_0				= 0,
609 	V4L2_MPEG_VIDEO_VP8_PROFILE_1				= 1,
610 	V4L2_MPEG_VIDEO_VP8_PROFILE_2				= 2,
611 	V4L2_MPEG_VIDEO_VP8_PROFILE_3				= 3,
612 };
613 /* Deprecated alias for compatibility reasons. */
614 #define V4L2_CID_MPEG_VIDEO_VPX_PROFILE	V4L2_CID_MPEG_VIDEO_VP8_PROFILE
615 #define V4L2_CID_MPEG_VIDEO_VP9_PROFILE			(V4L2_CID_MPEG_BASE+512)
616 enum v4l2_mpeg_video_vp9_profile {
617 	V4L2_MPEG_VIDEO_VP9_PROFILE_0				= 0,
618 	V4L2_MPEG_VIDEO_VP9_PROFILE_1				= 1,
619 	V4L2_MPEG_VIDEO_VP9_PROFILE_2				= 2,
620 	V4L2_MPEG_VIDEO_VP9_PROFILE_3				= 3,
621 };
622 
623 /* CIDs for HEVC encoding. */
624 
625 #define V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP		(V4L2_CID_MPEG_BASE + 600)
626 #define V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP		(V4L2_CID_MPEG_BASE + 601)
627 #define V4L2_CID_MPEG_VIDEO_HEVC_I_FRAME_QP	(V4L2_CID_MPEG_BASE + 602)
628 #define V4L2_CID_MPEG_VIDEO_HEVC_P_FRAME_QP	(V4L2_CID_MPEG_BASE + 603)
629 #define V4L2_CID_MPEG_VIDEO_HEVC_B_FRAME_QP	(V4L2_CID_MPEG_BASE + 604)
630 #define V4L2_CID_MPEG_VIDEO_HEVC_HIER_QP	(V4L2_CID_MPEG_BASE + 605)
631 #define V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_TYPE (V4L2_CID_MPEG_BASE + 606)
632 enum v4l2_mpeg_video_hevc_hier_coding_type {
633 	V4L2_MPEG_VIDEO_HEVC_HIERARCHICAL_CODING_B	= 0,
634 	V4L2_MPEG_VIDEO_HEVC_HIERARCHICAL_CODING_P	= 1,
635 };
636 #define V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_LAYER	(V4L2_CID_MPEG_BASE + 607)
637 #define V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L0_QP	(V4L2_CID_MPEG_BASE + 608)
638 #define V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L1_QP	(V4L2_CID_MPEG_BASE + 609)
639 #define V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L2_QP	(V4L2_CID_MPEG_BASE + 610)
640 #define V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L3_QP	(V4L2_CID_MPEG_BASE + 611)
641 #define V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L4_QP	(V4L2_CID_MPEG_BASE + 612)
642 #define V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L5_QP	(V4L2_CID_MPEG_BASE + 613)
643 #define V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L6_QP	(V4L2_CID_MPEG_BASE + 614)
644 #define V4L2_CID_MPEG_VIDEO_HEVC_PROFILE	(V4L2_CID_MPEG_BASE + 615)
645 enum v4l2_mpeg_video_hevc_profile {
646 	V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN = 0,
647 	V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN_STILL_PICTURE = 1,
648 	V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN_10 = 2,
649 };
650 #define V4L2_CID_MPEG_VIDEO_HEVC_LEVEL		(V4L2_CID_MPEG_BASE + 616)
651 
652 enum v4l2_mpeg_video_hevc_level {
653 	V4L2_MPEG_VIDEO_HEVC_LEVEL_1	= 0,
654 	V4L2_MPEG_VIDEO_HEVC_LEVEL_2	= 1,
655 	V4L2_MPEG_VIDEO_HEVC_LEVEL_2_1	= 2,
656 	V4L2_MPEG_VIDEO_HEVC_LEVEL_3	= 3,
657 	V4L2_MPEG_VIDEO_HEVC_LEVEL_3_1	= 4,
658 	V4L2_MPEG_VIDEO_HEVC_LEVEL_4	= 5,
659 	V4L2_MPEG_VIDEO_HEVC_LEVEL_4_1	= 6,
660 	V4L2_MPEG_VIDEO_HEVC_LEVEL_5	= 7,
661 	V4L2_MPEG_VIDEO_HEVC_LEVEL_5_1	= 8,
662 	V4L2_MPEG_VIDEO_HEVC_LEVEL_5_2	= 9,
663 	V4L2_MPEG_VIDEO_HEVC_LEVEL_6	= 10,
664 	V4L2_MPEG_VIDEO_HEVC_LEVEL_6_1	= 11,
665 	V4L2_MPEG_VIDEO_HEVC_LEVEL_6_2	= 12,
666 	V4L2_MPEG_VIDEO_HEVC_LEVEL_UNKNOWN	= 13,
667 };
668 
669 #define V4L2_CID_MPEG_VIDEO_HEVC_FRAME_RATE_RESOLUTION	(V4L2_CID_MPEG_BASE + 617)
670 #define V4L2_CID_MPEG_VIDEO_HEVC_TIER			(V4L2_CID_MPEG_BASE + 618)
671 enum v4l2_mpeg_video_hevc_tier {
672 	V4L2_MPEG_VIDEO_HEVC_TIER_MAIN = 0,
673 	V4L2_MPEG_VIDEO_HEVC_TIER_HIGH = 1,
674 };
675 #define V4L2_CID_MPEG_VIDEO_HEVC_MAX_PARTITION_DEPTH	(V4L2_CID_MPEG_BASE + 619)
676 #define V4L2_CID_MPEG_VIDEO_HEVC_LOOP_FILTER_MODE	(V4L2_CID_MPEG_BASE + 620)
677 enum v4l2_cid_mpeg_video_hevc_loop_filter_mode {
678 	V4L2_MPEG_VIDEO_HEVC_LOOP_FILTER_MODE_DISABLED			 = 0,
679 	V4L2_MPEG_VIDEO_HEVC_LOOP_FILTER_MODE_ENABLED			 = 1,
680 	V4L2_MPEG_VIDEO_HEVC_LOOP_FILTER_MODE_DISABLED_AT_SLICE_BOUNDARY = 2,
681 };
682 #define V4L2_CID_MPEG_VIDEO_HEVC_LF_BETA_OFFSET_DIV2	(V4L2_CID_MPEG_BASE + 621)
683 #define V4L2_CID_MPEG_VIDEO_HEVC_LF_TC_OFFSET_DIV2	(V4L2_CID_MPEG_BASE + 622)
684 #define V4L2_CID_MPEG_VIDEO_HEVC_REFRESH_TYPE		(V4L2_CID_MPEG_BASE + 623)
685 enum v4l2_cid_mpeg_video_hevc_refresh_type {
686 	V4L2_MPEG_VIDEO_HEVC_REFRESH_NONE		= 0,
687 	V4L2_MPEG_VIDEO_HEVC_REFRESH_CRA		= 1,
688 	V4L2_MPEG_VIDEO_HEVC_REFRESH_IDR		= 2,
689 };
690 #define V4L2_CID_MPEG_VIDEO_HEVC_REFRESH_PERIOD		(V4L2_CID_MPEG_BASE + 624)
691 #define V4L2_CID_MPEG_VIDEO_HEVC_LOSSLESS_CU		(V4L2_CID_MPEG_BASE + 625)
692 #define V4L2_CID_MPEG_VIDEO_HEVC_CONST_INTRA_PRED	(V4L2_CID_MPEG_BASE + 626)
693 #define V4L2_CID_MPEG_VIDEO_HEVC_WAVEFRONT		(V4L2_CID_MPEG_BASE + 627)
694 #define V4L2_CID_MPEG_VIDEO_HEVC_GENERAL_PB		(V4L2_CID_MPEG_BASE + 628)
695 #define V4L2_CID_MPEG_VIDEO_HEVC_TEMPORAL_ID		(V4L2_CID_MPEG_BASE + 629)
696 #define V4L2_CID_MPEG_VIDEO_HEVC_STRONG_SMOOTHING	(V4L2_CID_MPEG_BASE + 630)
697 #define V4L2_CID_MPEG_VIDEO_HEVC_MAX_NUM_MERGE_MV_MINUS1	(V4L2_CID_MPEG_BASE + 631)
698 #define V4L2_CID_MPEG_VIDEO_HEVC_INTRA_PU_SPLIT		(V4L2_CID_MPEG_BASE + 632)
699 #define V4L2_CID_MPEG_VIDEO_HEVC_TMV_PREDICTION		(V4L2_CID_MPEG_BASE + 633)
700 #define V4L2_CID_MPEG_VIDEO_HEVC_WITHOUT_STARTCODE	(V4L2_CID_MPEG_BASE + 634)
701 #define V4L2_CID_MPEG_VIDEO_HEVC_SIZE_OF_LENGTH_FIELD	(V4L2_CID_MPEG_BASE + 635)
702 enum v4l2_cid_mpeg_video_hevc_size_of_length_field {
703 	V4L2_MPEG_VIDEO_HEVC_SIZE_0		= 0,
704 	V4L2_MPEG_VIDEO_HEVC_SIZE_1		= 1,
705 	V4L2_MPEG_VIDEO_HEVC_SIZE_2		= 2,
706 	V4L2_MPEG_VIDEO_HEVC_SIZE_4		= 3,
707 };
708 #define V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L0_BR	(V4L2_CID_MPEG_BASE + 636)
709 #define V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L1_BR	(V4L2_CID_MPEG_BASE + 637)
710 #define V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L2_BR	(V4L2_CID_MPEG_BASE + 638)
711 #define V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L3_BR	(V4L2_CID_MPEG_BASE + 639)
712 #define V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L4_BR	(V4L2_CID_MPEG_BASE + 640)
713 #define V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L5_BR	(V4L2_CID_MPEG_BASE + 641)
714 #define V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L6_BR	(V4L2_CID_MPEG_BASE + 642)
715 #define V4L2_CID_MPEG_VIDEO_REF_NUMBER_FOR_PFRAMES	(V4L2_CID_MPEG_BASE + 643)
716 #define V4L2_CID_MPEG_VIDEO_PREPEND_SPSPPS_TO_IDR	(V4L2_CID_MPEG_BASE + 644)
717 
718 /*  MPEG-class control IDs specific to the CX2341x driver as defined by V4L2 */
719 #define V4L2_CID_MPEG_CX2341X_BASE				(V4L2_CTRL_CLASS_MPEG | 0x1000)
720 #define V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE		(V4L2_CID_MPEG_CX2341X_BASE+0)
721 enum v4l2_mpeg_cx2341x_video_spatial_filter_mode {
722 	V4L2_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE_MANUAL = 0,
723 	V4L2_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE_AUTO   = 1,
724 };
725 #define V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER		(V4L2_CID_MPEG_CX2341X_BASE+1)
726 #define V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE	(V4L2_CID_MPEG_CX2341X_BASE+2)
727 enum v4l2_mpeg_cx2341x_video_luma_spatial_filter_type {
728 	V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_OFF                  = 0,
729 	V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_1D_HOR               = 1,
730 	V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_1D_VERT              = 2,
731 	V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_2D_HV_SEPARABLE      = 3,
732 	V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_2D_SYM_NON_SEPARABLE = 4,
733 };
734 #define V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE	(V4L2_CID_MPEG_CX2341X_BASE+3)
735 enum v4l2_mpeg_cx2341x_video_chroma_spatial_filter_type {
736 	V4L2_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE_OFF    = 0,
737 	V4L2_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE_1D_HOR = 1,
738 };
739 #define V4L2_CID_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE	(V4L2_CID_MPEG_CX2341X_BASE+4)
740 enum v4l2_mpeg_cx2341x_video_temporal_filter_mode {
741 	V4L2_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE_MANUAL = 0,
742 	V4L2_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE_AUTO   = 1,
743 };
744 #define V4L2_CID_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER		(V4L2_CID_MPEG_CX2341X_BASE+5)
745 #define V4L2_CID_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE		(V4L2_CID_MPEG_CX2341X_BASE+6)
746 enum v4l2_mpeg_cx2341x_video_median_filter_type {
747 	V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_OFF      = 0,
748 	V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_HOR      = 1,
749 	V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_VERT     = 2,
750 	V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_HOR_VERT = 3,
751 	V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_DIAG     = 4,
752 };
753 #define V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_MEDIAN_FILTER_BOTTOM	(V4L2_CID_MPEG_CX2341X_BASE+7)
754 #define V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_MEDIAN_FILTER_TOP	(V4L2_CID_MPEG_CX2341X_BASE+8)
755 #define V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_BOTTOM	(V4L2_CID_MPEG_CX2341X_BASE+9)
756 #define V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_TOP	(V4L2_CID_MPEG_CX2341X_BASE+10)
757 #define V4L2_CID_MPEG_CX2341X_STREAM_INSERT_NAV_PACKETS		(V4L2_CID_MPEG_CX2341X_BASE+11)
758 
759 /*  MPEG-class control IDs specific to the Samsung MFC 5.1 driver as defined by V4L2 */
760 #define V4L2_CID_MPEG_MFC51_BASE				(V4L2_CTRL_CLASS_MPEG | 0x1100)
761 
762 #define V4L2_CID_MPEG_MFC51_VIDEO_DECODER_H264_DISPLAY_DELAY		(V4L2_CID_MPEG_MFC51_BASE+0)
763 #define V4L2_CID_MPEG_MFC51_VIDEO_DECODER_H264_DISPLAY_DELAY_ENABLE	(V4L2_CID_MPEG_MFC51_BASE+1)
764 #define V4L2_CID_MPEG_MFC51_VIDEO_FRAME_SKIP_MODE			(V4L2_CID_MPEG_MFC51_BASE+2)
765 enum v4l2_mpeg_mfc51_video_frame_skip_mode {
766 	V4L2_MPEG_MFC51_VIDEO_FRAME_SKIP_MODE_DISABLED		= 0,
767 	V4L2_MPEG_MFC51_VIDEO_FRAME_SKIP_MODE_LEVEL_LIMIT	= 1,
768 	V4L2_MPEG_MFC51_VIDEO_FRAME_SKIP_MODE_BUF_LIMIT		= 2,
769 };
770 #define V4L2_CID_MPEG_MFC51_VIDEO_FORCE_FRAME_TYPE			(V4L2_CID_MPEG_MFC51_BASE+3)
771 enum v4l2_mpeg_mfc51_video_force_frame_type {
772 	V4L2_MPEG_MFC51_VIDEO_FORCE_FRAME_TYPE_DISABLED		= 0,
773 	V4L2_MPEG_MFC51_VIDEO_FORCE_FRAME_TYPE_I_FRAME		= 1,
774 	V4L2_MPEG_MFC51_VIDEO_FORCE_FRAME_TYPE_NOT_CODED	= 2,
775 };
776 #define V4L2_CID_MPEG_MFC51_VIDEO_PADDING				(V4L2_CID_MPEG_MFC51_BASE+4)
777 #define V4L2_CID_MPEG_MFC51_VIDEO_PADDING_YUV				(V4L2_CID_MPEG_MFC51_BASE+5)
778 #define V4L2_CID_MPEG_MFC51_VIDEO_RC_FIXED_TARGET_BIT			(V4L2_CID_MPEG_MFC51_BASE+6)
779 #define V4L2_CID_MPEG_MFC51_VIDEO_RC_REACTION_COEFF			(V4L2_CID_MPEG_MFC51_BASE+7)
780 #define V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_ACTIVITY		(V4L2_CID_MPEG_MFC51_BASE+50)
781 #define V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_DARK			(V4L2_CID_MPEG_MFC51_BASE+51)
782 #define V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_SMOOTH		(V4L2_CID_MPEG_MFC51_BASE+52)
783 #define V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_STATIC		(V4L2_CID_MPEG_MFC51_BASE+53)
784 #define V4L2_CID_MPEG_MFC51_VIDEO_H264_NUM_REF_PIC_FOR_P		(V4L2_CID_MPEG_MFC51_BASE+54)
785 
786 /*  MPEG-class control IDs specific to the msm_vidc driver */
787 #define V4L2_CID_MPEG_MSM_VIDC_BASE		(V4L2_CTRL_CLASS_MPEG | 0x2000)
788 
789 #define V4L2_MPEG_MSM_VIDC_DISABLE 0
790 #define V4L2_MPEG_MSM_VIDC_ENABLE 1
791 
792 #define V4L2_CID_MPEG_VIDC_VIDEO_PICTYPE_DEC_MODE \
793 			(V4L2_CID_MPEG_MSM_VIDC_BASE+0)
794 enum v4l2_mpeg_vidc_video_pictype_dec_mode {
795 	V4L2_MPEG_VIDC_VIDEO_PICTYPE_DECODE_I = 1,
796 	V4L2_MPEG_VIDC_VIDEO_PICTYPE_DECODE_P = 2,
797 	V4L2_MPEG_VIDC_VIDEO_PICTYPE_DECODE_B = 4,
798 };
799 
800 enum v4l2_mpeg_vidc_video_pictype_dec_enable {
801 	V4L2_MPEG_VIDC_VIDEO_PICTYPE_DECODE_OFF = 0,
802 	V4L2_MPEG_VIDC_VIDEO_PICTYPE_DECODE_ON = 1,
803 };
804 
805 #define V4L2_CID_MPEG_VIDC_VIDEO_KEEP_ASPECT_RATIO \
806 	(V4L2_CID_MPEG_MSM_VIDC_BASE+1)
807 
808 #define V4L2_CID_MPEG_VIDC_VIDEO_STREAM_FORMAT   (V4L2_CID_MPEG_MSM_VIDC_BASE+2)
809 enum v4l2_mpeg_vidc_video_stream_format {
810 	V4L2_MPEG_VIDC_VIDEO_NAL_FORMAT_STARTCODES         = 0,
811 	V4L2_MPEG_VIDC_VIDEO_NAL_FORMAT_ONE_NAL_PER_BUFFER = 1,
812 	V4L2_MPEG_VIDC_VIDEO_NAL_FORMAT_ONE_BYTE_LENGTH    = 2,
813 	V4L2_MPEG_VIDC_VIDEO_NAL_FORMAT_TWO_BYTE_LENGTH    = 3,
814 	V4L2_MPEG_VIDC_VIDEO_NAL_FORMAT_FOUR_BYTE_LENGTH   = 4,
815 };
816 
817 #define V4L2_CID_MPEG_VIDC_VIDEO_DECODE_ORDER   (V4L2_CID_MPEG_MSM_VIDC_BASE+3)
818 #define V4L2_CID_MPEG_VIDC_VIDEO_NUM_P_FRAMES (V4L2_CID_MPEG_MSM_VIDC_BASE+6)
819 #define V4L2_CID_MPEG_VIDC_VIDEO_NUM_B_FRAMES (V4L2_CID_MPEG_MSM_VIDC_BASE+7)
820 #define V4L2_CID_MPEG_VIDC_VIDEO_REQUEST_IFRAME (V4L2_CID_MPEG_MSM_VIDC_BASE+8)
821 
822 #define V4L2_CID_MPEG_VIDC_VIDEO_RATE_CONTROL (V4L2_CID_MPEG_MSM_VIDC_BASE+9)
823 enum v4l2_mpeg_vidc_video_rate_control {
824 	V4L2_CID_MPEG_VIDC_VIDEO_RATE_CONTROL_OFF = 0,
825 	V4L2_CID_MPEG_VIDC_VIDEO_RATE_CONTROL_VBR_VFR = 1,
826 	V4L2_CID_MPEG_VIDC_VIDEO_RATE_CONTROL_VBR_CFR = 2,
827 	V4L2_CID_MPEG_VIDC_VIDEO_RATE_CONTROL_CBR_VFR = 3,
828 	V4L2_CID_MPEG_VIDC_VIDEO_RATE_CONTROL_CBR_CFR = 4,
829 	V4L2_CID_MPEG_VIDC_VIDEO_RATE_CONTROL_MBR_CFR = 5,
830 	V4L2_CID_MPEG_VIDC_VIDEO_RATE_CONTROL_MBR_VFR = 6,
831 	V4L2_CID_MPEG_VIDC_VIDEO_RATE_CONTROL_CQ = 7,
832 };
833 #define V4L2_CID_MPEG_VIDC_VIDEO_RATE_CONTROL_MBR_CFR   \
834 		V4L2_CID_MPEG_VIDC_VIDEO_RATE_CONTROL_MBR_CFR
835 #define V4L2_CID_MPEG_VIDC_VIDEO_RATE_CONTROL_MBR_VFR   \
836 		V4L2_CID_MPEG_VIDC_VIDEO_RATE_CONTROL_MBR_VFR
837 
838 #define V4L2_CID_MPEG_VIDC_VIDEO_ROTATION (V4L2_CID_MPEG_MSM_VIDC_BASE+10)
839 enum v4l2_mpeg_vidc_video_rotation {
840 	V4L2_CID_MPEG_VIDC_VIDEO_ROTATION_NONE = 0,
841 	V4L2_CID_MPEG_VIDC_VIDEO_ROTATION_90 = 1,
842 	V4L2_CID_MPEG_VIDC_VIDEO_ROTATION_180 = 2,
843 	V4L2_CID_MPEG_VIDC_VIDEO_ROTATION_270 = 3,
844 };
845 #define V4L2_CID_MPEG_VIDC_VIDEO_H264_CABAC_MODEL \
846 		(V4L2_CID_MPEG_MSM_VIDC_BASE+11)
847 enum v4l2_mpeg_vidc_h264_cabac_model {
848 	V4L2_CID_MPEG_VIDC_VIDEO_H264_CABAC_MODEL_0 = 0,
849 	V4L2_CID_MPEG_VIDC_VIDEO_H264_CABAC_MODEL_1 = 1,
850 	V4L2_CID_MPEG_VIDC_VIDEO_H264_CABAC_MODEL_2 = 2,
851 };
852 
853 #define V4L2_CID_MPEG_VIDC_VIDEO_INTRA_REFRESH_MODE_CYCLIC \
854 		(V4L2_CID_MPEG_MSM_VIDC_BASE+12)
855 
856 #define V4L2_CID_MPEG_VIDC_VIDEO_INTRA_REFRESH_RANDOM \
857 		(V4L2_CID_MPEG_MSM_VIDC_BASE+13)
858 #define V4L2_CID_MPEG_VIDC_VIDEO_AU_DELIMITER \
859 		(V4L2_CID_MPEG_MSM_VIDC_BASE + 14)
860 
861 enum v4l2_mpeg_vidc_video_au_delimiter {
862 	V4L2_MPEG_VIDC_VIDEO_AU_DELIMITER_DISABLED = 0,
863 	V4L2_MPEG_VIDC_VIDEO_AU_DELIMITER_ENABLED = 1
864 };
865 
866 #define V4L2_CID_MPEG_VIDC_VIDEO_SYNC_FRAME_DECODE \
867 		(V4L2_CID_MPEG_MSM_VIDC_BASE + 15)
868 
869 enum v4l2_mpeg_vidc_video_sync_frame_decode {
870 	V4L2_MPEG_VIDC_VIDEO_SYNC_FRAME_DECODE_DISABLE = 0,
871 	V4L2_MPEG_VIDC_VIDEO_SYNC_FRAME_DECODE_ENABLE = 1
872 };
873 
874 #define V4L2_CID_MPEG_VIDC_VIDEO_SECURE (V4L2_CID_MPEG_MSM_VIDC_BASE+16)
875 #define V4L2_CID_MPEG_VIDC_VIDEO_EXTRADATA \
876 		(V4L2_CID_MPEG_MSM_VIDC_BASE + 17)
877 enum v4l2_mpeg_vidc_extradata {
878 #define EXTRADATA_NONE \
879 	EXTRADATA_NONE
880 	EXTRADATA_NONE = 0,
881 	EXTRADATA_DEFAULT = 1,
882 	EXTRADATA_ADVANCED = 2,
883 	EXTRADATA_ENC_INPUT_ROI = 4,
884 	EXTRADATA_ENC_INPUT_HDR10PLUS = 8,
885 	EXTRADATA_ENC_INPUT_CVP = 16,
886 };
887 enum v4l2_mpeg_vidc3x_extradata {
888 		V4L2_MPEG_VIDC_EXTRADATA_NONE = 0,
889 	V4L2_MPEG_VIDC_EXTRADATA_MB_QUANTIZATION = 1,
890 	V4L2_MPEG_VIDC_EXTRADATA_INTERLACE_VIDEO = 2,
891  #define V4L2_MPEG_VIDC_EXTRADATA_ENC_DTS \
892 	V4L2_MPEG_VIDC_EXTRADATA_ENC_DTS
893 	V4L2_MPEG_VIDC_EXTRADATA_ENC_DTS = 3,
894 	V4L2_MPEG_VIDC_EXTRADATA_VC1_FRAMEDISP = 4,
895 	V4L2_MPEG_VIDC_EXTRADATA_TIMESTAMP = 5,
896 	V4L2_MPEG_VIDC_EXTRADATA_S3D_FRAME_PACKING = 6,
897 	V4L2_MPEG_VIDC_EXTRADATA_FRAME_RATE = 7,
898 	V4L2_MPEG_VIDC_EXTRADATA_PANSCAN_WINDOW = 8,
899 	V4L2_MPEG_VIDC_EXTRADATA_RECOVERY_POINT_SEI = 9,
900 	V4L2_MPEG_VIDC_EXTRADATA_MULTISLICE_INFO = 10,
901 	V4L2_MPEG_VIDC_EXTRADATA_NUM_CONCEALED_MB = 11,
902 	V4L2_MPEG_VIDC_EXTRADATA_METADATA_FILLER = 12,
903 #define V4L2_MPEG_VIDC_EXTRADATA_INPUT_CROP \
904 	V4L2_MPEG_VIDC_EXTRADATA_INPUT_CROP
905 	V4L2_MPEG_VIDC_EXTRADATA_INPUT_CROP = 13,
906 	V4L2_MPEG_VIDC_EXTRADATA_DIGITAL_ZOOM = 14,
907 	V4L2_MPEG_VIDC_EXTRADATA_ASPECT_RATIO = 15,
908 	V4L2_MPEG_VIDC_EXTRADATA_MPEG2_SEQDISP = 16,
909 	V4L2_MPEG_VIDC_EXTRADATA_STREAM_USERDATA = 17,
910 	V4L2_MPEG_VIDC_EXTRADATA_FRAME_QP = 18,
911 	V4L2_MPEG_VIDC_EXTRADATA_FRAME_BITS_INFO = 19,
912 	V4L2_MPEG_VIDC_EXTRADATA_LTR = 20,
913 	V4L2_MPEG_VIDC_EXTRADATA_METADATA_MBI = 21,
914 	V4L2_MPEG_VIDC_EXTRADATA_VQZIP_SEI = 22,
915 #define V4L2_MPEG_VIDC_EXTRADATA_HDR10PLUS_METADATA \
916 	V4L2_MPEG_VIDC_EXTRADATA_HDR10PLUS_METADATA
917 	V4L2_MPEG_VIDC_EXTRADATA_HDR10PLUS_METADATA = 23,
918 	V4L2_MPEG_VIDC_EXTRADATA_ROI_QP = 24,
919 #define V4L2_MPEG_VIDC_EXTRADATA_OUTPUT_CROP \
920 	V4L2_MPEG_VIDC_EXTRADATA_OUTPUT_CROP
921 	V4L2_MPEG_VIDC_EXTRADATA_OUTPUT_CROP = 25,
922 #define V4L2_MPEG_VIDC_EXTRADATA_DISPLAY_COLOUR_SEI \
923 	V4L2_MPEG_VIDC_EXTRADATA_DISPLAY_COLOUR_SEI
924 	V4L2_MPEG_VIDC_EXTRADATA_DISPLAY_COLOUR_SEI = 26,
925 #define V4L2_MPEG_VIDC_EXTRADATA_CONTENT_LIGHT_LEVEL_SEI \
926 	V4L2_MPEG_VIDC_EXTRADATA_CONTENT_LIGHT_LEVEL_SEI
927 	V4L2_MPEG_VIDC_EXTRADATA_CONTENT_LIGHT_LEVEL_SEI = 27,
928 #define V4L2_MPEG_VIDC_EXTRADATA_PQ_INFO \
929 	V4L2_MPEG_VIDC_EXTRADATA_PQ_INFO
930 	V4L2_MPEG_VIDC_EXTRADATA_PQ_INFO = 28,
931 #define V4L2_MPEG_VIDC_EXTRADATA_VUI_DISPLAY \
932 	V4L2_MPEG_VIDC_EXTRADATA_VUI_DISPLAY
933 	V4L2_MPEG_VIDC_EXTRADATA_VUI_DISPLAY = 29,
934 #define V4L2_MPEG_VIDC_EXTRADATA_VPX_COLORSPACE \
935 	V4L2_MPEG_VIDC_EXTRADATA_VPX_COLORSPACE
936 	V4L2_MPEG_VIDC_EXTRADATA_VPX_COLORSPACE = 30,
937 #define V4L2_MPEG_VIDC_EXTRADATA_UBWC_CR_STATS_INFO \
938 	V4L2_MPEG_VIDC_EXTRADATA_UBWC_CR_STATS_INFO
939 	V4L2_MPEG_VIDC_EXTRADATA_UBWC_CR_STATS_INFO = 31,
940 #define V4L2_MPEG_VIDC_EXTRADATA_ENC_FRAME_QP \
941 	V4L2_MPEG_VIDC_EXTRADATA_ENC_FRAME_QP
942 	V4L2_MPEG_VIDC_EXTRADATA_ENC_FRAME_QP = 32,
943 	V4L2_MPEG_VIDC_EXTRADATA_VC1_SEQDISP = 33,
944 	V4L2_MPEG_VIDC_EXTRADATA_YUV_STATS = 34,
945 };
946 
947 enum v4l2_mpeg_cvp_extradata {
948 	V4L2_MPEG_CVP_EXTRADATA_NONE = 0,
949 	V4L2_MPEG_CVP_EXTRADATA_INTERLACE_VIDEO = 2,
950 	V4L2_MPEG_CVP_EXTRADATA_TIMESTAMP = 5,
951 	V4L2_MPEG_CVP_EXTRADATA_S3D_FRAME_PACKING = 6,
952 	V4L2_MPEG_CVP_EXTRADATA_FRAME_RATE = 7,
953 	V4L2_MPEG_CVP_EXTRADATA_PANSCAN_WINDOW = 8,
954 	V4L2_MPEG_CVP_EXTRADATA_RECOVERY_POINT_SEI = 9,
955 	V4L2_MPEG_CVP_EXTRADATA_NUM_CONCEALED_MB = 11,
956 	V4L2_MPEG_CVP_EXTRADATA_ASPECT_RATIO = 15,
957 	V4L2_MPEG_CVP_EXTRADATA_MPEG2_SEQDISP = 16,
958 	V4L2_MPEG_CVP_EXTRADATA_STREAM_USERDATA = 17,
959 	V4L2_MPEG_CVP_EXTRADATA_FRAME_QP = 18,
960 	V4L2_MPEG_CVP_EXTRADATA_LTR = 20,
961 #define V4L2_MPEG_CVP_EXTRADATA_HDR10PLUS_METADATA \
962 	V4L2_MPEG_CVP_EXTRADATA_HDR10PLUS_METADATA
963 	V4L2_MPEG_CVP_EXTRADATA_HDR10PLUS_METADATA = 23,
964 	V4L2_MPEG_CVP_EXTRADATA_ROI_QP = 24,
965 	V4L2_MPEG_CVP_EXTRADATA_OUTPUT_CROP = 25,
966 	V4L2_MPEG_CVP_EXTRADATA_DISPLAY_COLOUR_SEI = 26,
967 	V4L2_MPEG_CVP_EXTRADATA_CONTENT_LIGHT_LEVEL_SEI = 27,
968 	V4L2_MPEG_CVP_EXTRADATA_VUI_DISPLAY = 29,
969 	V4L2_MPEG_CVP_EXTRADATA_VPX_COLORSPACE = 30,
970 	V4L2_MPEG_CVP_EXTRADATA_UBWC_CR_STATS_INFO = 31,
971 };
972 
973 #define V4L2_CID_MPEG_VIDEO_MULTI_SLICE_DELIVERY_MODE   \
974 		(V4L2_CID_MPEG_MSM_VIDC_BASE + 18)
975 
976 #define V4L2_CID_MPEG_VIDC_VIDEO_VUI_TIMING_INFO \
977 		(V4L2_CID_MPEG_MSM_VIDC_BASE + 19)
978 
979 enum v4l2_mpeg_vidc_video_vui_timing_info {
980 	V4L2_MPEG_VIDC_VIDEO_VUI_TIMING_INFO_DISABLED = 0,
981 	V4L2_MPEG_VIDC_VIDEO_VUI_TIMING_INFO_ENABLED = 1
982 };
983 
984 #define V4L2_CID_MPEG_VIDC_VIDEO_VP8_PROFILE_LEVEL \
985 		(V4L2_CID_MPEG_MSM_VIDC_BASE + 20)
986 enum v4l2_mpeg_vidc_video_vp8_profile_level {
987 	V4L2_MPEG_VIDC_VIDEO_VP8_UNUSED,
988 	V4L2_MPEG_VIDC_VIDEO_VP8_VERSION_0,
989 	V4L2_MPEG_VIDC_VIDEO_VP8_VERSION_1,
990 	V4L2_MPEG_VIDC_VIDEO_VP8_VERSION_2,
991 	V4L2_MPEG_VIDC_VIDEO_VP8_VERSION_3,
992 };
993 
994 #define V4L2_CID_MPEG_VIDC_VIDEO_PRESERVE_TEXT_QUALITY \
995 		(V4L2_CID_MPEG_MSM_VIDC_BASE + 21)
996 enum v4l2_mpeg_vidc_video_preserve_text_quality {
997 	V4L2_MPEG_VIDC_VIDEO_PRESERVE_TEXT_QUALITY_DISABLED = 0,
998 	V4L2_MPEG_VIDC_VIDEO_PRESERVE_TEXT_QUALITY_ENABLED = 1
999 };
1000 
1001 #define V4L2_CID_MPEG_VIDC_VIDEO_MPEG2_LEVEL	(V4L2_CID_MPEG_MSM_VIDC_BASE+23)
1002 enum v4l2_mpeg_vidc_video_mpeg2_level {
1003 	V4L2_MPEG_VIDC_VIDEO_MPEG2_LEVEL_0	= 0,
1004 	V4L2_MPEG_VIDC_VIDEO_MPEG2_LEVEL_1	= 1,
1005 	V4L2_MPEG_VIDC_VIDEO_MPEG2_LEVEL_2	= 2,
1006 	V4L2_MPEG_VIDC_VIDEO_MPEG2_LEVEL_3	= 3,
1007 };
1008 #define V4L2_CID_MPEG_VIDC_VIDEO_MPEG2_PROFILE	(V4L2_CID_MPEG_MSM_VIDC_BASE+24)
1009 enum v4l2_mpeg_vidc_video_mpeg2_profile {
1010 	V4L2_MPEG_VIDC_VIDEO_MPEG2_PROFILE_SIMPLE		= 0,
1011 	V4L2_MPEG_VIDC_VIDEO_MPEG2_PROFILE_MAIN			= 1,
1012 	V4L2_MPEG_VIDC_VIDEO_MPEG2_PROFILE_HIGH			= 2,
1013 	V4L2_MPEG_VIDC_VIDEO_MPEG2_PROFILE_SNR_SCALABLE		= 3,
1014 	V4L2_MPEG_VIDC_VIDEO_MPEG2_PROFILE_SPATIAL_SCALABLE	= 4,
1015 	V4L2_MPEG_VIDC_VIDEO_MPEG2_PROFILE_422			= 5,
1016 };
1017 
1018 enum v4l2_mpeg_vidc_video_mvc_layout {
1019 	V4L2_MPEG_VIDC_VIDEO_MVC_SEQUENTIAL = 0,
1020 	V4L2_MPEG_VIDC_VIDEO_MVC_TOP_BOTTOM = 1
1021 };
1022 
1023 #define V4L2_CID_MPEG_VIDC_VIDEO_CONCEAL_COLOR \
1024 		(V4L2_CID_MPEG_MSM_VIDC_BASE + 25)
1025 
1026 #define V4L2_CID_MPEG_VIDC_VIDEO_LTRMODE \
1027 		(V4L2_CID_MPEG_MSM_VIDC_BASE + 26)
1028 
1029 enum v4l2_mpeg_vidc_video_ltrmode {
1030 	V4L2_MPEG_VIDC_VIDEO_LTR_MODE_DISABLE = 0,
1031 	V4L2_MPEG_VIDC_VIDEO_LTR_MODE_MANUAL = 1,
1032 	V4L2_MPEG_VIDC_VIDEO_LTR_MODE_PERIODIC = 2
1033 };
1034 
1035 #define V4L2_CID_MPEG_VIDC_VIDEO_LTRCOUNT \
1036 		(V4L2_CID_MPEG_MSM_VIDC_BASE + 27)
1037 
1038 #define V4L2_CID_MPEG_VIDC_VIDEO_USELTRFRAME \
1039 		(V4L2_CID_MPEG_MSM_VIDC_BASE + 28)
1040 
1041 #define V4L2_CID_MPEG_VIDC_VIDEO_MARKLTRFRAME \
1042 		(V4L2_CID_MPEG_MSM_VIDC_BASE + 29)
1043 
1044 #define V4L2_CID_MPEG_VIDC_VIDEO_HIER_P_NUM_LAYERS \
1045 		(V4L2_CID_MPEG_MSM_VIDC_BASE + 30)
1046 
1047 #define V4L2_CID_MPEG_VIDC_VIDEO_ALLOC_MODE_OUTPUT       \
1048 		(V4L2_CID_MPEG_MSM_VIDC_BASE+31)
1049 enum v4l2_mpeg_vidc_video_alloc_mode_type {
1050 	V4L2_MPEG_VIDC_VIDEO_STATIC = 0,
1051 	V4L2_MPEG_VIDC_VIDEO_RING = 1,
1052 	V4L2_MPEG_VIDC_VIDEO_DYNAMIC = 2,
1053 };
1054 
1055 #define V4L2_CID_MPEG_VIDC_VIDEO_IFRAME_X_RANGE \
1056 		(V4L2_CID_MPEG_MSM_VIDC_BASE + 32)
1057 
1058 #define V4L2_CID_MPEG_VIDC_VIDEO_PFRAME_X_RANGE \
1059 		(V4L2_CID_MPEG_MSM_VIDC_BASE + 33)
1060 
1061 #define V4L2_CID_MPEG_VIDC_VIDEO_BFRAME_X_RANGE \
1062 		(V4L2_CID_MPEG_MSM_VIDC_BASE + 34)
1063 
1064 #define V4L2_CID_MPEG_VIDC_VIDEO_IFRAME_Y_RANGE \
1065 		(V4L2_CID_MPEG_MSM_VIDC_BASE + 35)
1066 
1067 #define V4L2_CID_MPEG_VIDC_VIDEO_PFRAME_Y_RANGE \
1068 		(V4L2_CID_MPEG_MSM_VIDC_BASE + 36)
1069 
1070 #define V4L2_CID_MPEG_VIDC_VIDEO_BFRAME_Y_RANGE \
1071 		(V4L2_CID_MPEG_MSM_VIDC_BASE + 37)
1072 
1073 #define V4L2_CID_MPEG_VIDC_VIDEO_VPX_ERROR_RESILIENCE \
1074 	(V4L2_CID_MPEG_MSM_VIDC_BASE + 38)
1075 
1076 #define V4L2_CID_MPEG_VIDC_VIDEO_BUFFER_SIZE_LIMIT \
1077 		(V4L2_CID_MPEG_MSM_VIDC_BASE + 39)
1078 
1079 enum vl42_mpeg_vidc_video_vpx_error_resilience {
1080 	V4L2_MPEG_VIDC_VIDEO_VPX_ERROR_RESILIENCE_DISABLED = 0,
1081 	V4L2_MPEG_VIDC_VIDEO_VPX_ERROR_RESILIENCE_ENABLED = 1,
1082 };
1083 
1084 #define V4L2_CID_MPEG_VIDC_VIDEO_HEVC_PROFILE \
1085 	(V4L2_CID_MPEG_MSM_VIDC_BASE + 40)
1086 enum v4l2_cid_mpeg_video_hevc_profile {
1087 	V4L2_MPEG_VIDC_VIDEO_HEVC_PROFILE_MAIN			= 0,
1088 	V4L2_MPEG_VIDC_VIDEO_HEVC_PROFILE_MAIN10		= 1,
1089 	V4L2_MPEG_VIDC_VIDEO_HEVC_PROFILE_MAIN_STILL_PIC	= 2,
1090 };
1091 
1092 #define V4L2_CID_MPEG_VIDC_VIDEO_HEVC_TIER_LEVEL \
1093 	(V4L2_CID_MPEG_MSM_VIDC_BASE + 41)
1094 enum v4l2_cid_mpeg_video_hevc_level {
1095 	V4L2_MPEG_VIDC_VIDEO_HEVC_LEVEL_MAIN_TIER_LEVEL_1	= 0,
1096 	V4L2_MPEG_VIDC_VIDEO_HEVC_LEVEL_HIGH_TIER_LEVEL_1	= 1,
1097 	V4L2_MPEG_VIDC_VIDEO_HEVC_LEVEL_MAIN_TIER_LEVEL_2	= 2,
1098 	V4L2_MPEG_VIDC_VIDEO_HEVC_LEVEL_HIGH_TIER_LEVEL_2	= 3,
1099 	V4L2_MPEG_VIDC_VIDEO_HEVC_LEVEL_MAIN_TIER_LEVEL_2_1	= 4,
1100 	V4L2_MPEG_VIDC_VIDEO_HEVC_LEVEL_HIGH_TIER_LEVEL_2_1	= 5,
1101 	V4L2_MPEG_VIDC_VIDEO_HEVC_LEVEL_MAIN_TIER_LEVEL_3	= 6,
1102 	V4L2_MPEG_VIDC_VIDEO_HEVC_LEVEL_HIGH_TIER_LEVEL_3	= 7,
1103 	V4L2_MPEG_VIDC_VIDEO_HEVC_LEVEL_MAIN_TIER_LEVEL_3_1	= 8,
1104 	V4L2_MPEG_VIDC_VIDEO_HEVC_LEVEL_HIGH_TIER_LEVEL_3_1	= 9,
1105 	V4L2_MPEG_VIDC_VIDEO_HEVC_LEVEL_MAIN_TIER_LEVEL_4	= 10,
1106 	V4L2_MPEG_VIDC_VIDEO_HEVC_LEVEL_HIGH_TIER_LEVEL_4	= 11,
1107 	V4L2_MPEG_VIDC_VIDEO_HEVC_LEVEL_MAIN_TIER_LEVEL_4_1	= 12,
1108 	V4L2_MPEG_VIDC_VIDEO_HEVC_LEVEL_HIGH_TIER_LEVEL_4_1	= 13,
1109 	V4L2_MPEG_VIDC_VIDEO_HEVC_LEVEL_MAIN_TIER_LEVEL_5	= 14,
1110 	V4L2_MPEG_VIDC_VIDEO_HEVC_LEVEL_HIGH_TIER_LEVEL_5	= 15,
1111 	V4L2_MPEG_VIDC_VIDEO_HEVC_LEVEL_MAIN_TIER_LEVEL_5_1	= 16,
1112 	V4L2_MPEG_VIDC_VIDEO_HEVC_LEVEL_HIGH_TIER_LEVEL_5_1	= 17,
1113 	V4L2_MPEG_VIDC_VIDEO_HEVC_LEVEL_MAIN_TIER_LEVEL_5_2	= 18,
1114 	V4L2_MPEG_VIDC_VIDEO_HEVC_LEVEL_HIGH_TIER_LEVEL_5_2	= 19,
1115 	V4L2_MPEG_VIDC_VIDEO_HEVC_LEVEL_MAIN_TIER_LEVEL_6	= 20,
1116 	V4L2_MPEG_VIDC_VIDEO_HEVC_LEVEL_HIGH_TIER_LEVEL_6	= 21,
1117 	V4L2_MPEG_VIDC_VIDEO_HEVC_LEVEL_MAIN_TIER_LEVEL_6_1	= 22,
1118 	V4L2_MPEG_VIDC_VIDEO_HEVC_LEVEL_HIGH_TIER_LEVEL_6_1	= 23,
1119 	V4L2_MPEG_VIDC_VIDEO_HEVC_LEVEL_MAIN_TIER_LEVEL_6_2	= 24,
1120 	V4L2_MPEG_VIDC_VIDEO_HEVC_LEVEL_HIGH_TIER_LEVEL_6_2	= 25,
1121 #define V4L2_MPEG_VIDC_VIDEO_HEVC_LEVEL_UNKNOWN \
1122 	V4L2_MPEG_VIDC_VIDEO_HEVC_LEVEL_UNKNOWN
1123 	V4L2_MPEG_VIDC_VIDEO_HEVC_LEVEL_UNKNOWN = 26,
1124 };
1125 
1126 #define V4L2_CID_MPEG_VIDC_VIDEO_HIER_B_NUM_LAYERS \
1127 		(V4L2_CID_MPEG_MSM_VIDC_BASE + 42)
1128 
1129 #define V4L2_CID_MPEG_VIDC_VIDEO_HYBRID_HIERP_MODE \
1130 		(V4L2_CID_MPEG_MSM_VIDC_BASE + 43)
1131 
1132 #define V4L2_CID_MPEG_VIDC_VIDEO_DPB_COLOR_FORMAT \
1133 		(V4L2_CID_MPEG_MSM_VIDC_BASE + 44)
1134 
1135 enum v4l2_mpeg_vidc_video_dpb_color_format {
1136 	V4L2_MPEG_VIDC_VIDEO_DPB_COLOR_FMT_NONE = 0,
1137 	V4L2_MPEG_VIDC_VIDEO_DPB_COLOR_FMT_UBWC = 1,
1138 	V4L2_MPEG_VIDC_VIDEO_DPB_COLOR_FMT_TP10_UBWC = 2
1139 };
1140 
1141 #define V4L2_CID_VIDC_QBUF_MODE \
1142 		(V4L2_CID_MPEG_MSM_VIDC_BASE + 45)
1143 enum v4l2_vidc_qbuf_mode {
1144 	V4L2_VIDC_QBUF_STANDARD = 0,
1145 	V4L2_VIDC_QBUF_BATCHED = 1,
1146 };
1147 
1148 #define V4L2_CID_MPEG_VIDC_VIDEO_MAX_HIERP_LAYERS \
1149 		(V4L2_CID_MPEG_MSM_VIDC_BASE + 46)
1150 
1151 #define V4L2_CID_MPEG_VIDC_VIDEO_BASELAYER_ID \
1152 		(V4L2_CID_MPEG_MSM_VIDC_BASE + 47)
1153 
1154 #define V4L2_CID_MPEG_VIDC_VENC_PARAM_SAR_WIDTH \
1155 		(V4L2_CID_MPEG_MSM_VIDC_BASE + 48)
1156 
1157 #define V4L2_CID_MPEG_VIDC_VENC_PARAM_SAR_HEIGHT \
1158 		(V4L2_CID_MPEG_MSM_VIDC_BASE + 49)
1159 
1160 #define V4L2_CID_MPEG_VIDC_VIDEO_VQZIP_SEI	\
1161 		(V4L2_CID_MPEG_MSM_VIDC_BASE + 50)
1162 
1163 enum v4l2_mpeg_vidc_video_vqzip_sei_enable {
1164 	V4L2_CID_MPEG_VIDC_VIDEO_VQZIP_SEI_DISABLE	= 0,
1165 	V4L2_CID_MPEG_VIDC_VIDEO_VQZIP_SEI_ENABLE	= 1
1166 };
1167 
1168 #define V4L2_CID_MPEG_VIDC_VENC_PARAM_LAYER_BITRATE \
1169 		(V4L2_CID_MPEG_MSM_VIDC_BASE + 51)
1170 
1171 #define V4L2_CID_MPEG_VIDC_VIDEO_PRIORITY \
1172 		(V4L2_CID_MPEG_MSM_VIDC_BASE + 52)
1173 
1174 enum v4l2_mpeg_vidc_video_priority {
1175 	V4L2_MPEG_VIDC_VIDEO_PRIORITY_REALTIME_ENABLE = 0,
1176 	V4L2_MPEG_VIDC_VIDEO_PRIORITY_REALTIME_DISABLE = 1,
1177 };
1178 
1179 #define V4L2_CID_MPEG_VIDC_VIDEO_OPERATING_RATE \
1180 		(V4L2_CID_MPEG_MSM_VIDC_BASE + 53)
1181 
1182 #define V4L2_CID_MPEG_VIDC_VIDEO_VENC_BITRATE_TYPE \
1183 		(V4L2_CID_MPEG_MSM_VIDC_BASE + 54)
1184 
1185 enum v4l2_mpeg_vidc_video_venc_bitrate_type_enable {
1186 	V4L2_CID_MPEG_VIDC_VIDEO_VENC_BITRATE_DISABLE	= 0,
1187 	V4L2_CID_MPEG_VIDC_VIDEO_VENC_BITRATE_ENABLE	= 1
1188 };
1189 
1190 #define V4L2_CID_MPEG_VIDC_VIDEO_VPE_CSC \
1191 	(V4L2_CID_MPEG_MSM_VIDC_BASE + 55)
1192 
1193 enum v4l2_cid_mpeg_vidc_video_vpe_csc_type_enable {
1194 	V4L2_CID_MPEG_VIDC_VIDEO_VPE_CSC_DISABLE  = 0,
1195 	V4L2_CID_MPEG_VIDC_VIDEO_VPE_CSC_ENABLE   = 1
1196 };
1197 
1198 #define V4L2_CID_MPEG_VIDC_VIDEO_LOWLATENCY_MODE \
1199 		(V4L2_CID_MPEG_MSM_VIDC_BASE + 56)
1200 
1201 enum v4l2_mpeg_vidc_video_lowlatency_mode {
1202 	V4L2_CID_MPEG_VIDC_VIDEO_LOWLATENCY_DISABLE     = 0,
1203 	V4L2_CID_MPEG_VIDC_VIDEO_LOWLATENCY_ENABLE      = 1,
1204 };
1205 
1206 #define V4L2_CID_MPEG_VIDC_VIDEO_BLUR_DIMENSIONS \
1207 	(V4L2_CID_MPEG_MSM_VIDC_BASE + 57)
1208 
1209 #define V4L2_CID_MPEG_VIDC_VIDEO_BLUR_WIDTH \
1210 	(V4L2_CID_MPEG_MSM_VIDC_BASE + 58)
1211 
1212 #define V4L2_CID_MPEG_VIDC_VIDEO_BLUR_HEIGHT \
1213 	(V4L2_CID_MPEG_MSM_VIDC_BASE + 59)
1214 
1215 #define V4L2_CID_MPEG_VIDC_VIDEO_COLOR_SPACE \
1216 		(V4L2_CID_MPEG_MSM_VIDC_BASE + 60)
1217 
1218 #define V4L2_CID_MPEG_VIDC_VIDEO_FULL_RANGE \
1219 		(V4L2_CID_MPEG_MSM_VIDC_BASE + 61)
1220 
1221 enum v4l2_cid_mpeg_vidc_video_full_range {
1222 	V4L2_CID_MPEG_VIDC_VIDEO_FULL_RANGE_DISABLE = 0,
1223 	V4L2_CID_MPEG_VIDC_VIDEO_FULL_RANGE_ENABLE = 1,
1224 };
1225 
1226 #define V4L2_CID_MPEG_VIDC_VIDEO_TRANSFER_CHARS \
1227 		(V4L2_CID_MPEG_MSM_VIDC_BASE + 62)
1228 
1229 #define V4L2_CID_MPEG_VIDC_VIDEO_MATRIX_COEFFS \
1230 		(V4L2_CID_MPEG_MSM_VIDC_BASE + 63)
1231 
1232 #define V4L2_CID_MPEG_VIDC_VIDEO_IFRAME_SIZE_TYPE \
1233 		(V4L2_CID_MPEG_MSM_VIDC_BASE + 64)
1234 
1235 #define V4L2_CID_MPEG_VIDC_VIDEO_LAYER_ID \
1236 		(V4L2_CID_MPEG_MSM_VIDC_BASE + 65)
1237 
1238 #define V4L2_CID_MPEG_VIDC_VIDEO_VP9_PROFILE \
1239 		(V4L2_CID_MPEG_MSM_VIDC_BASE + 66)
1240 enum v4l2_mpeg_vidc_video_vp9_profile {
1241 	V4L2_MPEG_VIDC_VIDEO_VP9_PROFILE_UNUSED = 0,
1242 	V4L2_MPEG_VIDC_VIDEO_VP9_PROFILE_P0 = 1,
1243 	V4L2_MPEG_VIDC_VIDEO_VP9_PROFILE_P2_10 = 2,
1244 };
1245 
1246 #define V4L2_CID_MPEG_VIDC_VIDEO_VP9_LEVEL \
1247 	(V4L2_CID_MPEG_MSM_VIDC_BASE + 67)
1248 enum v4l2_mpeg_vidc_video_vp9_level {
1249 	V4L2_MPEG_VIDC_VIDEO_VP9_LEVEL_UNUSED = 0,
1250 	V4L2_MPEG_VIDC_VIDEO_VP9_LEVEL_1 = 1,
1251 	V4L2_MPEG_VIDC_VIDEO_VP9_LEVEL_11 = 2,
1252 	V4L2_MPEG_VIDC_VIDEO_VP9_LEVEL_2 = 3,
1253 	V4L2_MPEG_VIDC_VIDEO_VP9_LEVEL_21 = 4,
1254 	V4L2_MPEG_VIDC_VIDEO_VP9_LEVEL_3 = 5,
1255 	V4L2_MPEG_VIDC_VIDEO_VP9_LEVEL_31 = 6,
1256 	V4L2_MPEG_VIDC_VIDEO_VP9_LEVEL_4 = 7,
1257 	V4L2_MPEG_VIDC_VIDEO_VP9_LEVEL_41 = 8,
1258 	V4L2_MPEG_VIDC_VIDEO_VP9_LEVEL_5 = 9,
1259 	V4L2_MPEG_VIDC_VIDEO_VP9_LEVEL_51 = 10,
1260 	V4L2_MPEG_VIDC_VIDEO_VP9_LEVEL_6 = 11,
1261 	V4L2_MPEG_VIDC_VIDEO_VP9_LEVEL_61 = 12,
1262 };
1263 
1264 #define V4L2_CID_MPEG_VIDC_VIDEO_COLOR_SPACE_CAPS \
1265 	(V4L2_CID_MPEG_MSM_VIDC_BASE + 68)
1266 #define V4L2_CID_MPEG_VIDC_VIDEO_ROTATION_CAPS \
1267 	(V4L2_CID_MPEG_MSM_VIDC_BASE + 69)
1268 
1269 #define V4L2_CID_MPEG_VIDC_VIDEO_MB_ERROR_MAP_REPORTING \
1270 		(V4L2_CID_MPEG_MSM_VIDC_BASE + 70)
1271 #define V4L2_CID_MPEG_VIDC_VIDEO_CONTINUE_DATA_TRANSFER \
1272 		(V4L2_CID_MPEG_MSM_VIDC_BASE + 71)
1273 
1274 #define V4L2_CID_MPEG_VIDC_VIDEO_ALLOC_MODE_INPUT \
1275 		(V4L2_CID_MPEG_MSM_VIDC_BASE + 72)
1276 
1277 #define V4L2_CID_MPEG_VIDC_VIDEO_FRAME_ASSEMBLY	\
1278 		(V4L2_CID_MPEG_MSM_VIDC_BASE + 73)
1279 enum v4l2_mpeg_vidc_video_assembly {
1280 	V4L2_MPEG_VIDC_FRAME_ASSEMBLY_DISABLE = 0,
1281 	V4L2_MPEG_VIDC_FRAME_ASSEMBLY_ENABLE = 1,
1282 };
1283 
1284 #define V4L2_CID_MPEG_VIDC_VIDEO_H263_PROFILE\
1285 		(V4L2_CID_MPEG_MSM_VIDC_BASE + 74)
1286 enum v4l2_mpeg_vidc_video_h263_profile {
1287 	V4L2_MPEG_VIDC_VIDEO_H263_PROFILE_BASELINE = 0,
1288 	V4L2_MPEG_VIDC_VIDEO_H263_PROFILE_H320CODING	= 1,
1289 	V4L2_MPEG_VIDC_VIDEO_H263_PROFILE_BACKWARDCOMPATIBLE = 2,
1290 	V4L2_MPEG_VIDC_VIDEO_H263_PROFILE_ISWV2 = 3,
1291 	V4L2_MPEG_VIDC_VIDEO_H263_PROFILE_ISWV3 = 4,
1292 	V4L2_MPEG_VIDC_VIDEO_H263_PROFILE_HIGHCOMPRESSION = 5,
1293 	V4L2_MPEG_VIDC_VIDEO_H263_PROFILE_INTERNET = 6,
1294 	V4L2_MPEG_VIDC_VIDEO_H263_PROFILE_INTERLACE = 7,
1295 	V4L2_MPEG_VIDC_VIDEO_H263_PROFILE_HIGHLATENCY = 8,
1296 };
1297 
1298 #define V4L2_CID_MPEG_VIDC_VIDEO_OUTPUT_ORDER \
1299 		(V4L2_CID_MPEG_MSM_VIDC_BASE+75)
1300 enum v4l2_mpeg_vidc_video_output_order {
1301 	V4L2_MPEG_VIDC_VIDEO_OUTPUT_ORDER_DISPLAY         = 0,
1302 	V4L2_MPEG_VIDC_VIDEO_OUTPUT_ORDER_DECODE          = 1,
1303 };
1304 
1305 #define V4L2_CID_MPEG_VIDC_VIDEO_H264_TRANSFORM_8x8 \
1306 		(V4L2_CID_MPEG_MSM_VIDC_BASE + 76)
1307 enum v4l2_mpeg_vidc_video_h264_transform_8x8 {
1308 	V4L2_MPEG_VIDC_VIDEO_H264_TRANSFORM_8x8_DISABLE = 0,
1309 	V4L2_MPEG_VIDC_VIDEO_H264_TRANSFORM_8x8_ENABLE = 1,
1310 };
1311 
1312 #define V4L2_CID_MPEG_VIDC_VIDEO_QP_MASK \
1313 		(V4L2_CID_MPEG_MSM_VIDC_BASE + 77)
1314 
1315 #define V4L2_CID_MPEG_VIDEO_MIN_QP_PACKED \
1316 		(V4L2_CID_MPEG_MSM_VIDC_BASE + 96)
1317 #define V4L2_CID_MPEG_VIDEO_MAX_QP_PACKED \
1318 		(V4L2_CID_MPEG_MSM_VIDC_BASE + 97)
1319 #define V4L2_CID_MPEG_VIDC_VIDEO_ADAPTIVE_B \
1320 		(V4L2_CID_MPEG_MSM_VIDC_BASE + 98)
1321 #define V4L2_CID_MPEG_VIDC_VIDEO_I_FRAME_QP \
1322 		(V4L2_CID_MPEG_MSM_VIDC_BASE + 99)
1323 #define V4L2_CID_MPEG_VIDC_VIDEO_P_FRAME_QP \
1324 		(V4L2_CID_MPEG_MSM_VIDC_BASE + 100)
1325 #define V4L2_CID_MPEG_VIDC_VIDEO_B_FRAME_QP \
1326 		(V4L2_CID_MPEG_MSM_VIDC_BASE + 101)
1327 #define V4L2_CID_MPEG_VIDC_VIDEO_I_FRAME_QP_MIN \
1328 		(V4L2_CID_MPEG_MSM_VIDC_BASE + 102)
1329 #define V4L2_CID_MPEG_VIDC_VIDEO_P_FRAME_QP_MIN \
1330 		(V4L2_CID_MPEG_MSM_VIDC_BASE + 103)
1331 #define V4L2_CID_MPEG_VIDC_VIDEO_B_FRAME_QP_MIN \
1332 		(V4L2_CID_MPEG_MSM_VIDC_BASE + 104)
1333 #define V4L2_CID_MPEG_VIDC_VIDEO_I_FRAME_QP_MAX \
1334 		(V4L2_CID_MPEG_MSM_VIDC_BASE + 105)
1335 #define V4L2_CID_MPEG_VIDC_VIDEO_P_FRAME_QP_MAX \
1336 		(V4L2_CID_MPEG_MSM_VIDC_BASE + 106)
1337 #define V4L2_CID_MPEG_VIDC_VIDEO_B_FRAME_QP_MAX \
1338 		(V4L2_CID_MPEG_MSM_VIDC_BASE + 107)
1339 
1340 #define V4L2_CID_MPEG_VIDC_VIDEO_DYN_QP \
1341 		(V4L2_CID_MPEG_MSM_VIDC_BASE + 108)
1342 
1343 enum v4l2_mpeg_vidc_video_venc_iframesize_type {
1344 	V4L2_CID_MPEG_VIDC_VIDEO_IFRAME_SIZE_DEFAULT,
1345 	V4L2_CID_MPEG_VIDC_VIDEO_IFRAME_SIZE_MEDIUM,
1346 	V4L2_CID_MPEG_VIDC_VIDEO_IFRAME_SIZE_HUGE,
1347 	V4L2_CID_MPEG_VIDC_VIDEO_IFRAME_SIZE_UNLIMITED,
1348 };
1349 
1350 #define V4L2_CID_MPEG_VIDC_VIDEO_CONCEAL_COLOR_8BIT	\
1351 	(V4L2_CID_MPEG_MSM_VIDC_BASE + 109)
1352 #define V4L2_CID_MPEG_VIDC_VIDEO_CONCEAL_COLOR_10BIT \
1353 	(V4L2_CID_MPEG_MSM_VIDC_BASE + 110)
1354 
1355 #define V4L2_CID_MPEG_VIDC_VIDEO_TME_PROFILE  \
1356 		(V4L2_CID_MPEG_MSM_VIDC_BASE + 111)
1357 
1358 enum v4l2_mpeg_vidc_video_tme_profile {
1359 	V4L2_MPEG_VIDC_VIDEO_TME_PROFILE_0 = 0,
1360 	V4L2_MPEG_VIDC_VIDEO_TME_PROFILE_1 = 1,
1361 	V4L2_MPEG_VIDC_VIDEO_TME_PROFILE_2 = 2,
1362 	V4L2_MPEG_VIDC_VIDEO_TME_PROFILE_3 = 3,
1363 };
1364 
1365 #define V4L2_CID_MPEG_VIDC_VIDEO_TME_LEVEL \
1366 		(V4L2_CID_MPEG_MSM_VIDC_BASE + 112)
1367 
1368 enum v4l2_mpeg_vidc_video_tme_level {
1369 	V4L2_MPEG_VIDC_VIDEO_TME_LEVEL_INTEGER = 0,
1370 };
1371 
1372 #define V4L2_CID_MPEG_VIDC_VIDEO_TME_PAYLOAD_VERSION  \
1373 		(V4L2_CID_MPEG_MSM_VIDC_BASE + 113)
1374 
1375 #define V4L2_CID_MPEG_VIDC_VIDEO_VPE_CSC_CUSTOM_MATRIX \
1376 		(V4L2_CID_MPEG_MSM_VIDC_BASE + 114)
1377 
1378 #define V4L2_CID_MPEG_VIDC_VIDEO_FLIP (V4L2_CID_MPEG_MSM_VIDC_BASE + 115)
1379 enum v4l2_mpeg_vidc_video_flip {
1380 	V4L2_CID_MPEG_VIDC_VIDEO_FLIP_NONE = 0,
1381 	V4L2_CID_MPEG_VIDC_VIDEO_FLIP_HORI = 1,
1382 	V4L2_CID_MPEG_VIDC_VIDEO_FLIP_VERT = 2,
1383 	V4L2_CID_MPEG_VIDC_VIDEO_FLIP_BOTH = 3,
1384 };
1385 
1386 /* HDR SEI INFO related control IDs and definitions*/
1387 #define V4L2_MPEG_VIDC_VENC_HDR_INFO_ENABLED 1
1388 #define V4L2_MPEG_VIDC_VENC_HDR_INFO_DISABLED 0
1389 
1390 #define V4L2_CID_MPEG_VIDC_VENC_HDR_INFO \
1391 	(V4L2_CID_MPEG_MSM_VIDC_BASE + 116)
1392 
1393 #define  V4L2_CID_MPEG_VIDC_IMG_GRID_SIZE \
1394 	(V4L2_CID_MPEG_MSM_VIDC_BASE + 117)
1395 
1396 #define V4L2_CID_MPEG_VIDC_COMPRESSION_QUALITY \
1397 	(V4L2_CID_MPEG_MSM_VIDC_BASE + 118)
1398 
1399 #define V4L2_CID_MPEG_VIDC_VIDEO_FRAME_RATE \
1400 	(V4L2_CID_MPEG_MSM_VIDC_BASE + 119)
1401 
1402 #define V4L2_CID_MPEG_VIDC_VENC_BITRATE_SAVINGS \
1403 	(V4L2_CID_MPEG_MSM_VIDC_BASE + 131)
1404 
1405 #define V4L2_CID_MPEG_VIDC_VIDEO_HEVC_MAX_HIER_CODING_LAYER \
1406 	(V4L2_CID_MPEG_MSM_VIDC_BASE + 120)
1407 enum v4l2_mpeg_vidc_video_hevc_max_hier_coding_layer {
1408 	V4L2_MPEG_VIDC_VIDEO_HEVC_MAX_HIER_CODING_LAYER_0 = 0,
1409 	V4L2_MPEG_VIDC_VIDEO_HEVC_MAX_HIER_CODING_LAYER_1 = 1,
1410 	V4L2_MPEG_VIDC_VIDEO_HEVC_MAX_HIER_CODING_LAYER_2 = 2,
1411 	V4L2_MPEG_VIDC_VIDEO_HEVC_MAX_HIER_CODING_LAYER_3 = 3,
1412 	V4L2_MPEG_VIDC_VIDEO_HEVC_MAX_HIER_CODING_LAYER_4 = 4,
1413 	V4L2_MPEG_VIDC_VIDEO_HEVC_MAX_HIER_CODING_LAYER_5 = 5,
1414 	V4L2_MPEG_VIDC_VIDEO_HEVC_MAX_HIER_CODING_LAYER_6 = 6,
1415 };
1416 
1417 #define V4L2_CID_MPEG_VIDC_VENC_CVP_DISABLE \
1418 	(V4L2_CID_MPEG_MSM_VIDC_BASE + 121)
1419 #define V4L2_CID_MPEG_VIDC_VENC_NATIVE_RECORDER \
1420 	(V4L2_CID_MPEG_MSM_VIDC_BASE + 122)
1421 
1422 #define V4L2_CID_MPEG_VIDC_VENC_RC_TIMESTAMP_DISABLE \
1423 	(V4L2_CID_MPEG_MSM_VIDC_BASE + 123)
1424 
1425 #define V4L2_CID_MPEG_VIDC_SUPERFRAME \
1426 	(V4L2_CID_MPEG_MSM_VIDC_BASE + 124)
1427 
1428 #define V4L2_CID_MPEG_VIDC_CAPTURE_FRAME_RATE \
1429 	(V4L2_CID_MPEG_MSM_VIDC_BASE + 125)
1430 
1431 #define V4L2_CID_MPEG_VIDC_CVP_FRAME_RATE \
1432 	(V4L2_CID_MPEG_MSM_VIDC_BASE + 126)
1433 
1434 #define V4L2_CID_MPEG_VIDC_VIDEO_ROI_TYPE \
1435 	(V4L2_CID_MPEG_MSM_VIDC_BASE + 127)
1436 enum v4l2_mpeg_vidc_video_roi_type {
1437 	V4L2_CID_MPEG_VIDC_VIDEO_ROI_TYPE_NONE = 0,
1438 	V4L2_CID_MPEG_VIDC_VIDEO_ROI_TYPE_2BIT = 1,
1439 	V4L2_CID_MPEG_VIDC_VIDEO_ROI_TYPE_2BYTE = 2,
1440 };
1441 
1442 #define V4L2_CID_MPEG_VIDC_SET_PERF_LEVEL \
1443 	(V4L2_CID_MPEG_MSM_VIDC_BASE + 128)
1444 enum v4l2_mpeg_vidc_perf_level {
1445 	V4L2_CID_MPEG_VIDC_PERF_LEVEL_NOMINAL   = 0,
1446 	V4L2_CID_MPEG_VIDC_PERF_LEVEL_PERFORMANCE       = 1,
1447 	V4L2_CID_MPEG_VIDC_PERF_LEVEL_TURBO     = 2,
1448 };
1449 
1450 #define V4L2_CID_MPEG_VIDC_VIDEO_LOWLATENCY_HINT \
1451 	(V4L2_CID_MPEG_MSM_VIDC_BASE + 133)
1452 
1453 #define V4L2_CID_MPEG_VIDC_VIDEO_AIR_MBS (V4L2_CID_MPEG_MSM_VIDC_BASE + 134)
1454 #define V4L2_CID_MPEG_VIDC_VIDEO_AIR_REF (V4L2_CID_MPEG_MSM_VIDC_BASE + 135)
1455 #define V4L2_CID_MPEG_VIDC_VIDEO_CIR_MBS (V4L2_CID_MPEG_MSM_VIDC_BASE + 136)
1456 
1457 #define V4L2_CID_MPEG_VIDC_VIDEO_H264_VUI_TIMING_INFO \
1458 		(V4L2_CID_MPEG_MSM_VIDC_BASE + 137)
1459 
1460 #define V4L2_CID_MPEG_VIDEO_MULTI_SLICE_GOB \
1461 		(V4L2_CID_MPEG_MSM_VIDC_BASE + 138)
1462 
1463 #define V4L2_CID_MPEG_VIDC_VIDEO_H264_VUI_BITSTREAM_RESTRICT \
1464 		(V4L2_CID_MPEG_MSM_VIDC_BASE + 139)
1465 enum v4l2_mpeg_vidc_video_h264_vui_bitstream_restrict {
1466 	V4L2_MPEG_VIDC_VIDEO_H264_VUI_BITSTREAM_RESTRICT_DISABLED = 0,
1467 	V4L2_MPEG_VIDC_VIDEO_H264_VUI_BITSTREAM_RESTRICT_ENABLED = 1
1468 };
1469 
1470 #define V4L2_CID_MPEG_VIDC_VIDEO_DEINTERLACE \
1471 		(V4L2_CID_MPEG_MSM_VIDC_BASE + 140)
1472 enum v4l2_mpeg_vidc_video_deinterlace {
1473 	V4L2_CID_MPEG_VIDC_VIDEO_DEINTERLACE_DISABLED = 0,
1474 	V4L2_CID_MPEG_VIDC_VIDEO_DEINTERLACE_ENABLED
1475 };
1476 
1477 #define V4L2_CID_MPEG_VIDC_VIDEO_MPEG4_TIME_RESOLUTION \
1478 		(V4L2_CID_MPEG_MSM_VIDC_BASE + 141)
1479 
1480 #define V4L2_CID_MPEG_VIDC_VIDEO_REQUEST_SEQ_HEADER \
1481 		(V4L2_CID_MPEG_MSM_VIDC_BASE + 142)
1482 
1483 #define V4L2_CID_MPEG_VIDC_VIDEO_RATE_CONTROL_TIMESTAMP_MODE \
1484 		(V4L2_CID_MPEG_MSM_VIDC_BASE + 143)
1485 enum v4l2_mpeg_vidc_video_rate_control_timestamp_mode {
1486 	V4L2_MPEG_VIDC_VIDEO_RATE_CONTROL_TIMESTAMP_MODE_HONOR = 0,
1487 	V4L2_MPEG_VIDC_VIDEO_RATE_CONTROL_TIMESTAMP_MODE_IGNORE = 1,
1488 };
1489 
1490 #define V4L2_CID_MPEG_VIDC_VIDEO_ENABLE_INITIAL_QP \
1491 		(V4L2_CID_MPEG_MSM_VIDC_BASE + 144)
1492 enum vl42_mpeg_vidc_video_enable_initial_qp {
1493 	V4L2_CID_MPEG_VIDC_VIDEO_ENABLE_INITIAL_QP_IFRAME = 0x1,
1494 	V4L2_CID_MPEG_VIDC_VIDEO_ENABLE_INITIAL_QP_PFRAME = 0x2,
1495 	V4L2_CID_MPEG_VIDC_VIDEO_ENABLE_INITIAL_QP_BFRAME = 0x4,
1496 };
1497 
1498 #define V4L2_CID_MPEG_VIDC_VIDEO_INITIAL_I_FRAME_QP \
1499 		(V4L2_CID_MPEG_MSM_VIDC_BASE + 145)
1500 
1501 #define V4L2_CID_MPEG_VIDC_VIDEO_INITIAL_P_FRAME_QP \
1502 		(V4L2_CID_MPEG_MSM_VIDC_BASE + 146)
1503 
1504 #define V4L2_CID_MPEG_VIDC_VIDEO_INITIAL_B_FRAME_QP \
1505 		(V4L2_CID_MPEG_MSM_VIDC_BASE + 147)
1506 
1507 #define V4L2_CID_MPEG_VIDC_VIDEO_H264_NAL_SVC \
1508 		(V4L2_CID_MPEG_MSM_VIDC_BASE + 148)
1509 
1510 #define V4L2_CID_MPEG_VIDC_VIDEO_PERF_MODE	 \
1511 		(V4L2_CID_MPEG_MSM_VIDC_BASE + 149)
1512 enum v4l2_mpeg_vidc_video_perf_mode {
1513 	V4L2_MPEG_VIDC_VIDEO_PERF_MAX_QUALITY = 1,
1514 	V4L2_MPEG_VIDC_VIDEO_PERF_POWER_SAVE = 2
1515 };
1516 
1517 #define V4L2_CID_MPEG_VIDC_VIDEO_MBI_STATISTICS_MODE	\
1518 		(V4L2_CID_MPEG_MSM_VIDC_BASE + 150)
1519 
1520 #define V4L2_CID_MPEG_VIDC_VIDEO_CONFIG_QP \
1521 		(V4L2_CID_MPEG_MSM_VIDC_BASE + 151)
1522 
1523 #define V4L2_CID_MPEG_VIDC_VIDEO_H264_PIC_ORDER_CNT \
1524 		(V4L2_CID_MPEG_MSM_VIDC_BASE + 152)
1525 
1526 #define V4L2_CID_MPEG_VIDC_VIDEO_SCS_THRESHOLD \
1527 		(V4L2_CID_MPEG_MSM_VIDC_BASE + 153)
1528 
1529 #define V4L2_CID_MPEG_VIDC_VIDEO_MVC_BUFFER_LAYOUT \
1530 		(V4L2_CID_MPEG_MSM_VIDC_BASE + 154)
1531 
1532 
1533 #define V4L2_CID_MPEG_VIDC_VIDEO_SECURE_SCALING_THRESHOLD \
1534 		(V4L2_CID_MPEG_MSM_VIDC_BASE + 155)
1535 
1536 #define V4L2_CID_MPEG_VIDC_VIDEO_NON_SECURE_OUTPUT2 \
1537 		(V4L2_CID_MPEG_MSM_VIDC_BASE + 156)
1538 
1539 #define V4L2_CID_MPEG_VIDC_VIDEO_VP8_MIN_QP (V4L2_CID_MPEG_MSM_VIDC_BASE + 157)
1540 #define V4L2_CID_MPEG_VIDC_VIDEO_VP8_MAX_QP (V4L2_CID_MPEG_MSM_VIDC_BASE + 158)
1541 
1542 #define V4L2_CID_MPEG_VIDC_VIDEO_H263_LEVEL (V4L2_CID_MPEG_MSM_VIDC_BASE + 159)
1543 enum v4l2_mpeg_vidc_video_h263_level {
1544 	V4L2_MPEG_VIDC_VIDEO_H263_LEVEL_1_0 = 0,
1545 	V4L2_MPEG_VIDC_VIDEO_H263_LEVEL_2_0 = 1,
1546 	V4L2_MPEG_VIDC_VIDEO_H263_LEVEL_3_0 = 2,
1547 	V4L2_MPEG_VIDC_VIDEO_H263_LEVEL_4_0 = 3,
1548 	V4L2_MPEG_VIDC_VIDEO_H263_LEVEL_4_5 = 4,
1549 	V4L2_MPEG_VIDC_VIDEO_H263_LEVEL_5_0 = 5,
1550 	V4L2_MPEG_VIDC_VIDEO_H263_LEVEL_6_0 = 6,
1551 	V4L2_MPEG_VIDC_VIDEO_H263_LEVEL_7_0 = 7,
1552 };
1553 
1554 #define V4L2_CID_MPEG_VIDC_VIDEO_POST_LOOP_DEBLOCKER_MODE \
1555 		(V4L2_CID_MPEG_MSM_VIDC_BASE + 160)
1556 
1557 
1558 #define V4L2_CID_MPEG_VIDC_VIDEO_DIVX_FORMAT (V4L2_CID_MPEG_MSM_VIDC_BASE+161)
1559 
1560 enum v4l2_mpeg_vidc_video_divx_format_type {
1561 		V4L2_MPEG_VIDC_VIDEO_DIVX_FORMAT_4 = 0,
1562 		V4L2_MPEG_VIDC_VIDEO_DIVX_FORMAT_5 = 1,
1563 		V4L2_MPEG_VIDC_VIDEO_DIVX_FORMAT_6 = 2,
1564 };
1565 
1566 #define V4L2_CID_MPEG_VIDC_IMG_GRID_DIMENSION \
1567 	(V4L2_CID_MPEG_MSM_VIDC_BASE+163)
1568 
1569 #define V4L2_CID_MPEG_VIDC_VIDEO_FRAME_QP \
1570 	(V4L2_CID_MPEG_MSM_VIDC_BASE+164)
1571 
1572 #define  \
1573 V4L2_CID_MPEG_VIDC_VIDEO_INTRA_REFRESH_MODE \
1574 	(V4L2_CID_MPEG_MSM_VIDC_BASE+165)
1575 enum v4l2_mpeg_vidc_video_intra_refresh_mode {
1576 	V4L2_CID_MPEG_VIDC_VIDEO_INTRA_REFRESH_NONE = 0,
1577 	V4L2_CID_MPEG_VIDC_VIDEO_INTRA_REFRESH_CYCLIC = 1,
1578 	V4L2_CID_MPEG_VIDC_VIDEO_INTRA_REFRESH_RANDOMMODE = 2,
1579 	V4L2_CID_MPEG_VIDC_VIDEO_INTRA_REFRESH_ADAPTIVE = 3,
1580 	V4L2_CID_MPEG_VIDC_VIDEO_INTRA_REFRESH_CYCLIC_ADAPTIVE = 4,
1581 };
1582 
1583 #define V4L2_CID_MPEG_VIDC_VIDEO_IR_MBS (V4L2_CID_MPEG_MSM_VIDC_BASE+166)
1584 
1585 #define V4L2_CID_MPEG_VIDC_ENABLE_ONLY_BASE_LAYER_IR \
1586 	(V4L2_CID_MPEG_MSM_VIDC_BASE + 167)
1587 
1588 enum v4l2_mpeg_vidc_video_mbi_statistics_mode {
1589 	V4L2_CID_MPEG_VIDC_VIDEO_MBI_MODE_DEFAULT = 0,
1590 	V4L2_CID_MPEG_VIDC_VIDEO_MBI_MODE_1 = 1,
1591 	V4L2_CID_MPEG_VIDC_VIDEO_MBI_MODE_2 = 2,
1592 	V4L2_CID_MPEG_VIDC_VIDEO_MBI_MODE_3 = 3,
1593 };
1594 
1595 enum vl42_mpeg_vidc_video_h264_svc_nal {
1596 	V4L2_CID_MPEG_VIDC_VIDEO_H264_NAL_SVC_DISABLED = 0,
1597 	V4L2_CID_MPEG_VIDC_VIDEO_H264_NAL_SVC_ENABLED = 1,
1598 };
1599 
1600 enum v4l2_mpeg_vidc_video_h264_vui_timing_info {
1601 	V4L2_MPEG_VIDC_VIDEO_H264_VUI_TIMING_INFO_DISABLED = 0,
1602 	V4L2_MPEG_VIDC_VIDEO_H264_VUI_TIMING_INFO_ENABLED = 1
1603 };
1604 
1605 /*  Camera class control IDs */
1606 
1607 #define V4L2_CID_CAMERA_CLASS_BASE	(V4L2_CTRL_CLASS_CAMERA | 0x900)
1608 #define V4L2_CID_CAMERA_CLASS		(V4L2_CTRL_CLASS_CAMERA | 1)
1609 
1610 #define V4L2_CID_EXPOSURE_AUTO			(V4L2_CID_CAMERA_CLASS_BASE+1)
1611 enum  v4l2_exposure_auto_type {
1612 	V4L2_EXPOSURE_AUTO = 0,
1613 	V4L2_EXPOSURE_MANUAL = 1,
1614 	V4L2_EXPOSURE_SHUTTER_PRIORITY = 2,
1615 	V4L2_EXPOSURE_APERTURE_PRIORITY = 3
1616 };
1617 #define V4L2_CID_EXPOSURE_ABSOLUTE		(V4L2_CID_CAMERA_CLASS_BASE+2)
1618 #define V4L2_CID_EXPOSURE_AUTO_PRIORITY		(V4L2_CID_CAMERA_CLASS_BASE+3)
1619 
1620 #define V4L2_CID_PAN_RELATIVE			(V4L2_CID_CAMERA_CLASS_BASE+4)
1621 #define V4L2_CID_TILT_RELATIVE			(V4L2_CID_CAMERA_CLASS_BASE+5)
1622 #define V4L2_CID_PAN_RESET			(V4L2_CID_CAMERA_CLASS_BASE+6)
1623 #define V4L2_CID_TILT_RESET			(V4L2_CID_CAMERA_CLASS_BASE+7)
1624 
1625 #define V4L2_CID_PAN_ABSOLUTE			(V4L2_CID_CAMERA_CLASS_BASE+8)
1626 #define V4L2_CID_TILT_ABSOLUTE			(V4L2_CID_CAMERA_CLASS_BASE+9)
1627 
1628 #define V4L2_CID_FOCUS_ABSOLUTE			(V4L2_CID_CAMERA_CLASS_BASE+10)
1629 #define V4L2_CID_FOCUS_RELATIVE			(V4L2_CID_CAMERA_CLASS_BASE+11)
1630 #define V4L2_CID_FOCUS_AUTO			(V4L2_CID_CAMERA_CLASS_BASE+12)
1631 
1632 #define V4L2_CID_ZOOM_ABSOLUTE			(V4L2_CID_CAMERA_CLASS_BASE+13)
1633 #define V4L2_CID_ZOOM_RELATIVE			(V4L2_CID_CAMERA_CLASS_BASE+14)
1634 #define V4L2_CID_ZOOM_CONTINUOUS		(V4L2_CID_CAMERA_CLASS_BASE+15)
1635 
1636 #define V4L2_CID_PRIVACY			(V4L2_CID_CAMERA_CLASS_BASE+16)
1637 
1638 #define V4L2_CID_IRIS_ABSOLUTE			(V4L2_CID_CAMERA_CLASS_BASE+17)
1639 #define V4L2_CID_IRIS_RELATIVE			(V4L2_CID_CAMERA_CLASS_BASE+18)
1640 
1641 #define V4L2_CID_AUTO_EXPOSURE_BIAS		(V4L2_CID_CAMERA_CLASS_BASE+19)
1642 
1643 #define V4L2_CID_AUTO_N_PRESET_WHITE_BALANCE	(V4L2_CID_CAMERA_CLASS_BASE+20)
1644 enum v4l2_auto_n_preset_white_balance {
1645 	V4L2_WHITE_BALANCE_MANUAL		= 0,
1646 	V4L2_WHITE_BALANCE_AUTO			= 1,
1647 	V4L2_WHITE_BALANCE_INCANDESCENT		= 2,
1648 	V4L2_WHITE_BALANCE_FLUORESCENT		= 3,
1649 	V4L2_WHITE_BALANCE_FLUORESCENT_H	= 4,
1650 	V4L2_WHITE_BALANCE_HORIZON		= 5,
1651 	V4L2_WHITE_BALANCE_DAYLIGHT		= 6,
1652 	V4L2_WHITE_BALANCE_FLASH		= 7,
1653 	V4L2_WHITE_BALANCE_CLOUDY		= 8,
1654 	V4L2_WHITE_BALANCE_SHADE		= 9,
1655 };
1656 
1657 #define V4L2_CID_WIDE_DYNAMIC_RANGE		(V4L2_CID_CAMERA_CLASS_BASE+21)
1658 #define V4L2_CID_IMAGE_STABILIZATION		(V4L2_CID_CAMERA_CLASS_BASE+22)
1659 
1660 #define V4L2_CID_ISO_SENSITIVITY		(V4L2_CID_CAMERA_CLASS_BASE+23)
1661 #define V4L2_CID_ISO_SENSITIVITY_AUTO		(V4L2_CID_CAMERA_CLASS_BASE+24)
1662 enum v4l2_iso_sensitivity_auto_type {
1663 	V4L2_ISO_SENSITIVITY_MANUAL		= 0,
1664 	V4L2_ISO_SENSITIVITY_AUTO		= 1,
1665 };
1666 
1667 #define V4L2_CID_EXPOSURE_METERING		(V4L2_CID_CAMERA_CLASS_BASE+25)
1668 enum v4l2_exposure_metering {
1669 	V4L2_EXPOSURE_METERING_AVERAGE		= 0,
1670 	V4L2_EXPOSURE_METERING_CENTER_WEIGHTED	= 1,
1671 	V4L2_EXPOSURE_METERING_SPOT		= 2,
1672 	V4L2_EXPOSURE_METERING_MATRIX		= 3,
1673 };
1674 
1675 #define V4L2_CID_SCENE_MODE			(V4L2_CID_CAMERA_CLASS_BASE+26)
1676 enum v4l2_scene_mode {
1677 	V4L2_SCENE_MODE_NONE			= 0,
1678 	V4L2_SCENE_MODE_BACKLIGHT		= 1,
1679 	V4L2_SCENE_MODE_BEACH_SNOW		= 2,
1680 	V4L2_SCENE_MODE_CANDLE_LIGHT		= 3,
1681 	V4L2_SCENE_MODE_DAWN_DUSK		= 4,
1682 	V4L2_SCENE_MODE_FALL_COLORS		= 5,
1683 	V4L2_SCENE_MODE_FIREWORKS		= 6,
1684 	V4L2_SCENE_MODE_LANDSCAPE		= 7,
1685 	V4L2_SCENE_MODE_NIGHT			= 8,
1686 	V4L2_SCENE_MODE_PARTY_INDOOR		= 9,
1687 	V4L2_SCENE_MODE_PORTRAIT		= 10,
1688 	V4L2_SCENE_MODE_SPORTS			= 11,
1689 	V4L2_SCENE_MODE_SUNSET			= 12,
1690 	V4L2_SCENE_MODE_TEXT			= 13,
1691 };
1692 
1693 #define V4L2_CID_3A_LOCK			(V4L2_CID_CAMERA_CLASS_BASE+27)
1694 #define V4L2_LOCK_EXPOSURE			(1 << 0)
1695 #define V4L2_LOCK_WHITE_BALANCE			(1 << 1)
1696 #define V4L2_LOCK_FOCUS				(1 << 2)
1697 
1698 #define V4L2_CID_AUTO_FOCUS_START		(V4L2_CID_CAMERA_CLASS_BASE+28)
1699 #define V4L2_CID_AUTO_FOCUS_STOP		(V4L2_CID_CAMERA_CLASS_BASE+29)
1700 #define V4L2_CID_AUTO_FOCUS_STATUS		(V4L2_CID_CAMERA_CLASS_BASE+30)
1701 #define V4L2_AUTO_FOCUS_STATUS_IDLE		(0 << 0)
1702 #define V4L2_AUTO_FOCUS_STATUS_BUSY		(1 << 0)
1703 #define V4L2_AUTO_FOCUS_STATUS_REACHED		(1 << 1)
1704 #define V4L2_AUTO_FOCUS_STATUS_FAILED		(1 << 2)
1705 
1706 #define V4L2_CID_AUTO_FOCUS_RANGE		(V4L2_CID_CAMERA_CLASS_BASE+31)
1707 enum v4l2_auto_focus_range {
1708 	V4L2_AUTO_FOCUS_RANGE_AUTO		= 0,
1709 	V4L2_AUTO_FOCUS_RANGE_NORMAL		= 1,
1710 	V4L2_AUTO_FOCUS_RANGE_MACRO		= 2,
1711 	V4L2_AUTO_FOCUS_RANGE_INFINITY		= 3,
1712 };
1713 
1714 #define V4L2_CID_PAN_SPEED			(V4L2_CID_CAMERA_CLASS_BASE+32)
1715 #define V4L2_CID_TILT_SPEED			(V4L2_CID_CAMERA_CLASS_BASE+33)
1716 
1717 /* FM Modulator class control IDs */
1718 
1719 #define V4L2_CID_FM_TX_CLASS_BASE		(V4L2_CTRL_CLASS_FM_TX | 0x900)
1720 #define V4L2_CID_FM_TX_CLASS			(V4L2_CTRL_CLASS_FM_TX | 1)
1721 
1722 #define V4L2_CID_RDS_TX_DEVIATION		(V4L2_CID_FM_TX_CLASS_BASE + 1)
1723 #define V4L2_CID_RDS_TX_PI			(V4L2_CID_FM_TX_CLASS_BASE + 2)
1724 #define V4L2_CID_RDS_TX_PTY			(V4L2_CID_FM_TX_CLASS_BASE + 3)
1725 #define V4L2_CID_RDS_TX_PS_NAME			(V4L2_CID_FM_TX_CLASS_BASE + 5)
1726 #define V4L2_CID_RDS_TX_RADIO_TEXT		(V4L2_CID_FM_TX_CLASS_BASE + 6)
1727 #define V4L2_CID_RDS_TX_MONO_STEREO		(V4L2_CID_FM_TX_CLASS_BASE + 7)
1728 #define V4L2_CID_RDS_TX_ARTIFICIAL_HEAD		(V4L2_CID_FM_TX_CLASS_BASE + 8)
1729 #define V4L2_CID_RDS_TX_COMPRESSED		(V4L2_CID_FM_TX_CLASS_BASE + 9)
1730 #define V4L2_CID_RDS_TX_DYNAMIC_PTY		(V4L2_CID_FM_TX_CLASS_BASE + 10)
1731 #define V4L2_CID_RDS_TX_TRAFFIC_ANNOUNCEMENT	(V4L2_CID_FM_TX_CLASS_BASE + 11)
1732 #define V4L2_CID_RDS_TX_TRAFFIC_PROGRAM		(V4L2_CID_FM_TX_CLASS_BASE + 12)
1733 #define V4L2_CID_RDS_TX_MUSIC_SPEECH		(V4L2_CID_FM_TX_CLASS_BASE + 13)
1734 #define V4L2_CID_RDS_TX_ALT_FREQS_ENABLE	(V4L2_CID_FM_TX_CLASS_BASE + 14)
1735 #define V4L2_CID_RDS_TX_ALT_FREQS		(V4L2_CID_FM_TX_CLASS_BASE + 15)
1736 
1737 #define V4L2_CID_AUDIO_LIMITER_ENABLED		(V4L2_CID_FM_TX_CLASS_BASE + 64)
1738 #define V4L2_CID_AUDIO_LIMITER_RELEASE_TIME	(V4L2_CID_FM_TX_CLASS_BASE + 65)
1739 #define V4L2_CID_AUDIO_LIMITER_DEVIATION	(V4L2_CID_FM_TX_CLASS_BASE + 66)
1740 
1741 #define V4L2_CID_AUDIO_COMPRESSION_ENABLED	(V4L2_CID_FM_TX_CLASS_BASE + 80)
1742 #define V4L2_CID_AUDIO_COMPRESSION_GAIN		(V4L2_CID_FM_TX_CLASS_BASE + 81)
1743 #define V4L2_CID_AUDIO_COMPRESSION_THRESHOLD	(V4L2_CID_FM_TX_CLASS_BASE + 82)
1744 #define V4L2_CID_AUDIO_COMPRESSION_ATTACK_TIME	(V4L2_CID_FM_TX_CLASS_BASE + 83)
1745 #define V4L2_CID_AUDIO_COMPRESSION_RELEASE_TIME	(V4L2_CID_FM_TX_CLASS_BASE + 84)
1746 
1747 #define V4L2_CID_PILOT_TONE_ENABLED		(V4L2_CID_FM_TX_CLASS_BASE + 96)
1748 #define V4L2_CID_PILOT_TONE_DEVIATION		(V4L2_CID_FM_TX_CLASS_BASE + 97)
1749 #define V4L2_CID_PILOT_TONE_FREQUENCY		(V4L2_CID_FM_TX_CLASS_BASE + 98)
1750 
1751 #define V4L2_CID_TUNE_PREEMPHASIS		(V4L2_CID_FM_TX_CLASS_BASE + 112)
1752 enum v4l2_preemphasis {
1753 	V4L2_PREEMPHASIS_DISABLED	= 0,
1754 	V4L2_PREEMPHASIS_50_uS		= 1,
1755 	V4L2_PREEMPHASIS_75_uS		= 2,
1756 };
1757 #define V4L2_CID_TUNE_POWER_LEVEL		(V4L2_CID_FM_TX_CLASS_BASE + 113)
1758 #define V4L2_CID_TUNE_ANTENNA_CAPACITOR		(V4L2_CID_FM_TX_CLASS_BASE + 114)
1759 
1760 
1761 /* Flash and privacy (indicator) light controls */
1762 
1763 #define V4L2_CID_FLASH_CLASS_BASE		(V4L2_CTRL_CLASS_FLASH | 0x900)
1764 #define V4L2_CID_FLASH_CLASS			(V4L2_CTRL_CLASS_FLASH | 1)
1765 
1766 #define V4L2_CID_FLASH_LED_MODE			(V4L2_CID_FLASH_CLASS_BASE + 1)
1767 enum v4l2_flash_led_mode {
1768 	V4L2_FLASH_LED_MODE_NONE,
1769 	V4L2_FLASH_LED_MODE_FLASH,
1770 	V4L2_FLASH_LED_MODE_TORCH,
1771 };
1772 
1773 #define V4L2_CID_FLASH_STROBE_SOURCE		(V4L2_CID_FLASH_CLASS_BASE + 2)
1774 enum v4l2_flash_strobe_source {
1775 	V4L2_FLASH_STROBE_SOURCE_SOFTWARE,
1776 	V4L2_FLASH_STROBE_SOURCE_EXTERNAL,
1777 };
1778 
1779 #define V4L2_CID_FLASH_STROBE			(V4L2_CID_FLASH_CLASS_BASE + 3)
1780 #define V4L2_CID_FLASH_STROBE_STOP		(V4L2_CID_FLASH_CLASS_BASE + 4)
1781 #define V4L2_CID_FLASH_STROBE_STATUS		(V4L2_CID_FLASH_CLASS_BASE + 5)
1782 
1783 #define V4L2_CID_FLASH_TIMEOUT			(V4L2_CID_FLASH_CLASS_BASE + 6)
1784 #define V4L2_CID_FLASH_INTENSITY		(V4L2_CID_FLASH_CLASS_BASE + 7)
1785 #define V4L2_CID_FLASH_TORCH_INTENSITY		(V4L2_CID_FLASH_CLASS_BASE + 8)
1786 #define V4L2_CID_FLASH_INDICATOR_INTENSITY	(V4L2_CID_FLASH_CLASS_BASE + 9)
1787 
1788 #define V4L2_CID_FLASH_FAULT			(V4L2_CID_FLASH_CLASS_BASE + 10)
1789 #define V4L2_FLASH_FAULT_OVER_VOLTAGE		(1 << 0)
1790 #define V4L2_FLASH_FAULT_TIMEOUT		(1 << 1)
1791 #define V4L2_FLASH_FAULT_OVER_TEMPERATURE	(1 << 2)
1792 #define V4L2_FLASH_FAULT_SHORT_CIRCUIT		(1 << 3)
1793 #define V4L2_FLASH_FAULT_OVER_CURRENT		(1 << 4)
1794 #define V4L2_FLASH_FAULT_INDICATOR		(1 << 5)
1795 #define V4L2_FLASH_FAULT_UNDER_VOLTAGE		(1 << 6)
1796 #define V4L2_FLASH_FAULT_INPUT_VOLTAGE		(1 << 7)
1797 #define V4L2_FLASH_FAULT_LED_OVER_TEMPERATURE	(1 << 8)
1798 
1799 #define V4L2_CID_FLASH_CHARGE			(V4L2_CID_FLASH_CLASS_BASE + 11)
1800 #define V4L2_CID_FLASH_READY			(V4L2_CID_FLASH_CLASS_BASE + 12)
1801 
1802 
1803 /* JPEG-class control IDs */
1804 
1805 #define V4L2_CID_JPEG_CLASS_BASE		(V4L2_CTRL_CLASS_JPEG | 0x900)
1806 #define V4L2_CID_JPEG_CLASS			(V4L2_CTRL_CLASS_JPEG | 1)
1807 
1808 #define	V4L2_CID_JPEG_CHROMA_SUBSAMPLING	(V4L2_CID_JPEG_CLASS_BASE + 1)
1809 enum v4l2_jpeg_chroma_subsampling {
1810 	V4L2_JPEG_CHROMA_SUBSAMPLING_444	= 0,
1811 	V4L2_JPEG_CHROMA_SUBSAMPLING_422	= 1,
1812 	V4L2_JPEG_CHROMA_SUBSAMPLING_420	= 2,
1813 	V4L2_JPEG_CHROMA_SUBSAMPLING_411	= 3,
1814 	V4L2_JPEG_CHROMA_SUBSAMPLING_410	= 4,
1815 	V4L2_JPEG_CHROMA_SUBSAMPLING_GRAY	= 5,
1816 };
1817 #define	V4L2_CID_JPEG_RESTART_INTERVAL		(V4L2_CID_JPEG_CLASS_BASE + 2)
1818 #define	V4L2_CID_JPEG_COMPRESSION_QUALITY	(V4L2_CID_JPEG_CLASS_BASE + 3)
1819 
1820 #define	V4L2_CID_JPEG_ACTIVE_MARKER		(V4L2_CID_JPEG_CLASS_BASE + 4)
1821 #define	V4L2_JPEG_ACTIVE_MARKER_APP0		(1 << 0)
1822 #define	V4L2_JPEG_ACTIVE_MARKER_APP1		(1 << 1)
1823 #define	V4L2_JPEG_ACTIVE_MARKER_COM		(1 << 16)
1824 #define	V4L2_JPEG_ACTIVE_MARKER_DQT		(1 << 17)
1825 #define	V4L2_JPEG_ACTIVE_MARKER_DHT		(1 << 18)
1826 
1827 
1828 /* Image source controls */
1829 #define V4L2_CID_IMAGE_SOURCE_CLASS_BASE	(V4L2_CTRL_CLASS_IMAGE_SOURCE | 0x900)
1830 #define V4L2_CID_IMAGE_SOURCE_CLASS		(V4L2_CTRL_CLASS_IMAGE_SOURCE | 1)
1831 
1832 #define V4L2_CID_VBLANK				(V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 1)
1833 #define V4L2_CID_HBLANK				(V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 2)
1834 #define V4L2_CID_ANALOGUE_GAIN			(V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 3)
1835 #define V4L2_CID_TEST_PATTERN_RED		(V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 4)
1836 #define V4L2_CID_TEST_PATTERN_GREENR		(V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 5)
1837 #define V4L2_CID_TEST_PATTERN_BLUE		(V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 6)
1838 #define V4L2_CID_TEST_PATTERN_GREENB		(V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 7)
1839 
1840 
1841 /* Image processing controls */
1842 
1843 #define V4L2_CID_IMAGE_PROC_CLASS_BASE		(V4L2_CTRL_CLASS_IMAGE_PROC | 0x900)
1844 #define V4L2_CID_IMAGE_PROC_CLASS		(V4L2_CTRL_CLASS_IMAGE_PROC | 1)
1845 
1846 #define V4L2_CID_LINK_FREQ			(V4L2_CID_IMAGE_PROC_CLASS_BASE + 1)
1847 #define V4L2_CID_PIXEL_RATE			(V4L2_CID_IMAGE_PROC_CLASS_BASE + 2)
1848 #define V4L2_CID_TEST_PATTERN			(V4L2_CID_IMAGE_PROC_CLASS_BASE + 3)
1849 #define V4L2_CID_DEINTERLACING_MODE		(V4L2_CID_IMAGE_PROC_CLASS_BASE + 4)
1850 #define V4L2_CID_DIGITAL_GAIN			(V4L2_CID_IMAGE_PROC_CLASS_BASE + 5)
1851 
1852 /*  DV-class control IDs defined by V4L2 */
1853 #define V4L2_CID_DV_CLASS_BASE			(V4L2_CTRL_CLASS_DV | 0x900)
1854 #define V4L2_CID_DV_CLASS			(V4L2_CTRL_CLASS_DV | 1)
1855 
1856 #define	V4L2_CID_DV_TX_HOTPLUG			(V4L2_CID_DV_CLASS_BASE + 1)
1857 #define	V4L2_CID_DV_TX_RXSENSE			(V4L2_CID_DV_CLASS_BASE + 2)
1858 #define	V4L2_CID_DV_TX_EDID_PRESENT		(V4L2_CID_DV_CLASS_BASE + 3)
1859 #define	V4L2_CID_DV_TX_MODE			(V4L2_CID_DV_CLASS_BASE + 4)
1860 enum v4l2_dv_tx_mode {
1861 	V4L2_DV_TX_MODE_DVI_D	= 0,
1862 	V4L2_DV_TX_MODE_HDMI	= 1,
1863 };
1864 #define V4L2_CID_DV_TX_RGB_RANGE		(V4L2_CID_DV_CLASS_BASE + 5)
1865 enum v4l2_dv_rgb_range {
1866 	V4L2_DV_RGB_RANGE_AUTO	  = 0,
1867 	V4L2_DV_RGB_RANGE_LIMITED = 1,
1868 	V4L2_DV_RGB_RANGE_FULL	  = 2,
1869 };
1870 
1871 #define V4L2_CID_DV_TX_IT_CONTENT_TYPE		(V4L2_CID_DV_CLASS_BASE + 6)
1872 enum v4l2_dv_it_content_type {
1873 	V4L2_DV_IT_CONTENT_TYPE_GRAPHICS  = 0,
1874 	V4L2_DV_IT_CONTENT_TYPE_PHOTO	  = 1,
1875 	V4L2_DV_IT_CONTENT_TYPE_CINEMA	  = 2,
1876 	V4L2_DV_IT_CONTENT_TYPE_GAME	  = 3,
1877 	V4L2_DV_IT_CONTENT_TYPE_NO_ITC	  = 4,
1878 };
1879 
1880 #define	V4L2_CID_DV_RX_POWER_PRESENT		(V4L2_CID_DV_CLASS_BASE + 100)
1881 #define V4L2_CID_DV_RX_RGB_RANGE		(V4L2_CID_DV_CLASS_BASE + 101)
1882 #define V4L2_CID_DV_RX_IT_CONTENT_TYPE		(V4L2_CID_DV_CLASS_BASE + 102)
1883 
1884 #define V4L2_CID_FM_RX_CLASS_BASE		(V4L2_CTRL_CLASS_FM_RX | 0x900)
1885 #define V4L2_CID_FM_RX_CLASS			(V4L2_CTRL_CLASS_FM_RX | 1)
1886 
1887 #define V4L2_CID_TUNE_DEEMPHASIS		(V4L2_CID_FM_RX_CLASS_BASE + 1)
1888 enum v4l2_deemphasis {
1889 	V4L2_DEEMPHASIS_DISABLED	= V4L2_PREEMPHASIS_DISABLED,
1890 	V4L2_DEEMPHASIS_50_uS		= V4L2_PREEMPHASIS_50_uS,
1891 	V4L2_DEEMPHASIS_75_uS		= V4L2_PREEMPHASIS_75_uS,
1892 };
1893 
1894 #define V4L2_CID_RDS_RECEPTION			(V4L2_CID_FM_RX_CLASS_BASE + 2)
1895 #define V4L2_CID_RDS_RX_PTY			(V4L2_CID_FM_RX_CLASS_BASE + 3)
1896 #define V4L2_CID_RDS_RX_PS_NAME			(V4L2_CID_FM_RX_CLASS_BASE + 4)
1897 #define V4L2_CID_RDS_RX_RADIO_TEXT		(V4L2_CID_FM_RX_CLASS_BASE + 5)
1898 #define V4L2_CID_RDS_RX_TRAFFIC_ANNOUNCEMENT	(V4L2_CID_FM_RX_CLASS_BASE + 6)
1899 #define V4L2_CID_RDS_RX_TRAFFIC_PROGRAM		(V4L2_CID_FM_RX_CLASS_BASE + 7)
1900 #define V4L2_CID_RDS_RX_MUSIC_SPEECH		(V4L2_CID_FM_RX_CLASS_BASE + 8)
1901 
1902 #define V4L2_CID_RF_TUNER_CLASS_BASE		(V4L2_CTRL_CLASS_RF_TUNER | 0x900)
1903 #define V4L2_CID_RF_TUNER_CLASS			(V4L2_CTRL_CLASS_RF_TUNER | 1)
1904 
1905 #define V4L2_CID_RF_TUNER_BANDWIDTH_AUTO	(V4L2_CID_RF_TUNER_CLASS_BASE + 11)
1906 #define V4L2_CID_RF_TUNER_BANDWIDTH		(V4L2_CID_RF_TUNER_CLASS_BASE + 12)
1907 #define V4L2_CID_RF_TUNER_RF_GAIN		(V4L2_CID_RF_TUNER_CLASS_BASE + 32)
1908 #define V4L2_CID_RF_TUNER_LNA_GAIN_AUTO		(V4L2_CID_RF_TUNER_CLASS_BASE + 41)
1909 #define V4L2_CID_RF_TUNER_LNA_GAIN		(V4L2_CID_RF_TUNER_CLASS_BASE + 42)
1910 #define V4L2_CID_RF_TUNER_MIXER_GAIN_AUTO	(V4L2_CID_RF_TUNER_CLASS_BASE + 51)
1911 #define V4L2_CID_RF_TUNER_MIXER_GAIN		(V4L2_CID_RF_TUNER_CLASS_BASE + 52)
1912 #define V4L2_CID_RF_TUNER_IF_GAIN_AUTO		(V4L2_CID_RF_TUNER_CLASS_BASE + 61)
1913 #define V4L2_CID_RF_TUNER_IF_GAIN		(V4L2_CID_RF_TUNER_CLASS_BASE + 62)
1914 #define V4L2_CID_RF_TUNER_PLL_LOCK			(V4L2_CID_RF_TUNER_CLASS_BASE + 91)
1915 
1916 
1917 /*  Detection-class control IDs defined by V4L2 */
1918 #define V4L2_CID_DETECT_CLASS_BASE		(V4L2_CTRL_CLASS_DETECT | 0x900)
1919 #define V4L2_CID_DETECT_CLASS			(V4L2_CTRL_CLASS_DETECT | 1)
1920 
1921 #define V4L2_CID_DETECT_MD_MODE			(V4L2_CID_DETECT_CLASS_BASE + 1)
1922 enum v4l2_detect_md_mode {
1923 	V4L2_DETECT_MD_MODE_DISABLED		= 0,
1924 	V4L2_DETECT_MD_MODE_GLOBAL		= 1,
1925 	V4L2_DETECT_MD_MODE_THRESHOLD_GRID	= 2,
1926 	V4L2_DETECT_MD_MODE_REGION_GRID		= 3,
1927 };
1928 #define V4L2_CID_DETECT_MD_GLOBAL_THRESHOLD	(V4L2_CID_DETECT_CLASS_BASE + 2)
1929 #define V4L2_CID_DETECT_MD_THRESHOLD_GRID	(V4L2_CID_DETECT_CLASS_BASE + 3)
1930 #define V4L2_CID_DETECT_MD_REGION_GRID		(V4L2_CID_DETECT_CLASS_BASE + 4)
1931 
1932 #endif
1933