1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /*
3  * V4L2 controls framework control definitions.
4  *
5  * Copyright (C) 2010-2021  Hans Verkuil <hverkuil-cisco@xs4all.nl>
6  */
7 
8 #include <linux/export.h>
9 #include <media/v4l2-ctrls.h>
10 
11 /*
12  * Returns NULL or a character pointer array containing the menu for
13  * the given control ID. The pointer array ends with a NULL pointer.
14  * An empty string signifies a menu entry that is invalid. This allows
15  * drivers to disable certain options if it is not supported.
16  */
v4l2_ctrl_get_menu(u32 id)17 const char * const *v4l2_ctrl_get_menu(u32 id)
18 {
19 	static const char * const mpeg_audio_sampling_freq[] = {
20 		"44.1 kHz",
21 		"48 kHz",
22 		"32 kHz",
23 		NULL
24 	};
25 	static const char * const mpeg_audio_encoding[] = {
26 		"MPEG-1/2 Layer I",
27 		"MPEG-1/2 Layer II",
28 		"MPEG-1/2 Layer III",
29 		"MPEG-2/4 AAC",
30 		"AC-3",
31 		NULL
32 	};
33 	static const char * const mpeg_audio_l1_bitrate[] = {
34 		"32 kbps",
35 		"64 kbps",
36 		"96 kbps",
37 		"128 kbps",
38 		"160 kbps",
39 		"192 kbps",
40 		"224 kbps",
41 		"256 kbps",
42 		"288 kbps",
43 		"320 kbps",
44 		"352 kbps",
45 		"384 kbps",
46 		"416 kbps",
47 		"448 kbps",
48 		NULL
49 	};
50 	static const char * const mpeg_audio_l2_bitrate[] = {
51 		"32 kbps",
52 		"48 kbps",
53 		"56 kbps",
54 		"64 kbps",
55 		"80 kbps",
56 		"96 kbps",
57 		"112 kbps",
58 		"128 kbps",
59 		"160 kbps",
60 		"192 kbps",
61 		"224 kbps",
62 		"256 kbps",
63 		"320 kbps",
64 		"384 kbps",
65 		NULL
66 	};
67 	static const char * const mpeg_audio_l3_bitrate[] = {
68 		"32 kbps",
69 		"40 kbps",
70 		"48 kbps",
71 		"56 kbps",
72 		"64 kbps",
73 		"80 kbps",
74 		"96 kbps",
75 		"112 kbps",
76 		"128 kbps",
77 		"160 kbps",
78 		"192 kbps",
79 		"224 kbps",
80 		"256 kbps",
81 		"320 kbps",
82 		NULL
83 	};
84 	static const char * const mpeg_audio_ac3_bitrate[] = {
85 		"32 kbps",
86 		"40 kbps",
87 		"48 kbps",
88 		"56 kbps",
89 		"64 kbps",
90 		"80 kbps",
91 		"96 kbps",
92 		"112 kbps",
93 		"128 kbps",
94 		"160 kbps",
95 		"192 kbps",
96 		"224 kbps",
97 		"256 kbps",
98 		"320 kbps",
99 		"384 kbps",
100 		"448 kbps",
101 		"512 kbps",
102 		"576 kbps",
103 		"640 kbps",
104 		NULL
105 	};
106 	static const char * const mpeg_audio_mode[] = {
107 		"Stereo",
108 		"Joint Stereo",
109 		"Dual",
110 		"Mono",
111 		NULL
112 	};
113 	static const char * const mpeg_audio_mode_extension[] = {
114 		"Bound 4",
115 		"Bound 8",
116 		"Bound 12",
117 		"Bound 16",
118 		NULL
119 	};
120 	static const char * const mpeg_audio_emphasis[] = {
121 		"No Emphasis",
122 		"50/15 us",
123 		"CCITT J17",
124 		NULL
125 	};
126 	static const char * const mpeg_audio_crc[] = {
127 		"No CRC",
128 		"16-bit CRC",
129 		NULL
130 	};
131 	static const char * const mpeg_audio_dec_playback[] = {
132 		"Auto",
133 		"Stereo",
134 		"Left",
135 		"Right",
136 		"Mono",
137 		"Swapped Stereo",
138 		NULL
139 	};
140 	static const char * const mpeg_video_encoding[] = {
141 		"MPEG-1",
142 		"MPEG-2",
143 		"MPEG-4 AVC",
144 		NULL
145 	};
146 	static const char * const mpeg_video_aspect[] = {
147 		"1x1",
148 		"4x3",
149 		"16x9",
150 		"2.21x1",
151 		NULL
152 	};
153 	static const char * const mpeg_video_bitrate_mode[] = {
154 		"Variable Bitrate",
155 		"Constant Bitrate",
156 		"Constant Quality",
157 		NULL
158 	};
159 	static const char * const mpeg_stream_type[] = {
160 		"MPEG-2 Program Stream",
161 		"MPEG-2 Transport Stream",
162 		"MPEG-1 System Stream",
163 		"MPEG-2 DVD-compatible Stream",
164 		"MPEG-1 VCD-compatible Stream",
165 		"MPEG-2 SVCD-compatible Stream",
166 		NULL
167 	};
168 	static const char * const mpeg_stream_vbi_fmt[] = {
169 		"No VBI",
170 		"Private Packet, IVTV Format",
171 		NULL
172 	};
173 	static const char * const camera_power_line_frequency[] = {
174 		"Disabled",
175 		"50 Hz",
176 		"60 Hz",
177 		"Auto",
178 		NULL
179 	};
180 	static const char * const camera_exposure_auto[] = {
181 		"Auto Mode",
182 		"Manual Mode",
183 		"Shutter Priority Mode",
184 		"Aperture Priority Mode",
185 		NULL
186 	};
187 	static const char * const camera_exposure_metering[] = {
188 		"Average",
189 		"Center Weighted",
190 		"Spot",
191 		"Matrix",
192 		NULL
193 	};
194 	static const char * const camera_auto_focus_range[] = {
195 		"Auto",
196 		"Normal",
197 		"Macro",
198 		"Infinity",
199 		NULL
200 	};
201 	static const char * const colorfx[] = {
202 		"None",
203 		"Black & White",
204 		"Sepia",
205 		"Negative",
206 		"Emboss",
207 		"Sketch",
208 		"Sky Blue",
209 		"Grass Green",
210 		"Skin Whiten",
211 		"Vivid",
212 		"Aqua",
213 		"Art Freeze",
214 		"Silhouette",
215 		"Solarization",
216 		"Antique",
217 		"Set Cb/Cr",
218 		NULL
219 	};
220 	static const char * const auto_n_preset_white_balance[] = {
221 		"Manual",
222 		"Auto",
223 		"Incandescent",
224 		"Fluorescent",
225 		"Fluorescent H",
226 		"Horizon",
227 		"Daylight",
228 		"Flash",
229 		"Cloudy",
230 		"Shade",
231 		NULL,
232 	};
233 	static const char * const camera_iso_sensitivity_auto[] = {
234 		"Manual",
235 		"Auto",
236 		NULL
237 	};
238 	static const char * const scene_mode[] = {
239 		"None",
240 		"Backlight",
241 		"Beach/Snow",
242 		"Candle Light",
243 		"Dusk/Dawn",
244 		"Fall Colors",
245 		"Fireworks",
246 		"Landscape",
247 		"Night",
248 		"Party/Indoor",
249 		"Portrait",
250 		"Sports",
251 		"Sunset",
252 		"Text",
253 		NULL
254 	};
255 	static const char * const tune_emphasis[] = {
256 		"None",
257 		"50 Microseconds",
258 		"75 Microseconds",
259 		NULL,
260 	};
261 	static const char * const header_mode[] = {
262 		"Separate Buffer",
263 		"Joined With 1st Frame",
264 		NULL,
265 	};
266 	static const char * const multi_slice[] = {
267 		"Single",
268 		"Max Macroblocks",
269 		"Max Bytes",
270 		NULL,
271 	};
272 	static const char * const entropy_mode[] = {
273 		"CAVLC",
274 		"CABAC",
275 		NULL,
276 	};
277 	static const char * const mpeg_h264_level[] = {
278 		"1",
279 		"1b",
280 		"1.1",
281 		"1.2",
282 		"1.3",
283 		"2",
284 		"2.1",
285 		"2.2",
286 		"3",
287 		"3.1",
288 		"3.2",
289 		"4",
290 		"4.1",
291 		"4.2",
292 		"5",
293 		"5.1",
294 		"5.2",
295 		"6.0",
296 		"6.1",
297 		"6.2",
298 		NULL,
299 	};
300 	static const char * const h264_loop_filter[] = {
301 		"Enabled",
302 		"Disabled",
303 		"Disabled at Slice Boundary",
304 		NULL,
305 	};
306 	static const char * const h264_profile[] = {
307 		"Baseline",
308 		"Constrained Baseline",
309 		"Main",
310 		"Extended",
311 		"High",
312 		"High 10",
313 		"High 422",
314 		"High 444 Predictive",
315 		"High 10 Intra",
316 		"High 422 Intra",
317 		"High 444 Intra",
318 		"CAVLC 444 Intra",
319 		"Scalable Baseline",
320 		"Scalable High",
321 		"Scalable High Intra",
322 		"Stereo High",
323 		"Multiview High",
324 		"Constrained High",
325 		NULL,
326 	};
327 	static const char * const vui_sar_idc[] = {
328 		"Unspecified",
329 		"1:1",
330 		"12:11",
331 		"10:11",
332 		"16:11",
333 		"40:33",
334 		"24:11",
335 		"20:11",
336 		"32:11",
337 		"80:33",
338 		"18:11",
339 		"15:11",
340 		"64:33",
341 		"160:99",
342 		"4:3",
343 		"3:2",
344 		"2:1",
345 		"Extended SAR",
346 		NULL,
347 	};
348 	static const char * const h264_fp_arrangement_type[] = {
349 		"Checkerboard",
350 		"Column",
351 		"Row",
352 		"Side by Side",
353 		"Top Bottom",
354 		"Temporal",
355 		NULL,
356 	};
357 	static const char * const h264_fmo_map_type[] = {
358 		"Interleaved Slices",
359 		"Scattered Slices",
360 		"Foreground with Leftover",
361 		"Box Out",
362 		"Raster Scan",
363 		"Wipe Scan",
364 		"Explicit",
365 		NULL,
366 	};
367 	static const char * const h264_decode_mode[] = {
368 		"Slice-Based",
369 		"Frame-Based",
370 		NULL,
371 	};
372 	static const char * const h264_start_code[] = {
373 		"No Start Code",
374 		"Annex B Start Code",
375 		NULL,
376 	};
377 	static const char * const h264_hierarchical_coding_type[] = {
378 		"Hier Coding B",
379 		"Hier Coding P",
380 		NULL,
381 	};
382 	static const char * const mpeg_mpeg2_level[] = {
383 		"Low",
384 		"Main",
385 		"High 1440",
386 		"High",
387 		NULL,
388 	};
389 	static const char * const mpeg2_profile[] = {
390 		"Simple",
391 		"Main",
392 		"SNR Scalable",
393 		"Spatially Scalable",
394 		"High",
395 		NULL,
396 	};
397 	static const char * const mpeg_mpeg4_level[] = {
398 		"0",
399 		"0b",
400 		"1",
401 		"2",
402 		"3",
403 		"3b",
404 		"4",
405 		"5",
406 		NULL,
407 	};
408 	static const char * const mpeg4_profile[] = {
409 		"Simple",
410 		"Advanced Simple",
411 		"Core",
412 		"Simple Scalable",
413 		"Advanced Coding Efficiency",
414 		NULL,
415 	};
416 
417 	static const char * const vpx_golden_frame_sel[] = {
418 		"Use Previous Frame",
419 		"Use Previous Specific Frame",
420 		NULL,
421 	};
422 	static const char * const vp8_profile[] = {
423 		"0",
424 		"1",
425 		"2",
426 		"3",
427 		NULL,
428 	};
429 	static const char * const vp9_profile[] = {
430 		"0",
431 		"1",
432 		"2",
433 		"3",
434 		NULL,
435 	};
436 	static const char * const vp9_level[] = {
437 		"1",
438 		"1.1",
439 		"2",
440 		"2.1",
441 		"3",
442 		"3.1",
443 		"4",
444 		"4.1",
445 		"5",
446 		"5.1",
447 		"5.2",
448 		"6",
449 		"6.1",
450 		"6.2",
451 		NULL,
452 	};
453 
454 	static const char * const flash_led_mode[] = {
455 		"Off",
456 		"Flash",
457 		"Torch",
458 		NULL,
459 	};
460 	static const char * const flash_strobe_source[] = {
461 		"Software",
462 		"External",
463 		NULL,
464 	};
465 
466 	static const char * const jpeg_chroma_subsampling[] = {
467 		"4:4:4",
468 		"4:2:2",
469 		"4:2:0",
470 		"4:1:1",
471 		"4:1:0",
472 		"Gray",
473 		NULL,
474 	};
475 	static const char * const dv_tx_mode[] = {
476 		"DVI-D",
477 		"HDMI",
478 		NULL,
479 	};
480 	static const char * const dv_rgb_range[] = {
481 		"Automatic",
482 		"RGB Limited Range (16-235)",
483 		"RGB Full Range (0-255)",
484 		NULL,
485 	};
486 	static const char * const dv_it_content_type[] = {
487 		"Graphics",
488 		"Photo",
489 		"Cinema",
490 		"Game",
491 		"No IT Content",
492 		NULL,
493 	};
494 	static const char * const detect_md_mode[] = {
495 		"Disabled",
496 		"Global",
497 		"Threshold Grid",
498 		"Region Grid",
499 		NULL,
500 	};
501 
502 	static const char * const av1_profile[] = {
503 		"Main",
504 		"High",
505 		"Professional",
506 		NULL,
507 	};
508 	static const char * const av1_level[] = {
509 		"2.0",
510 		"2.1",
511 		"2.2",
512 		"2.3",
513 		"3.0",
514 		"3.1",
515 		"3.2",
516 		"3.3",
517 		"4.0",
518 		"4.1",
519 		"4.2",
520 		"4.3",
521 		"5.0",
522 		"5.1",
523 		"5.2",
524 		"5.3",
525 		"6.0",
526 		"6.1",
527 		"6.2",
528 		"6.3",
529 		"7.0",
530 		"7.1",
531 		"7.2",
532 		"7.3",
533 		NULL,
534 	};
535 
536 	static const char * const hevc_profile[] = {
537 		"Main",
538 		"Main Still Picture",
539 		"Main 10",
540 		NULL,
541 	};
542 	static const char * const hevc_level[] = {
543 		"1",
544 		"2",
545 		"2.1",
546 		"3",
547 		"3.1",
548 		"4",
549 		"4.1",
550 		"5",
551 		"5.1",
552 		"5.2",
553 		"6",
554 		"6.1",
555 		"6.2",
556 		NULL,
557 	};
558 	static const char * const hevc_hierarchial_coding_type[] = {
559 		"B",
560 		"P",
561 		NULL,
562 	};
563 	static const char * const hevc_refresh_type[] = {
564 		"None",
565 		"CRA",
566 		"IDR",
567 		NULL,
568 	};
569 	static const char * const hevc_size_of_length_field[] = {
570 		"0",
571 		"1",
572 		"2",
573 		"4",
574 		NULL,
575 	};
576 	static const char * const hevc_tier[] = {
577 		"Main",
578 		"High",
579 		NULL,
580 	};
581 	static const char * const hevc_loop_filter_mode[] = {
582 		"Disabled",
583 		"Enabled",
584 		"Disabled at slice boundary",
585 		"NULL",
586 	};
587 	static const char * const hevc_decode_mode[] = {
588 		"Slice-Based",
589 		"Frame-Based",
590 		NULL,
591 	};
592 	static const char * const hevc_start_code[] = {
593 		"No Start Code",
594 		"Annex B Start Code",
595 		NULL,
596 	};
597 	static const char * const camera_orientation[] = {
598 		"Front",
599 		"Back",
600 		"External",
601 		NULL,
602 	};
603 	static const char * const mpeg_video_frame_skip[] = {
604 		"Disabled",
605 		"Level Limit",
606 		"VBV/CPB Limit",
607 		NULL,
608 	};
609 	static const char * const intra_refresh_period_type[] = {
610 		"Random",
611 		"Cyclic",
612 		NULL,
613 	};
614 
615 	switch (id) {
616 	case V4L2_CID_MPEG_AUDIO_SAMPLING_FREQ:
617 		return mpeg_audio_sampling_freq;
618 	case V4L2_CID_MPEG_AUDIO_ENCODING:
619 		return mpeg_audio_encoding;
620 	case V4L2_CID_MPEG_AUDIO_L1_BITRATE:
621 		return mpeg_audio_l1_bitrate;
622 	case V4L2_CID_MPEG_AUDIO_L2_BITRATE:
623 		return mpeg_audio_l2_bitrate;
624 	case V4L2_CID_MPEG_AUDIO_L3_BITRATE:
625 		return mpeg_audio_l3_bitrate;
626 	case V4L2_CID_MPEG_AUDIO_AC3_BITRATE:
627 		return mpeg_audio_ac3_bitrate;
628 	case V4L2_CID_MPEG_AUDIO_MODE:
629 		return mpeg_audio_mode;
630 	case V4L2_CID_MPEG_AUDIO_MODE_EXTENSION:
631 		return mpeg_audio_mode_extension;
632 	case V4L2_CID_MPEG_AUDIO_EMPHASIS:
633 		return mpeg_audio_emphasis;
634 	case V4L2_CID_MPEG_AUDIO_CRC:
635 		return mpeg_audio_crc;
636 	case V4L2_CID_MPEG_AUDIO_DEC_PLAYBACK:
637 	case V4L2_CID_MPEG_AUDIO_DEC_MULTILINGUAL_PLAYBACK:
638 		return mpeg_audio_dec_playback;
639 	case V4L2_CID_MPEG_VIDEO_ENCODING:
640 		return mpeg_video_encoding;
641 	case V4L2_CID_MPEG_VIDEO_ASPECT:
642 		return mpeg_video_aspect;
643 	case V4L2_CID_MPEG_VIDEO_BITRATE_MODE:
644 		return mpeg_video_bitrate_mode;
645 	case V4L2_CID_MPEG_STREAM_TYPE:
646 		return mpeg_stream_type;
647 	case V4L2_CID_MPEG_STREAM_VBI_FMT:
648 		return mpeg_stream_vbi_fmt;
649 	case V4L2_CID_POWER_LINE_FREQUENCY:
650 		return camera_power_line_frequency;
651 	case V4L2_CID_EXPOSURE_AUTO:
652 		return camera_exposure_auto;
653 	case V4L2_CID_EXPOSURE_METERING:
654 		return camera_exposure_metering;
655 	case V4L2_CID_AUTO_FOCUS_RANGE:
656 		return camera_auto_focus_range;
657 	case V4L2_CID_COLORFX:
658 		return colorfx;
659 	case V4L2_CID_AUTO_N_PRESET_WHITE_BALANCE:
660 		return auto_n_preset_white_balance;
661 	case V4L2_CID_ISO_SENSITIVITY_AUTO:
662 		return camera_iso_sensitivity_auto;
663 	case V4L2_CID_SCENE_MODE:
664 		return scene_mode;
665 	case V4L2_CID_TUNE_PREEMPHASIS:
666 		return tune_emphasis;
667 	case V4L2_CID_TUNE_DEEMPHASIS:
668 		return tune_emphasis;
669 	case V4L2_CID_FLASH_LED_MODE:
670 		return flash_led_mode;
671 	case V4L2_CID_FLASH_STROBE_SOURCE:
672 		return flash_strobe_source;
673 	case V4L2_CID_MPEG_VIDEO_HEADER_MODE:
674 		return header_mode;
675 	case V4L2_CID_MPEG_VIDEO_FRAME_SKIP_MODE:
676 		return mpeg_video_frame_skip;
677 	case V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MODE:
678 		return multi_slice;
679 	case V4L2_CID_MPEG_VIDEO_H264_ENTROPY_MODE:
680 		return entropy_mode;
681 	case V4L2_CID_MPEG_VIDEO_H264_LEVEL:
682 		return mpeg_h264_level;
683 	case V4L2_CID_MPEG_VIDEO_H264_LOOP_FILTER_MODE:
684 		return h264_loop_filter;
685 	case V4L2_CID_MPEG_VIDEO_H264_PROFILE:
686 		return h264_profile;
687 	case V4L2_CID_MPEG_VIDEO_H264_VUI_SAR_IDC:
688 		return vui_sar_idc;
689 	case V4L2_CID_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE:
690 		return h264_fp_arrangement_type;
691 	case V4L2_CID_MPEG_VIDEO_H264_FMO_MAP_TYPE:
692 		return h264_fmo_map_type;
693 	case V4L2_CID_STATELESS_H264_DECODE_MODE:
694 		return h264_decode_mode;
695 	case V4L2_CID_STATELESS_H264_START_CODE:
696 		return h264_start_code;
697 	case V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING_TYPE:
698 		return h264_hierarchical_coding_type;
699 	case V4L2_CID_MPEG_VIDEO_MPEG2_LEVEL:
700 		return mpeg_mpeg2_level;
701 	case V4L2_CID_MPEG_VIDEO_MPEG2_PROFILE:
702 		return mpeg2_profile;
703 	case V4L2_CID_MPEG_VIDEO_MPEG4_LEVEL:
704 		return mpeg_mpeg4_level;
705 	case V4L2_CID_MPEG_VIDEO_MPEG4_PROFILE:
706 		return mpeg4_profile;
707 	case V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_SEL:
708 		return vpx_golden_frame_sel;
709 	case V4L2_CID_MPEG_VIDEO_VP8_PROFILE:
710 		return vp8_profile;
711 	case V4L2_CID_MPEG_VIDEO_VP9_PROFILE:
712 		return vp9_profile;
713 	case V4L2_CID_MPEG_VIDEO_VP9_LEVEL:
714 		return vp9_level;
715 	case V4L2_CID_JPEG_CHROMA_SUBSAMPLING:
716 		return jpeg_chroma_subsampling;
717 	case V4L2_CID_DV_TX_MODE:
718 		return dv_tx_mode;
719 	case V4L2_CID_DV_TX_RGB_RANGE:
720 	case V4L2_CID_DV_RX_RGB_RANGE:
721 		return dv_rgb_range;
722 	case V4L2_CID_DV_TX_IT_CONTENT_TYPE:
723 	case V4L2_CID_DV_RX_IT_CONTENT_TYPE:
724 		return dv_it_content_type;
725 	case V4L2_CID_DETECT_MD_MODE:
726 		return detect_md_mode;
727 	case V4L2_CID_MPEG_VIDEO_HEVC_PROFILE:
728 		return hevc_profile;
729 	case V4L2_CID_MPEG_VIDEO_HEVC_LEVEL:
730 		return hevc_level;
731 	case V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_TYPE:
732 		return hevc_hierarchial_coding_type;
733 	case V4L2_CID_MPEG_VIDEO_HEVC_REFRESH_TYPE:
734 		return hevc_refresh_type;
735 	case V4L2_CID_MPEG_VIDEO_HEVC_SIZE_OF_LENGTH_FIELD:
736 		return hevc_size_of_length_field;
737 	case V4L2_CID_MPEG_VIDEO_HEVC_TIER:
738 		return hevc_tier;
739 	case V4L2_CID_MPEG_VIDEO_HEVC_LOOP_FILTER_MODE:
740 		return hevc_loop_filter_mode;
741 	case V4L2_CID_MPEG_VIDEO_AV1_PROFILE:
742 		return av1_profile;
743 	case V4L2_CID_MPEG_VIDEO_AV1_LEVEL:
744 		return av1_level;
745 	case V4L2_CID_STATELESS_HEVC_DECODE_MODE:
746 		return hevc_decode_mode;
747 	case V4L2_CID_STATELESS_HEVC_START_CODE:
748 		return hevc_start_code;
749 	case V4L2_CID_CAMERA_ORIENTATION:
750 		return camera_orientation;
751 	case V4L2_CID_MPEG_VIDEO_INTRA_REFRESH_PERIOD_TYPE:
752 		return intra_refresh_period_type;
753 	default:
754 		return NULL;
755 	}
756 }
757 EXPORT_SYMBOL(v4l2_ctrl_get_menu);
758 
759 #define __v4l2_qmenu_int_len(arr, len) ({ *(len) = ARRAY_SIZE(arr); (arr); })
760 /*
761  * Returns NULL or an s64 type array containing the menu for given
762  * control ID. The total number of the menu items is returned in @len.
763  */
v4l2_ctrl_get_int_menu(u32 id,u32 * len)764 const s64 *v4l2_ctrl_get_int_menu(u32 id, u32 *len)
765 {
766 	static const s64 qmenu_int_vpx_num_partitions[] = {
767 		1, 2, 4, 8,
768 	};
769 
770 	static const s64 qmenu_int_vpx_num_ref_frames[] = {
771 		1, 2, 3,
772 	};
773 
774 	switch (id) {
775 	case V4L2_CID_MPEG_VIDEO_VPX_NUM_PARTITIONS:
776 		return __v4l2_qmenu_int_len(qmenu_int_vpx_num_partitions, len);
777 	case V4L2_CID_MPEG_VIDEO_VPX_NUM_REF_FRAMES:
778 		return __v4l2_qmenu_int_len(qmenu_int_vpx_num_ref_frames, len);
779 	default:
780 		*len = 0;
781 		return NULL;
782 	}
783 }
784 EXPORT_SYMBOL(v4l2_ctrl_get_int_menu);
785 
786 /* Return the control name. */
v4l2_ctrl_get_name(u32 id)787 const char *v4l2_ctrl_get_name(u32 id)
788 {
789 	switch (id) {
790 	/* USER controls */
791 	/* Keep the order of the 'case's the same as in v4l2-controls.h! */
792 	case V4L2_CID_USER_CLASS:		return "User Controls";
793 	case V4L2_CID_BRIGHTNESS:		return "Brightness";
794 	case V4L2_CID_CONTRAST:			return "Contrast";
795 	case V4L2_CID_SATURATION:		return "Saturation";
796 	case V4L2_CID_HUE:			return "Hue";
797 	case V4L2_CID_AUDIO_VOLUME:		return "Volume";
798 	case V4L2_CID_AUDIO_BALANCE:		return "Balance";
799 	case V4L2_CID_AUDIO_BASS:		return "Bass";
800 	case V4L2_CID_AUDIO_TREBLE:		return "Treble";
801 	case V4L2_CID_AUDIO_MUTE:		return "Mute";
802 	case V4L2_CID_AUDIO_LOUDNESS:		return "Loudness";
803 	case V4L2_CID_BLACK_LEVEL:		return "Black Level";
804 	case V4L2_CID_AUTO_WHITE_BALANCE:	return "White Balance, Automatic";
805 	case V4L2_CID_DO_WHITE_BALANCE:		return "Do White Balance";
806 	case V4L2_CID_RED_BALANCE:		return "Red Balance";
807 	case V4L2_CID_BLUE_BALANCE:		return "Blue Balance";
808 	case V4L2_CID_GAMMA:			return "Gamma";
809 	case V4L2_CID_EXPOSURE:			return "Exposure";
810 	case V4L2_CID_AUTOGAIN:			return "Gain, Automatic";
811 	case V4L2_CID_GAIN:			return "Gain";
812 	case V4L2_CID_HFLIP:			return "Horizontal Flip";
813 	case V4L2_CID_VFLIP:			return "Vertical Flip";
814 	case V4L2_CID_POWER_LINE_FREQUENCY:	return "Power Line Frequency";
815 	case V4L2_CID_HUE_AUTO:			return "Hue, Automatic";
816 	case V4L2_CID_WHITE_BALANCE_TEMPERATURE: return "White Balance Temperature";
817 	case V4L2_CID_SHARPNESS:		return "Sharpness";
818 	case V4L2_CID_BACKLIGHT_COMPENSATION:	return "Backlight Compensation";
819 	case V4L2_CID_CHROMA_AGC:		return "Chroma AGC";
820 	case V4L2_CID_COLOR_KILLER:		return "Color Killer";
821 	case V4L2_CID_COLORFX:			return "Color Effects";
822 	case V4L2_CID_AUTOBRIGHTNESS:		return "Brightness, Automatic";
823 	case V4L2_CID_BAND_STOP_FILTER:		return "Band-Stop Filter";
824 	case V4L2_CID_ROTATE:			return "Rotate";
825 	case V4L2_CID_BG_COLOR:			return "Background Color";
826 	case V4L2_CID_CHROMA_GAIN:		return "Chroma Gain";
827 	case V4L2_CID_ILLUMINATORS_1:		return "Illuminator 1";
828 	case V4L2_CID_ILLUMINATORS_2:		return "Illuminator 2";
829 	case V4L2_CID_MIN_BUFFERS_FOR_CAPTURE:	return "Min Number of Capture Buffers";
830 	case V4L2_CID_MIN_BUFFERS_FOR_OUTPUT:	return "Min Number of Output Buffers";
831 	case V4L2_CID_ALPHA_COMPONENT:		return "Alpha Component";
832 	case V4L2_CID_COLORFX_CBCR:		return "Color Effects, CbCr";
833 	case V4L2_CID_COLORFX_RGB:              return "Color Effects, RGB";
834 
835 	/*
836 	 * Codec controls
837 	 *
838 	 * The MPEG controls are applicable to all codec controls
839 	 * and the 'MPEG' part of the define is historical.
840 	 *
841 	 * Keep the order of the 'case's the same as in videodev2.h!
842 	 */
843 	case V4L2_CID_CODEC_CLASS:		return "Codec Controls";
844 	case V4L2_CID_MPEG_STREAM_TYPE:		return "Stream Type";
845 	case V4L2_CID_MPEG_STREAM_PID_PMT:	return "Stream PMT Program ID";
846 	case V4L2_CID_MPEG_STREAM_PID_AUDIO:	return "Stream Audio Program ID";
847 	case V4L2_CID_MPEG_STREAM_PID_VIDEO:	return "Stream Video Program ID";
848 	case V4L2_CID_MPEG_STREAM_PID_PCR:	return "Stream PCR Program ID";
849 	case V4L2_CID_MPEG_STREAM_PES_ID_AUDIO: return "Stream PES Audio ID";
850 	case V4L2_CID_MPEG_STREAM_PES_ID_VIDEO: return "Stream PES Video ID";
851 	case V4L2_CID_MPEG_STREAM_VBI_FMT:	return "Stream VBI Format";
852 	case V4L2_CID_MPEG_AUDIO_SAMPLING_FREQ: return "Audio Sampling Frequency";
853 	case V4L2_CID_MPEG_AUDIO_ENCODING:	return "Audio Encoding";
854 	case V4L2_CID_MPEG_AUDIO_L1_BITRATE:	return "Audio Layer I Bitrate";
855 	case V4L2_CID_MPEG_AUDIO_L2_BITRATE:	return "Audio Layer II Bitrate";
856 	case V4L2_CID_MPEG_AUDIO_L3_BITRATE:	return "Audio Layer III Bitrate";
857 	case V4L2_CID_MPEG_AUDIO_MODE:		return "Audio Stereo Mode";
858 	case V4L2_CID_MPEG_AUDIO_MODE_EXTENSION: return "Audio Stereo Mode Extension";
859 	case V4L2_CID_MPEG_AUDIO_EMPHASIS:	return "Audio Emphasis";
860 	case V4L2_CID_MPEG_AUDIO_CRC:		return "Audio CRC";
861 	case V4L2_CID_MPEG_AUDIO_MUTE:		return "Audio Mute";
862 	case V4L2_CID_MPEG_AUDIO_AAC_BITRATE:	return "Audio AAC Bitrate";
863 	case V4L2_CID_MPEG_AUDIO_AC3_BITRATE:	return "Audio AC-3 Bitrate";
864 	case V4L2_CID_MPEG_AUDIO_DEC_PLAYBACK:	return "Audio Playback";
865 	case V4L2_CID_MPEG_AUDIO_DEC_MULTILINGUAL_PLAYBACK: return "Audio Multilingual Playback";
866 	case V4L2_CID_MPEG_VIDEO_ENCODING:	return "Video Encoding";
867 	case V4L2_CID_MPEG_VIDEO_ASPECT:	return "Video Aspect";
868 	case V4L2_CID_MPEG_VIDEO_B_FRAMES:	return "Video B Frames";
869 	case V4L2_CID_MPEG_VIDEO_GOP_SIZE:	return "Video GOP Size";
870 	case V4L2_CID_MPEG_VIDEO_GOP_CLOSURE:	return "Video GOP Closure";
871 	case V4L2_CID_MPEG_VIDEO_PULLDOWN:	return "Video Pulldown";
872 	case V4L2_CID_MPEG_VIDEO_BITRATE_MODE:	return "Video Bitrate Mode";
873 	case V4L2_CID_MPEG_VIDEO_CONSTANT_QUALITY:	return "Constant Quality";
874 	case V4L2_CID_MPEG_VIDEO_BITRATE:	return "Video Bitrate";
875 	case V4L2_CID_MPEG_VIDEO_BITRATE_PEAK:	return "Video Peak Bitrate";
876 	case V4L2_CID_MPEG_VIDEO_TEMPORAL_DECIMATION: return "Video Temporal Decimation";
877 	case V4L2_CID_MPEG_VIDEO_MUTE:		return "Video Mute";
878 	case V4L2_CID_MPEG_VIDEO_MUTE_YUV:	return "Video Mute YUV";
879 	case V4L2_CID_MPEG_VIDEO_DECODER_SLICE_INTERFACE:	return "Decoder Slice Interface";
880 	case V4L2_CID_MPEG_VIDEO_DECODER_MPEG4_DEBLOCK_FILTER:	return "MPEG4 Loop Filter Enable";
881 	case V4L2_CID_MPEG_VIDEO_CYCLIC_INTRA_REFRESH_MB:	return "Number of Intra Refresh MBs";
882 	case V4L2_CID_MPEG_VIDEO_INTRA_REFRESH_PERIOD_TYPE:	return "Intra Refresh Period Type";
883 	case V4L2_CID_MPEG_VIDEO_INTRA_REFRESH_PERIOD:		return "Intra Refresh Period";
884 	case V4L2_CID_MPEG_VIDEO_FRAME_RC_ENABLE:		return "Frame Level Rate Control Enable";
885 	case V4L2_CID_MPEG_VIDEO_MB_RC_ENABLE:			return "H264 MB Level Rate Control";
886 	case V4L2_CID_MPEG_VIDEO_HEADER_MODE:			return "Sequence Header Mode";
887 	case V4L2_CID_MPEG_VIDEO_MAX_REF_PIC:			return "Max Number of Reference Pics";
888 	case V4L2_CID_MPEG_VIDEO_FRAME_SKIP_MODE:		return "Frame Skip Mode";
889 	case V4L2_CID_MPEG_VIDEO_DEC_DISPLAY_DELAY:		return "Display Delay";
890 	case V4L2_CID_MPEG_VIDEO_DEC_DISPLAY_DELAY_ENABLE:	return "Display Delay Enable";
891 	case V4L2_CID_MPEG_VIDEO_AU_DELIMITER:			return "Generate Access Unit Delimiters";
892 	case V4L2_CID_MPEG_VIDEO_H263_I_FRAME_QP:		return "H263 I-Frame QP Value";
893 	case V4L2_CID_MPEG_VIDEO_H263_P_FRAME_QP:		return "H263 P-Frame QP Value";
894 	case V4L2_CID_MPEG_VIDEO_H263_B_FRAME_QP:		return "H263 B-Frame QP Value";
895 	case V4L2_CID_MPEG_VIDEO_H263_MIN_QP:			return "H263 Minimum QP Value";
896 	case V4L2_CID_MPEG_VIDEO_H263_MAX_QP:			return "H263 Maximum QP Value";
897 	case V4L2_CID_MPEG_VIDEO_H264_I_FRAME_QP:		return "H264 I-Frame QP Value";
898 	case V4L2_CID_MPEG_VIDEO_H264_P_FRAME_QP:		return "H264 P-Frame QP Value";
899 	case V4L2_CID_MPEG_VIDEO_H264_B_FRAME_QP:		return "H264 B-Frame QP Value";
900 	case V4L2_CID_MPEG_VIDEO_H264_MAX_QP:			return "H264 Maximum QP Value";
901 	case V4L2_CID_MPEG_VIDEO_H264_MIN_QP:			return "H264 Minimum QP Value";
902 	case V4L2_CID_MPEG_VIDEO_H264_8X8_TRANSFORM:		return "H264 8x8 Transform Enable";
903 	case V4L2_CID_MPEG_VIDEO_H264_CPB_SIZE:			return "H264 CPB Buffer Size";
904 	case V4L2_CID_MPEG_VIDEO_H264_ENTROPY_MODE:		return "H264 Entropy Mode";
905 	case V4L2_CID_MPEG_VIDEO_H264_I_PERIOD:			return "H264 I-Frame Period";
906 	case V4L2_CID_MPEG_VIDEO_H264_LEVEL:			return "H264 Level";
907 	case V4L2_CID_MPEG_VIDEO_H264_LOOP_FILTER_ALPHA:	return "H264 Loop Filter Alpha Offset";
908 	case V4L2_CID_MPEG_VIDEO_H264_LOOP_FILTER_BETA:		return "H264 Loop Filter Beta Offset";
909 	case V4L2_CID_MPEG_VIDEO_H264_LOOP_FILTER_MODE:		return "H264 Loop Filter Mode";
910 	case V4L2_CID_MPEG_VIDEO_H264_PROFILE:			return "H264 Profile";
911 	case V4L2_CID_MPEG_VIDEO_H264_VUI_EXT_SAR_HEIGHT:	return "Vertical Size of SAR";
912 	case V4L2_CID_MPEG_VIDEO_H264_VUI_EXT_SAR_WIDTH:	return "Horizontal Size of SAR";
913 	case V4L2_CID_MPEG_VIDEO_H264_VUI_SAR_ENABLE:		return "Aspect Ratio VUI Enable";
914 	case V4L2_CID_MPEG_VIDEO_H264_VUI_SAR_IDC:		return "VUI Aspect Ratio IDC";
915 	case V4L2_CID_MPEG_VIDEO_H264_SEI_FRAME_PACKING:	return "H264 Enable Frame Packing SEI";
916 	case V4L2_CID_MPEG_VIDEO_H264_SEI_FP_CURRENT_FRAME_0:	return "H264 Set Curr. Frame as Frame0";
917 	case V4L2_CID_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE:	return "H264 FP Arrangement Type";
918 	case V4L2_CID_MPEG_VIDEO_H264_FMO:			return "H264 Flexible MB Ordering";
919 	case V4L2_CID_MPEG_VIDEO_H264_FMO_MAP_TYPE:		return "H264 Map Type for FMO";
920 	case V4L2_CID_MPEG_VIDEO_H264_FMO_SLICE_GROUP:		return "H264 FMO Number of Slice Groups";
921 	case V4L2_CID_MPEG_VIDEO_H264_FMO_CHANGE_DIRECTION:	return "H264 FMO Direction of Change";
922 	case V4L2_CID_MPEG_VIDEO_H264_FMO_CHANGE_RATE:		return "H264 FMO Size of 1st Slice Grp";
923 	case V4L2_CID_MPEG_VIDEO_H264_FMO_RUN_LENGTH:		return "H264 FMO No. of Consecutive MBs";
924 	case V4L2_CID_MPEG_VIDEO_H264_ASO:			return "H264 Arbitrary Slice Ordering";
925 	case V4L2_CID_MPEG_VIDEO_H264_ASO_SLICE_ORDER:		return "H264 ASO Slice Order";
926 	case V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING:	return "Enable H264 Hierarchical Coding";
927 	case V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING_TYPE:	return "H264 Hierarchical Coding Type";
928 	case V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING_LAYER:return "H264 Number of HC Layers";
929 	case V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING_LAYER_QP:
930 								return "H264 Set QP Value for HC Layers";
931 	case V4L2_CID_MPEG_VIDEO_H264_CONSTRAINED_INTRA_PREDICTION:
932 								return "H264 Constrained Intra Pred";
933 	case V4L2_CID_MPEG_VIDEO_H264_CHROMA_QP_INDEX_OFFSET:	return "H264 Chroma QP Index Offset";
934 	case V4L2_CID_MPEG_VIDEO_H264_I_FRAME_MIN_QP:		return "H264 I-Frame Minimum QP Value";
935 	case V4L2_CID_MPEG_VIDEO_H264_I_FRAME_MAX_QP:		return "H264 I-Frame Maximum QP Value";
936 	case V4L2_CID_MPEG_VIDEO_H264_P_FRAME_MIN_QP:		return "H264 P-Frame Minimum QP Value";
937 	case V4L2_CID_MPEG_VIDEO_H264_P_FRAME_MAX_QP:		return "H264 P-Frame Maximum QP Value";
938 	case V4L2_CID_MPEG_VIDEO_H264_B_FRAME_MIN_QP:		return "H264 B-Frame Minimum QP Value";
939 	case V4L2_CID_MPEG_VIDEO_H264_B_FRAME_MAX_QP:		return "H264 B-Frame Maximum QP Value";
940 	case V4L2_CID_MPEG_VIDEO_H264_HIER_CODING_L0_BR:	return "H264 Hierarchical Lay 0 Bitrate";
941 	case V4L2_CID_MPEG_VIDEO_H264_HIER_CODING_L1_BR:	return "H264 Hierarchical Lay 1 Bitrate";
942 	case V4L2_CID_MPEG_VIDEO_H264_HIER_CODING_L2_BR:	return "H264 Hierarchical Lay 2 Bitrate";
943 	case V4L2_CID_MPEG_VIDEO_H264_HIER_CODING_L3_BR:	return "H264 Hierarchical Lay 3 Bitrate";
944 	case V4L2_CID_MPEG_VIDEO_H264_HIER_CODING_L4_BR:	return "H264 Hierarchical Lay 4 Bitrate";
945 	case V4L2_CID_MPEG_VIDEO_H264_HIER_CODING_L5_BR:	return "H264 Hierarchical Lay 5 Bitrate";
946 	case V4L2_CID_MPEG_VIDEO_H264_HIER_CODING_L6_BR:	return "H264 Hierarchical Lay 6 Bitrate";
947 	case V4L2_CID_MPEG_VIDEO_MPEG2_LEVEL:			return "MPEG2 Level";
948 	case V4L2_CID_MPEG_VIDEO_MPEG2_PROFILE:			return "MPEG2 Profile";
949 	case V4L2_CID_MPEG_VIDEO_MPEG4_I_FRAME_QP:		return "MPEG4 I-Frame QP Value";
950 	case V4L2_CID_MPEG_VIDEO_MPEG4_P_FRAME_QP:		return "MPEG4 P-Frame QP Value";
951 	case V4L2_CID_MPEG_VIDEO_MPEG4_B_FRAME_QP:		return "MPEG4 B-Frame QP Value";
952 	case V4L2_CID_MPEG_VIDEO_MPEG4_MIN_QP:			return "MPEG4 Minimum QP Value";
953 	case V4L2_CID_MPEG_VIDEO_MPEG4_MAX_QP:			return "MPEG4 Maximum QP Value";
954 	case V4L2_CID_MPEG_VIDEO_MPEG4_LEVEL:			return "MPEG4 Level";
955 	case V4L2_CID_MPEG_VIDEO_MPEG4_PROFILE:			return "MPEG4 Profile";
956 	case V4L2_CID_MPEG_VIDEO_MPEG4_QPEL:			return "Quarter Pixel Search Enable";
957 	case V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MAX_BYTES:		return "Maximum Bytes in a Slice";
958 	case V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MAX_MB:		return "Number of MBs in a Slice";
959 	case V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MODE:		return "Slice Partitioning Method";
960 	case V4L2_CID_MPEG_VIDEO_VBV_SIZE:			return "VBV Buffer Size";
961 	case V4L2_CID_MPEG_VIDEO_DEC_PTS:			return "Video Decoder PTS";
962 	case V4L2_CID_MPEG_VIDEO_DEC_FRAME:			return "Video Decoder Frame Count";
963 	case V4L2_CID_MPEG_VIDEO_DEC_CONCEAL_COLOR:		return "Video Decoder Conceal Color";
964 	case V4L2_CID_MPEG_VIDEO_VBV_DELAY:			return "Initial Delay for VBV Control";
965 	case V4L2_CID_MPEG_VIDEO_MV_H_SEARCH_RANGE:		return "Horizontal MV Search Range";
966 	case V4L2_CID_MPEG_VIDEO_MV_V_SEARCH_RANGE:		return "Vertical MV Search Range";
967 	case V4L2_CID_MPEG_VIDEO_REPEAT_SEQ_HEADER:		return "Repeat Sequence Header";
968 	case V4L2_CID_MPEG_VIDEO_FORCE_KEY_FRAME:		return "Force Key Frame";
969 	case V4L2_CID_MPEG_VIDEO_BASELAYER_PRIORITY_ID:		return "Base Layer Priority ID";
970 	case V4L2_CID_MPEG_VIDEO_LTR_COUNT:			return "LTR Count";
971 	case V4L2_CID_MPEG_VIDEO_FRAME_LTR_INDEX:		return "Frame LTR Index";
972 	case V4L2_CID_MPEG_VIDEO_USE_LTR_FRAMES:		return "Use LTR Frames";
973 	case V4L2_CID_FWHT_I_FRAME_QP:				return "FWHT I-Frame QP Value";
974 	case V4L2_CID_FWHT_P_FRAME_QP:				return "FWHT P-Frame QP Value";
975 
976 	/* VPX controls */
977 	case V4L2_CID_MPEG_VIDEO_VPX_NUM_PARTITIONS:		return "VPX Number of Partitions";
978 	case V4L2_CID_MPEG_VIDEO_VPX_IMD_DISABLE_4X4:		return "VPX Intra Mode Decision Disable";
979 	case V4L2_CID_MPEG_VIDEO_VPX_NUM_REF_FRAMES:		return "VPX No. of Refs for P Frame";
980 	case V4L2_CID_MPEG_VIDEO_VPX_FILTER_LEVEL:		return "VPX Loop Filter Level Range";
981 	case V4L2_CID_MPEG_VIDEO_VPX_FILTER_SHARPNESS:		return "VPX Deblocking Effect Control";
982 	case V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_REF_PERIOD:	return "VPX Golden Frame Refresh Period";
983 	case V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_SEL:		return "VPX Golden Frame Indicator";
984 	case V4L2_CID_MPEG_VIDEO_VPX_MIN_QP:			return "VPX Minimum QP Value";
985 	case V4L2_CID_MPEG_VIDEO_VPX_MAX_QP:			return "VPX Maximum QP Value";
986 	case V4L2_CID_MPEG_VIDEO_VPX_I_FRAME_QP:		return "VPX I-Frame QP Value";
987 	case V4L2_CID_MPEG_VIDEO_VPX_P_FRAME_QP:		return "VPX P-Frame QP Value";
988 	case V4L2_CID_MPEG_VIDEO_VP8_PROFILE:			return "VP8 Profile";
989 	case V4L2_CID_MPEG_VIDEO_VP9_PROFILE:			return "VP9 Profile";
990 	case V4L2_CID_MPEG_VIDEO_VP9_LEVEL:			return "VP9 Level";
991 
992 	/* HEVC controls */
993 	case V4L2_CID_MPEG_VIDEO_HEVC_I_FRAME_QP:		return "HEVC I-Frame QP Value";
994 	case V4L2_CID_MPEG_VIDEO_HEVC_P_FRAME_QP:		return "HEVC P-Frame QP Value";
995 	case V4L2_CID_MPEG_VIDEO_HEVC_B_FRAME_QP:		return "HEVC B-Frame QP Value";
996 	case V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP:			return "HEVC Minimum QP Value";
997 	case V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP:			return "HEVC Maximum QP Value";
998 	case V4L2_CID_MPEG_VIDEO_HEVC_I_FRAME_MIN_QP:		return "HEVC I-Frame Minimum QP Value";
999 	case V4L2_CID_MPEG_VIDEO_HEVC_I_FRAME_MAX_QP:		return "HEVC I-Frame Maximum QP Value";
1000 	case V4L2_CID_MPEG_VIDEO_HEVC_P_FRAME_MIN_QP:		return "HEVC P-Frame Minimum QP Value";
1001 	case V4L2_CID_MPEG_VIDEO_HEVC_P_FRAME_MAX_QP:		return "HEVC P-Frame Maximum QP Value";
1002 	case V4L2_CID_MPEG_VIDEO_HEVC_B_FRAME_MIN_QP:		return "HEVC B-Frame Minimum QP Value";
1003 	case V4L2_CID_MPEG_VIDEO_HEVC_B_FRAME_MAX_QP:		return "HEVC B-Frame Maximum QP Value";
1004 	case V4L2_CID_MPEG_VIDEO_HEVC_PROFILE:			return "HEVC Profile";
1005 	case V4L2_CID_MPEG_VIDEO_HEVC_LEVEL:			return "HEVC Level";
1006 	case V4L2_CID_MPEG_VIDEO_HEVC_TIER:			return "HEVC Tier";
1007 	case V4L2_CID_MPEG_VIDEO_HEVC_FRAME_RATE_RESOLUTION:	return "HEVC Frame Rate Resolution";
1008 	case V4L2_CID_MPEG_VIDEO_HEVC_MAX_PARTITION_DEPTH:	return "HEVC Maximum Coding Unit Depth";
1009 	case V4L2_CID_MPEG_VIDEO_HEVC_REFRESH_TYPE:		return "HEVC Refresh Type";
1010 	case V4L2_CID_MPEG_VIDEO_HEVC_CONST_INTRA_PRED:		return "HEVC Constant Intra Prediction";
1011 	case V4L2_CID_MPEG_VIDEO_HEVC_LOSSLESS_CU:		return "HEVC Lossless Encoding";
1012 	case V4L2_CID_MPEG_VIDEO_HEVC_WAVEFRONT:		return "HEVC Wavefront";
1013 	case V4L2_CID_MPEG_VIDEO_HEVC_LOOP_FILTER_MODE:		return "HEVC Loop Filter";
1014 	case V4L2_CID_MPEG_VIDEO_HEVC_HIER_QP:			return "HEVC QP Values";
1015 	case V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_TYPE:		return "HEVC Hierarchical Coding Type";
1016 	case V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_LAYER:	return "HEVC Hierarchical Coding Layer";
1017 	case V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L0_QP:	return "HEVC Hierarchical Layer 0 QP";
1018 	case V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L1_QP:	return "HEVC Hierarchical Layer 1 QP";
1019 	case V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L2_QP:	return "HEVC Hierarchical Layer 2 QP";
1020 	case V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L3_QP:	return "HEVC Hierarchical Layer 3 QP";
1021 	case V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L4_QP:	return "HEVC Hierarchical Layer 4 QP";
1022 	case V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L5_QP:	return "HEVC Hierarchical Layer 5 QP";
1023 	case V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L6_QP:	return "HEVC Hierarchical Layer 6 QP";
1024 	case V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L0_BR:	return "HEVC Hierarchical Lay 0 BitRate";
1025 	case V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L1_BR:	return "HEVC Hierarchical Lay 1 BitRate";
1026 	case V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L2_BR:	return "HEVC Hierarchical Lay 2 BitRate";
1027 	case V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L3_BR:	return "HEVC Hierarchical Lay 3 BitRate";
1028 	case V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L4_BR:	return "HEVC Hierarchical Lay 4 BitRate";
1029 	case V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L5_BR:	return "HEVC Hierarchical Lay 5 BitRate";
1030 	case V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L6_BR:	return "HEVC Hierarchical Lay 6 BitRate";
1031 	case V4L2_CID_MPEG_VIDEO_HEVC_GENERAL_PB:		return "HEVC General PB";
1032 	case V4L2_CID_MPEG_VIDEO_HEVC_TEMPORAL_ID:		return "HEVC Temporal ID";
1033 	case V4L2_CID_MPEG_VIDEO_HEVC_STRONG_SMOOTHING:		return "HEVC Strong Intra Smoothing";
1034 	case V4L2_CID_MPEG_VIDEO_HEVC_INTRA_PU_SPLIT:		return "HEVC Intra PU Split";
1035 	case V4L2_CID_MPEG_VIDEO_HEVC_TMV_PREDICTION:		return "HEVC TMV Prediction";
1036 	case V4L2_CID_MPEG_VIDEO_HEVC_MAX_NUM_MERGE_MV_MINUS1:	return "HEVC Max Num of Candidate MVs";
1037 	case V4L2_CID_MPEG_VIDEO_HEVC_WITHOUT_STARTCODE:	return "HEVC ENC Without Startcode";
1038 	case V4L2_CID_MPEG_VIDEO_HEVC_REFRESH_PERIOD:		return "HEVC Num of I-Frame b/w 2 IDR";
1039 	case V4L2_CID_MPEG_VIDEO_HEVC_LF_BETA_OFFSET_DIV2:	return "HEVC Loop Filter Beta Offset";
1040 	case V4L2_CID_MPEG_VIDEO_HEVC_LF_TC_OFFSET_DIV2:	return "HEVC Loop Filter TC Offset";
1041 	case V4L2_CID_MPEG_VIDEO_HEVC_SIZE_OF_LENGTH_FIELD:	return "HEVC Size of Length Field";
1042 	case V4L2_CID_MPEG_VIDEO_REF_NUMBER_FOR_PFRAMES:	return "Reference Frames for a P-Frame";
1043 	case V4L2_CID_MPEG_VIDEO_PREPEND_SPSPPS_TO_IDR:		return "Prepend SPS and PPS to IDR";
1044 
1045 	/* AV1 controls */
1046 	case V4L2_CID_MPEG_VIDEO_AV1_PROFILE:			return "AV1 Profile";
1047 	case V4L2_CID_MPEG_VIDEO_AV1_LEVEL:			return "AV1 Level";
1048 
1049 	/* CAMERA controls */
1050 	/* Keep the order of the 'case's the same as in v4l2-controls.h! */
1051 	case V4L2_CID_CAMERA_CLASS:		return "Camera Controls";
1052 	case V4L2_CID_EXPOSURE_AUTO:		return "Auto Exposure";
1053 	case V4L2_CID_EXPOSURE_ABSOLUTE:	return "Exposure Time, Absolute";
1054 	case V4L2_CID_EXPOSURE_AUTO_PRIORITY:	return "Exposure, Dynamic Framerate";
1055 	case V4L2_CID_PAN_RELATIVE:		return "Pan, Relative";
1056 	case V4L2_CID_TILT_RELATIVE:		return "Tilt, Relative";
1057 	case V4L2_CID_PAN_RESET:		return "Pan, Reset";
1058 	case V4L2_CID_TILT_RESET:		return "Tilt, Reset";
1059 	case V4L2_CID_PAN_ABSOLUTE:		return "Pan, Absolute";
1060 	case V4L2_CID_TILT_ABSOLUTE:		return "Tilt, Absolute";
1061 	case V4L2_CID_FOCUS_ABSOLUTE:		return "Focus, Absolute";
1062 	case V4L2_CID_FOCUS_RELATIVE:		return "Focus, Relative";
1063 	case V4L2_CID_FOCUS_AUTO:		return "Focus, Automatic Continuous";
1064 	case V4L2_CID_ZOOM_ABSOLUTE:		return "Zoom, Absolute";
1065 	case V4L2_CID_ZOOM_RELATIVE:		return "Zoom, Relative";
1066 	case V4L2_CID_ZOOM_CONTINUOUS:		return "Zoom, Continuous";
1067 	case V4L2_CID_PRIVACY:			return "Privacy";
1068 	case V4L2_CID_IRIS_ABSOLUTE:		return "Iris, Absolute";
1069 	case V4L2_CID_IRIS_RELATIVE:		return "Iris, Relative";
1070 	case V4L2_CID_AUTO_EXPOSURE_BIAS:	return "Auto Exposure, Bias";
1071 	case V4L2_CID_AUTO_N_PRESET_WHITE_BALANCE: return "White Balance, Auto & Preset";
1072 	case V4L2_CID_WIDE_DYNAMIC_RANGE:	return "Wide Dynamic Range";
1073 	case V4L2_CID_IMAGE_STABILIZATION:	return "Image Stabilization";
1074 	case V4L2_CID_ISO_SENSITIVITY:		return "ISO Sensitivity";
1075 	case V4L2_CID_ISO_SENSITIVITY_AUTO:	return "ISO Sensitivity, Auto";
1076 	case V4L2_CID_EXPOSURE_METERING:	return "Exposure, Metering Mode";
1077 	case V4L2_CID_SCENE_MODE:		return "Scene Mode";
1078 	case V4L2_CID_3A_LOCK:			return "3A Lock";
1079 	case V4L2_CID_AUTO_FOCUS_START:		return "Auto Focus, Start";
1080 	case V4L2_CID_AUTO_FOCUS_STOP:		return "Auto Focus, Stop";
1081 	case V4L2_CID_AUTO_FOCUS_STATUS:	return "Auto Focus, Status";
1082 	case V4L2_CID_AUTO_FOCUS_RANGE:		return "Auto Focus, Range";
1083 	case V4L2_CID_PAN_SPEED:		return "Pan, Speed";
1084 	case V4L2_CID_TILT_SPEED:		return "Tilt, Speed";
1085 	case V4L2_CID_UNIT_CELL_SIZE:		return "Unit Cell Size";
1086 	case V4L2_CID_CAMERA_ORIENTATION:	return "Camera Orientation";
1087 	case V4L2_CID_CAMERA_SENSOR_ROTATION:	return "Camera Sensor Rotation";
1088 	case V4L2_CID_HDR_SENSOR_MODE:		return "HDR Sensor Mode";
1089 
1090 	/* FM Radio Modulator controls */
1091 	/* Keep the order of the 'case's the same as in v4l2-controls.h! */
1092 	case V4L2_CID_FM_TX_CLASS:		return "FM Radio Modulator Controls";
1093 	case V4L2_CID_RDS_TX_DEVIATION:		return "RDS Signal Deviation";
1094 	case V4L2_CID_RDS_TX_PI:		return "RDS Program ID";
1095 	case V4L2_CID_RDS_TX_PTY:		return "RDS Program Type";
1096 	case V4L2_CID_RDS_TX_PS_NAME:		return "RDS PS Name";
1097 	case V4L2_CID_RDS_TX_RADIO_TEXT:	return "RDS Radio Text";
1098 	case V4L2_CID_RDS_TX_MONO_STEREO:	return "RDS Stereo";
1099 	case V4L2_CID_RDS_TX_ARTIFICIAL_HEAD:	return "RDS Artificial Head";
1100 	case V4L2_CID_RDS_TX_COMPRESSED:	return "RDS Compressed";
1101 	case V4L2_CID_RDS_TX_DYNAMIC_PTY:	return "RDS Dynamic PTY";
1102 	case V4L2_CID_RDS_TX_TRAFFIC_ANNOUNCEMENT: return "RDS Traffic Announcement";
1103 	case V4L2_CID_RDS_TX_TRAFFIC_PROGRAM:	return "RDS Traffic Program";
1104 	case V4L2_CID_RDS_TX_MUSIC_SPEECH:	return "RDS Music";
1105 	case V4L2_CID_RDS_TX_ALT_FREQS_ENABLE:	return "RDS Enable Alt Frequencies";
1106 	case V4L2_CID_RDS_TX_ALT_FREQS:		return "RDS Alternate Frequencies";
1107 	case V4L2_CID_AUDIO_LIMITER_ENABLED:	return "Audio Limiter Feature Enabled";
1108 	case V4L2_CID_AUDIO_LIMITER_RELEASE_TIME: return "Audio Limiter Release Time";
1109 	case V4L2_CID_AUDIO_LIMITER_DEVIATION:	return "Audio Limiter Deviation";
1110 	case V4L2_CID_AUDIO_COMPRESSION_ENABLED: return "Audio Compression Enabled";
1111 	case V4L2_CID_AUDIO_COMPRESSION_GAIN:	return "Audio Compression Gain";
1112 	case V4L2_CID_AUDIO_COMPRESSION_THRESHOLD: return "Audio Compression Threshold";
1113 	case V4L2_CID_AUDIO_COMPRESSION_ATTACK_TIME: return "Audio Compression Attack Time";
1114 	case V4L2_CID_AUDIO_COMPRESSION_RELEASE_TIME: return "Audio Compression Release Time";
1115 	case V4L2_CID_PILOT_TONE_ENABLED:	return "Pilot Tone Feature Enabled";
1116 	case V4L2_CID_PILOT_TONE_DEVIATION:	return "Pilot Tone Deviation";
1117 	case V4L2_CID_PILOT_TONE_FREQUENCY:	return "Pilot Tone Frequency";
1118 	case V4L2_CID_TUNE_PREEMPHASIS:		return "Pre-Emphasis";
1119 	case V4L2_CID_TUNE_POWER_LEVEL:		return "Tune Power Level";
1120 	case V4L2_CID_TUNE_ANTENNA_CAPACITOR:	return "Tune Antenna Capacitor";
1121 
1122 	/* Flash controls */
1123 	/* Keep the order of the 'case's the same as in v4l2-controls.h! */
1124 	case V4L2_CID_FLASH_CLASS:		return "Flash Controls";
1125 	case V4L2_CID_FLASH_LED_MODE:		return "LED Mode";
1126 	case V4L2_CID_FLASH_STROBE_SOURCE:	return "Strobe Source";
1127 	case V4L2_CID_FLASH_STROBE:		return "Strobe";
1128 	case V4L2_CID_FLASH_STROBE_STOP:	return "Stop Strobe";
1129 	case V4L2_CID_FLASH_STROBE_STATUS:	return "Strobe Status";
1130 	case V4L2_CID_FLASH_TIMEOUT:		return "Strobe Timeout";
1131 	case V4L2_CID_FLASH_INTENSITY:		return "Intensity, Flash Mode";
1132 	case V4L2_CID_FLASH_TORCH_INTENSITY:	return "Intensity, Torch Mode";
1133 	case V4L2_CID_FLASH_INDICATOR_INTENSITY: return "Intensity, Indicator";
1134 	case V4L2_CID_FLASH_FAULT:		return "Faults";
1135 	case V4L2_CID_FLASH_CHARGE:		return "Charge";
1136 	case V4L2_CID_FLASH_READY:		return "Ready to Strobe";
1137 
1138 	/* JPEG encoder controls */
1139 	/* Keep the order of the 'case's the same as in v4l2-controls.h! */
1140 	case V4L2_CID_JPEG_CLASS:		return "JPEG Compression Controls";
1141 	case V4L2_CID_JPEG_CHROMA_SUBSAMPLING:	return "Chroma Subsampling";
1142 	case V4L2_CID_JPEG_RESTART_INTERVAL:	return "Restart Interval";
1143 	case V4L2_CID_JPEG_COMPRESSION_QUALITY:	return "Compression Quality";
1144 	case V4L2_CID_JPEG_ACTIVE_MARKER:	return "Active Markers";
1145 
1146 	/* Image source controls */
1147 	/* Keep the order of the 'case's the same as in v4l2-controls.h! */
1148 	case V4L2_CID_IMAGE_SOURCE_CLASS:	return "Image Source Controls";
1149 	case V4L2_CID_VBLANK:			return "Vertical Blanking";
1150 	case V4L2_CID_HBLANK:			return "Horizontal Blanking";
1151 	case V4L2_CID_ANALOGUE_GAIN:		return "Analogue Gain";
1152 	case V4L2_CID_TEST_PATTERN_RED:		return "Red Pixel Value";
1153 	case V4L2_CID_TEST_PATTERN_GREENR:	return "Green (Red) Pixel Value";
1154 	case V4L2_CID_TEST_PATTERN_BLUE:	return "Blue Pixel Value";
1155 	case V4L2_CID_TEST_PATTERN_GREENB:	return "Green (Blue) Pixel Value";
1156 	case V4L2_CID_NOTIFY_GAINS:		return "Notify Gains";
1157 
1158 	/* Image processing controls */
1159 	/* Keep the order of the 'case's the same as in v4l2-controls.h! */
1160 	case V4L2_CID_IMAGE_PROC_CLASS:		return "Image Processing Controls";
1161 	case V4L2_CID_LINK_FREQ:		return "Link Frequency";
1162 	case V4L2_CID_PIXEL_RATE:		return "Pixel Rate";
1163 	case V4L2_CID_TEST_PATTERN:		return "Test Pattern";
1164 	case V4L2_CID_DEINTERLACING_MODE:	return "Deinterlacing Mode";
1165 	case V4L2_CID_DIGITAL_GAIN:		return "Digital Gain";
1166 
1167 	/* DV controls */
1168 	/* Keep the order of the 'case's the same as in v4l2-controls.h! */
1169 	case V4L2_CID_DV_CLASS:			return "Digital Video Controls";
1170 	case V4L2_CID_DV_TX_HOTPLUG:		return "Hotplug Present";
1171 	case V4L2_CID_DV_TX_RXSENSE:		return "RxSense Present";
1172 	case V4L2_CID_DV_TX_EDID_PRESENT:	return "EDID Present";
1173 	case V4L2_CID_DV_TX_MODE:		return "Transmit Mode";
1174 	case V4L2_CID_DV_TX_RGB_RANGE:		return "Tx RGB Quantization Range";
1175 	case V4L2_CID_DV_TX_IT_CONTENT_TYPE:	return "Tx IT Content Type";
1176 	case V4L2_CID_DV_RX_POWER_PRESENT:	return "Power Present";
1177 	case V4L2_CID_DV_RX_RGB_RANGE:		return "Rx RGB Quantization Range";
1178 	case V4L2_CID_DV_RX_IT_CONTENT_TYPE:	return "Rx IT Content Type";
1179 
1180 	case V4L2_CID_FM_RX_CLASS:		return "FM Radio Receiver Controls";
1181 	case V4L2_CID_TUNE_DEEMPHASIS:		return "De-Emphasis";
1182 	case V4L2_CID_RDS_RECEPTION:		return "RDS Reception";
1183 	case V4L2_CID_RF_TUNER_CLASS:		return "RF Tuner Controls";
1184 	case V4L2_CID_RF_TUNER_RF_GAIN:		return "RF Gain";
1185 	case V4L2_CID_RF_TUNER_LNA_GAIN_AUTO:	return "LNA Gain, Auto";
1186 	case V4L2_CID_RF_TUNER_LNA_GAIN:	return "LNA Gain";
1187 	case V4L2_CID_RF_TUNER_MIXER_GAIN_AUTO:	return "Mixer Gain, Auto";
1188 	case V4L2_CID_RF_TUNER_MIXER_GAIN:	return "Mixer Gain";
1189 	case V4L2_CID_RF_TUNER_IF_GAIN_AUTO:	return "IF Gain, Auto";
1190 	case V4L2_CID_RF_TUNER_IF_GAIN:		return "IF Gain";
1191 	case V4L2_CID_RF_TUNER_BANDWIDTH_AUTO:	return "Bandwidth, Auto";
1192 	case V4L2_CID_RF_TUNER_BANDWIDTH:	return "Bandwidth";
1193 	case V4L2_CID_RF_TUNER_PLL_LOCK:	return "PLL Lock";
1194 	case V4L2_CID_RDS_RX_PTY:		return "RDS Program Type";
1195 	case V4L2_CID_RDS_RX_PS_NAME:		return "RDS PS Name";
1196 	case V4L2_CID_RDS_RX_RADIO_TEXT:	return "RDS Radio Text";
1197 	case V4L2_CID_RDS_RX_TRAFFIC_ANNOUNCEMENT: return "RDS Traffic Announcement";
1198 	case V4L2_CID_RDS_RX_TRAFFIC_PROGRAM:	return "RDS Traffic Program";
1199 	case V4L2_CID_RDS_RX_MUSIC_SPEECH:	return "RDS Music";
1200 
1201 	/* Detection controls */
1202 	/* Keep the order of the 'case's the same as in v4l2-controls.h! */
1203 	case V4L2_CID_DETECT_CLASS:		return "Detection Controls";
1204 	case V4L2_CID_DETECT_MD_MODE:		return "Motion Detection Mode";
1205 	case V4L2_CID_DETECT_MD_GLOBAL_THRESHOLD: return "MD Global Threshold";
1206 	case V4L2_CID_DETECT_MD_THRESHOLD_GRID:	return "MD Threshold Grid";
1207 	case V4L2_CID_DETECT_MD_REGION_GRID:	return "MD Region Grid";
1208 
1209 	/* Stateless Codec controls */
1210 	/* Keep the order of the 'case's the same as in v4l2-controls.h! */
1211 	case V4L2_CID_CODEC_STATELESS_CLASS:	return "Stateless Codec Controls";
1212 	case V4L2_CID_STATELESS_H264_DECODE_MODE:		return "H264 Decode Mode";
1213 	case V4L2_CID_STATELESS_H264_START_CODE:		return "H264 Start Code";
1214 	case V4L2_CID_STATELESS_H264_SPS:			return "H264 Sequence Parameter Set";
1215 	case V4L2_CID_STATELESS_H264_PPS:			return "H264 Picture Parameter Set";
1216 	case V4L2_CID_STATELESS_H264_SCALING_MATRIX:		return "H264 Scaling Matrix";
1217 	case V4L2_CID_STATELESS_H264_PRED_WEIGHTS:		return "H264 Prediction Weight Table";
1218 	case V4L2_CID_STATELESS_H264_SLICE_PARAMS:		return "H264 Slice Parameters";
1219 	case V4L2_CID_STATELESS_H264_DECODE_PARAMS:		return "H264 Decode Parameters";
1220 	case V4L2_CID_STATELESS_FWHT_PARAMS:			return "FWHT Stateless Parameters";
1221 	case V4L2_CID_STATELESS_VP8_FRAME:			return "VP8 Frame Parameters";
1222 	case V4L2_CID_STATELESS_MPEG2_SEQUENCE:			return "MPEG-2 Sequence Header";
1223 	case V4L2_CID_STATELESS_MPEG2_PICTURE:			return "MPEG-2 Picture Header";
1224 	case V4L2_CID_STATELESS_MPEG2_QUANTISATION:		return "MPEG-2 Quantisation Matrices";
1225 	case V4L2_CID_STATELESS_VP9_COMPRESSED_HDR:	return "VP9 Probabilities Updates";
1226 	case V4L2_CID_STATELESS_VP9_FRAME:			return "VP9 Frame Decode Parameters";
1227 	case V4L2_CID_STATELESS_HEVC_SPS:			return "HEVC Sequence Parameter Set";
1228 	case V4L2_CID_STATELESS_HEVC_PPS:			return "HEVC Picture Parameter Set";
1229 	case V4L2_CID_STATELESS_HEVC_SLICE_PARAMS:		return "HEVC Slice Parameters";
1230 	case V4L2_CID_STATELESS_HEVC_SCALING_MATRIX:		return "HEVC Scaling Matrix";
1231 	case V4L2_CID_STATELESS_HEVC_DECODE_PARAMS:		return "HEVC Decode Parameters";
1232 	case V4L2_CID_STATELESS_HEVC_DECODE_MODE:		return "HEVC Decode Mode";
1233 	case V4L2_CID_STATELESS_HEVC_START_CODE:		return "HEVC Start Code";
1234 	case V4L2_CID_STATELESS_HEVC_ENTRY_POINT_OFFSETS:	return "HEVC Entry Point Offsets";
1235 	case V4L2_CID_STATELESS_AV1_SEQUENCE:			return "AV1 Sequence Parameters";
1236 	case V4L2_CID_STATELESS_AV1_TILE_GROUP_ENTRY:		return "AV1 Tile Group Entry";
1237 	case V4L2_CID_STATELESS_AV1_FRAME:			return "AV1 Frame Parameters";
1238 	case V4L2_CID_STATELESS_AV1_FILM_GRAIN:			return "AV1 Film Grain";
1239 
1240 	/* Colorimetry controls */
1241 	/* Keep the order of the 'case's the same as in v4l2-controls.h! */
1242 	case V4L2_CID_COLORIMETRY_CLASS:	return "Colorimetry Controls";
1243 	case V4L2_CID_COLORIMETRY_HDR10_CLL_INFO:		return "HDR10 Content Light Info";
1244 	case V4L2_CID_COLORIMETRY_HDR10_MASTERING_DISPLAY:	return "HDR10 Mastering Display";
1245 	default:
1246 		return NULL;
1247 	}
1248 }
1249 EXPORT_SYMBOL(v4l2_ctrl_get_name);
1250 
v4l2_ctrl_fill(u32 id,const char ** name,enum v4l2_ctrl_type * type,s64 * min,s64 * max,u64 * step,s64 * def,u32 * flags)1251 void v4l2_ctrl_fill(u32 id, const char **name, enum v4l2_ctrl_type *type,
1252 		    s64 *min, s64 *max, u64 *step, s64 *def, u32 *flags)
1253 {
1254 	*name = v4l2_ctrl_get_name(id);
1255 	*flags = 0;
1256 
1257 	switch (id) {
1258 	case V4L2_CID_AUDIO_MUTE:
1259 	case V4L2_CID_AUDIO_LOUDNESS:
1260 	case V4L2_CID_AUTO_WHITE_BALANCE:
1261 	case V4L2_CID_AUTOGAIN:
1262 	case V4L2_CID_HFLIP:
1263 	case V4L2_CID_VFLIP:
1264 	case V4L2_CID_HUE_AUTO:
1265 	case V4L2_CID_CHROMA_AGC:
1266 	case V4L2_CID_COLOR_KILLER:
1267 	case V4L2_CID_AUTOBRIGHTNESS:
1268 	case V4L2_CID_MPEG_AUDIO_MUTE:
1269 	case V4L2_CID_MPEG_VIDEO_MUTE:
1270 	case V4L2_CID_MPEG_VIDEO_GOP_CLOSURE:
1271 	case V4L2_CID_MPEG_VIDEO_PULLDOWN:
1272 	case V4L2_CID_EXPOSURE_AUTO_PRIORITY:
1273 	case V4L2_CID_FOCUS_AUTO:
1274 	case V4L2_CID_PRIVACY:
1275 	case V4L2_CID_AUDIO_LIMITER_ENABLED:
1276 	case V4L2_CID_AUDIO_COMPRESSION_ENABLED:
1277 	case V4L2_CID_PILOT_TONE_ENABLED:
1278 	case V4L2_CID_ILLUMINATORS_1:
1279 	case V4L2_CID_ILLUMINATORS_2:
1280 	case V4L2_CID_FLASH_STROBE_STATUS:
1281 	case V4L2_CID_FLASH_CHARGE:
1282 	case V4L2_CID_FLASH_READY:
1283 	case V4L2_CID_MPEG_VIDEO_DECODER_MPEG4_DEBLOCK_FILTER:
1284 	case V4L2_CID_MPEG_VIDEO_DECODER_SLICE_INTERFACE:
1285 	case V4L2_CID_MPEG_VIDEO_DEC_DISPLAY_DELAY_ENABLE:
1286 	case V4L2_CID_MPEG_VIDEO_FRAME_RC_ENABLE:
1287 	case V4L2_CID_MPEG_VIDEO_MB_RC_ENABLE:
1288 	case V4L2_CID_MPEG_VIDEO_H264_8X8_TRANSFORM:
1289 	case V4L2_CID_MPEG_VIDEO_H264_VUI_SAR_ENABLE:
1290 	case V4L2_CID_MPEG_VIDEO_MPEG4_QPEL:
1291 	case V4L2_CID_MPEG_VIDEO_REPEAT_SEQ_HEADER:
1292 	case V4L2_CID_MPEG_VIDEO_AU_DELIMITER:
1293 	case V4L2_CID_WIDE_DYNAMIC_RANGE:
1294 	case V4L2_CID_IMAGE_STABILIZATION:
1295 	case V4L2_CID_RDS_RECEPTION:
1296 	case V4L2_CID_RF_TUNER_LNA_GAIN_AUTO:
1297 	case V4L2_CID_RF_TUNER_MIXER_GAIN_AUTO:
1298 	case V4L2_CID_RF_TUNER_IF_GAIN_AUTO:
1299 	case V4L2_CID_RF_TUNER_BANDWIDTH_AUTO:
1300 	case V4L2_CID_RF_TUNER_PLL_LOCK:
1301 	case V4L2_CID_RDS_TX_MONO_STEREO:
1302 	case V4L2_CID_RDS_TX_ARTIFICIAL_HEAD:
1303 	case V4L2_CID_RDS_TX_COMPRESSED:
1304 	case V4L2_CID_RDS_TX_DYNAMIC_PTY:
1305 	case V4L2_CID_RDS_TX_TRAFFIC_ANNOUNCEMENT:
1306 	case V4L2_CID_RDS_TX_TRAFFIC_PROGRAM:
1307 	case V4L2_CID_RDS_TX_MUSIC_SPEECH:
1308 	case V4L2_CID_RDS_TX_ALT_FREQS_ENABLE:
1309 	case V4L2_CID_RDS_RX_TRAFFIC_ANNOUNCEMENT:
1310 	case V4L2_CID_RDS_RX_TRAFFIC_PROGRAM:
1311 	case V4L2_CID_RDS_RX_MUSIC_SPEECH:
1312 		*type = V4L2_CTRL_TYPE_BOOLEAN;
1313 		*min = 0;
1314 		*max = *step = 1;
1315 		break;
1316 	case V4L2_CID_ROTATE:
1317 		*type = V4L2_CTRL_TYPE_INTEGER;
1318 		*flags |= V4L2_CTRL_FLAG_MODIFY_LAYOUT;
1319 		break;
1320 	case V4L2_CID_MPEG_VIDEO_MV_H_SEARCH_RANGE:
1321 	case V4L2_CID_MPEG_VIDEO_MV_V_SEARCH_RANGE:
1322 	case V4L2_CID_MPEG_VIDEO_DEC_DISPLAY_DELAY:
1323 	case V4L2_CID_MPEG_VIDEO_INTRA_REFRESH_PERIOD:
1324 		*type = V4L2_CTRL_TYPE_INTEGER;
1325 		break;
1326 	case V4L2_CID_MPEG_VIDEO_LTR_COUNT:
1327 		*type = V4L2_CTRL_TYPE_INTEGER;
1328 		break;
1329 	case V4L2_CID_MPEG_VIDEO_FRAME_LTR_INDEX:
1330 		*type = V4L2_CTRL_TYPE_INTEGER;
1331 		*flags |= V4L2_CTRL_FLAG_EXECUTE_ON_WRITE;
1332 		break;
1333 	case V4L2_CID_MPEG_VIDEO_USE_LTR_FRAMES:
1334 		*type = V4L2_CTRL_TYPE_BITMASK;
1335 		*flags |= V4L2_CTRL_FLAG_EXECUTE_ON_WRITE;
1336 		break;
1337 	case V4L2_CID_MPEG_VIDEO_FORCE_KEY_FRAME:
1338 	case V4L2_CID_PAN_RESET:
1339 	case V4L2_CID_TILT_RESET:
1340 	case V4L2_CID_FLASH_STROBE:
1341 	case V4L2_CID_FLASH_STROBE_STOP:
1342 	case V4L2_CID_AUTO_FOCUS_START:
1343 	case V4L2_CID_AUTO_FOCUS_STOP:
1344 	case V4L2_CID_DO_WHITE_BALANCE:
1345 		*type = V4L2_CTRL_TYPE_BUTTON;
1346 		*flags |= V4L2_CTRL_FLAG_WRITE_ONLY |
1347 			  V4L2_CTRL_FLAG_EXECUTE_ON_WRITE;
1348 		*min = *max = *step = *def = 0;
1349 		break;
1350 	case V4L2_CID_POWER_LINE_FREQUENCY:
1351 	case V4L2_CID_MPEG_AUDIO_SAMPLING_FREQ:
1352 	case V4L2_CID_MPEG_AUDIO_ENCODING:
1353 	case V4L2_CID_MPEG_AUDIO_L1_BITRATE:
1354 	case V4L2_CID_MPEG_AUDIO_L2_BITRATE:
1355 	case V4L2_CID_MPEG_AUDIO_L3_BITRATE:
1356 	case V4L2_CID_MPEG_AUDIO_AC3_BITRATE:
1357 	case V4L2_CID_MPEG_AUDIO_MODE:
1358 	case V4L2_CID_MPEG_AUDIO_MODE_EXTENSION:
1359 	case V4L2_CID_MPEG_AUDIO_EMPHASIS:
1360 	case V4L2_CID_MPEG_AUDIO_CRC:
1361 	case V4L2_CID_MPEG_AUDIO_DEC_PLAYBACK:
1362 	case V4L2_CID_MPEG_AUDIO_DEC_MULTILINGUAL_PLAYBACK:
1363 	case V4L2_CID_MPEG_VIDEO_ENCODING:
1364 	case V4L2_CID_MPEG_VIDEO_ASPECT:
1365 	case V4L2_CID_MPEG_VIDEO_BITRATE_MODE:
1366 	case V4L2_CID_MPEG_STREAM_TYPE:
1367 	case V4L2_CID_MPEG_STREAM_VBI_FMT:
1368 	case V4L2_CID_EXPOSURE_AUTO:
1369 	case V4L2_CID_AUTO_FOCUS_RANGE:
1370 	case V4L2_CID_COLORFX:
1371 	case V4L2_CID_AUTO_N_PRESET_WHITE_BALANCE:
1372 	case V4L2_CID_TUNE_PREEMPHASIS:
1373 	case V4L2_CID_FLASH_LED_MODE:
1374 	case V4L2_CID_FLASH_STROBE_SOURCE:
1375 	case V4L2_CID_MPEG_VIDEO_HEADER_MODE:
1376 	case V4L2_CID_MPEG_VIDEO_FRAME_SKIP_MODE:
1377 	case V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MODE:
1378 	case V4L2_CID_MPEG_VIDEO_H264_ENTROPY_MODE:
1379 	case V4L2_CID_MPEG_VIDEO_H264_LEVEL:
1380 	case V4L2_CID_MPEG_VIDEO_H264_LOOP_FILTER_MODE:
1381 	case V4L2_CID_MPEG_VIDEO_H264_PROFILE:
1382 	case V4L2_CID_MPEG_VIDEO_H264_VUI_SAR_IDC:
1383 	case V4L2_CID_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE:
1384 	case V4L2_CID_MPEG_VIDEO_H264_FMO_MAP_TYPE:
1385 	case V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING_TYPE:
1386 	case V4L2_CID_MPEG_VIDEO_MPEG2_LEVEL:
1387 	case V4L2_CID_MPEG_VIDEO_MPEG2_PROFILE:
1388 	case V4L2_CID_MPEG_VIDEO_MPEG4_LEVEL:
1389 	case V4L2_CID_MPEG_VIDEO_MPEG4_PROFILE:
1390 	case V4L2_CID_JPEG_CHROMA_SUBSAMPLING:
1391 	case V4L2_CID_ISO_SENSITIVITY_AUTO:
1392 	case V4L2_CID_EXPOSURE_METERING:
1393 	case V4L2_CID_SCENE_MODE:
1394 	case V4L2_CID_DV_TX_MODE:
1395 	case V4L2_CID_DV_TX_RGB_RANGE:
1396 	case V4L2_CID_DV_TX_IT_CONTENT_TYPE:
1397 	case V4L2_CID_DV_RX_RGB_RANGE:
1398 	case V4L2_CID_DV_RX_IT_CONTENT_TYPE:
1399 	case V4L2_CID_TEST_PATTERN:
1400 	case V4L2_CID_DEINTERLACING_MODE:
1401 	case V4L2_CID_TUNE_DEEMPHASIS:
1402 	case V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_SEL:
1403 	case V4L2_CID_MPEG_VIDEO_VP8_PROFILE:
1404 	case V4L2_CID_MPEG_VIDEO_VP9_PROFILE:
1405 	case V4L2_CID_MPEG_VIDEO_VP9_LEVEL:
1406 	case V4L2_CID_DETECT_MD_MODE:
1407 	case V4L2_CID_MPEG_VIDEO_HEVC_PROFILE:
1408 	case V4L2_CID_MPEG_VIDEO_HEVC_LEVEL:
1409 	case V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_TYPE:
1410 	case V4L2_CID_MPEG_VIDEO_HEVC_REFRESH_TYPE:
1411 	case V4L2_CID_MPEG_VIDEO_HEVC_SIZE_OF_LENGTH_FIELD:
1412 	case V4L2_CID_MPEG_VIDEO_HEVC_TIER:
1413 	case V4L2_CID_MPEG_VIDEO_HEVC_LOOP_FILTER_MODE:
1414 	case V4L2_CID_MPEG_VIDEO_AV1_PROFILE:
1415 	case V4L2_CID_MPEG_VIDEO_AV1_LEVEL:
1416 	case V4L2_CID_STATELESS_HEVC_DECODE_MODE:
1417 	case V4L2_CID_STATELESS_HEVC_START_CODE:
1418 	case V4L2_CID_STATELESS_H264_DECODE_MODE:
1419 	case V4L2_CID_STATELESS_H264_START_CODE:
1420 	case V4L2_CID_CAMERA_ORIENTATION:
1421 	case V4L2_CID_MPEG_VIDEO_INTRA_REFRESH_PERIOD_TYPE:
1422 	case V4L2_CID_HDR_SENSOR_MODE:
1423 		*type = V4L2_CTRL_TYPE_MENU;
1424 		break;
1425 	case V4L2_CID_LINK_FREQ:
1426 		*type = V4L2_CTRL_TYPE_INTEGER_MENU;
1427 		break;
1428 	case V4L2_CID_RDS_TX_PS_NAME:
1429 	case V4L2_CID_RDS_TX_RADIO_TEXT:
1430 	case V4L2_CID_RDS_RX_PS_NAME:
1431 	case V4L2_CID_RDS_RX_RADIO_TEXT:
1432 		*type = V4L2_CTRL_TYPE_STRING;
1433 		break;
1434 	case V4L2_CID_ISO_SENSITIVITY:
1435 	case V4L2_CID_AUTO_EXPOSURE_BIAS:
1436 	case V4L2_CID_MPEG_VIDEO_VPX_NUM_PARTITIONS:
1437 	case V4L2_CID_MPEG_VIDEO_VPX_NUM_REF_FRAMES:
1438 		*type = V4L2_CTRL_TYPE_INTEGER_MENU;
1439 		break;
1440 	case V4L2_CID_USER_CLASS:
1441 	case V4L2_CID_CAMERA_CLASS:
1442 	case V4L2_CID_CODEC_CLASS:
1443 	case V4L2_CID_FM_TX_CLASS:
1444 	case V4L2_CID_FLASH_CLASS:
1445 	case V4L2_CID_JPEG_CLASS:
1446 	case V4L2_CID_IMAGE_SOURCE_CLASS:
1447 	case V4L2_CID_IMAGE_PROC_CLASS:
1448 	case V4L2_CID_DV_CLASS:
1449 	case V4L2_CID_FM_RX_CLASS:
1450 	case V4L2_CID_RF_TUNER_CLASS:
1451 	case V4L2_CID_DETECT_CLASS:
1452 	case V4L2_CID_CODEC_STATELESS_CLASS:
1453 	case V4L2_CID_COLORIMETRY_CLASS:
1454 		*type = V4L2_CTRL_TYPE_CTRL_CLASS;
1455 		/* You can neither read nor write these */
1456 		*flags |= V4L2_CTRL_FLAG_READ_ONLY | V4L2_CTRL_FLAG_WRITE_ONLY;
1457 		*min = *max = *step = *def = 0;
1458 		break;
1459 	case V4L2_CID_BG_COLOR:
1460 	case V4L2_CID_COLORFX_RGB:
1461 		*type = V4L2_CTRL_TYPE_INTEGER;
1462 		*step = 1;
1463 		*min = 0;
1464 		/* Max is calculated as RGB888 that is 2^24 - 1 */
1465 		*max = 0xffffff;
1466 		break;
1467 	case V4L2_CID_COLORFX_CBCR:
1468 		*type = V4L2_CTRL_TYPE_INTEGER;
1469 		*step = 1;
1470 		*min = 0;
1471 		*max = 0xffff;
1472 		break;
1473 	case V4L2_CID_FLASH_FAULT:
1474 	case V4L2_CID_JPEG_ACTIVE_MARKER:
1475 	case V4L2_CID_3A_LOCK:
1476 	case V4L2_CID_AUTO_FOCUS_STATUS:
1477 	case V4L2_CID_DV_TX_HOTPLUG:
1478 	case V4L2_CID_DV_TX_RXSENSE:
1479 	case V4L2_CID_DV_TX_EDID_PRESENT:
1480 	case V4L2_CID_DV_RX_POWER_PRESENT:
1481 		*type = V4L2_CTRL_TYPE_BITMASK;
1482 		break;
1483 	case V4L2_CID_MIN_BUFFERS_FOR_CAPTURE:
1484 	case V4L2_CID_MIN_BUFFERS_FOR_OUTPUT:
1485 		*type = V4L2_CTRL_TYPE_INTEGER;
1486 		*flags |= V4L2_CTRL_FLAG_READ_ONLY;
1487 		break;
1488 	case V4L2_CID_MPEG_VIDEO_DEC_PTS:
1489 		*type = V4L2_CTRL_TYPE_INTEGER64;
1490 		*flags |= V4L2_CTRL_FLAG_VOLATILE | V4L2_CTRL_FLAG_READ_ONLY;
1491 		*min = *def = 0;
1492 		*max = 0x1ffffffffLL;
1493 		*step = 1;
1494 		break;
1495 	case V4L2_CID_MPEG_VIDEO_DEC_FRAME:
1496 		*type = V4L2_CTRL_TYPE_INTEGER64;
1497 		*flags |= V4L2_CTRL_FLAG_VOLATILE | V4L2_CTRL_FLAG_READ_ONLY;
1498 		*min = *def = 0;
1499 		*max = 0x7fffffffffffffffLL;
1500 		*step = 1;
1501 		break;
1502 	case V4L2_CID_MPEG_VIDEO_DEC_CONCEAL_COLOR:
1503 		*type = V4L2_CTRL_TYPE_INTEGER64;
1504 		*min = 0;
1505 		/* default for 8 bit black, luma is 16, chroma is 128 */
1506 		*def = 0x8000800010LL;
1507 		*max = 0xffffffffffffLL;
1508 		*step = 1;
1509 		break;
1510 	case V4L2_CID_PIXEL_RATE:
1511 		*type = V4L2_CTRL_TYPE_INTEGER64;
1512 		*flags |= V4L2_CTRL_FLAG_READ_ONLY;
1513 		break;
1514 	case V4L2_CID_DETECT_MD_REGION_GRID:
1515 		*type = V4L2_CTRL_TYPE_U8;
1516 		break;
1517 	case V4L2_CID_DETECT_MD_THRESHOLD_GRID:
1518 		*type = V4L2_CTRL_TYPE_U16;
1519 		break;
1520 	case V4L2_CID_RDS_TX_ALT_FREQS:
1521 		*type = V4L2_CTRL_TYPE_U32;
1522 		break;
1523 	case V4L2_CID_STATELESS_MPEG2_SEQUENCE:
1524 		*type = V4L2_CTRL_TYPE_MPEG2_SEQUENCE;
1525 		break;
1526 	case V4L2_CID_STATELESS_MPEG2_PICTURE:
1527 		*type = V4L2_CTRL_TYPE_MPEG2_PICTURE;
1528 		break;
1529 	case V4L2_CID_STATELESS_MPEG2_QUANTISATION:
1530 		*type = V4L2_CTRL_TYPE_MPEG2_QUANTISATION;
1531 		break;
1532 	case V4L2_CID_STATELESS_FWHT_PARAMS:
1533 		*type = V4L2_CTRL_TYPE_FWHT_PARAMS;
1534 		break;
1535 	case V4L2_CID_STATELESS_H264_SPS:
1536 		*type = V4L2_CTRL_TYPE_H264_SPS;
1537 		break;
1538 	case V4L2_CID_STATELESS_H264_PPS:
1539 		*type = V4L2_CTRL_TYPE_H264_PPS;
1540 		break;
1541 	case V4L2_CID_STATELESS_H264_SCALING_MATRIX:
1542 		*type = V4L2_CTRL_TYPE_H264_SCALING_MATRIX;
1543 		break;
1544 	case V4L2_CID_STATELESS_H264_SLICE_PARAMS:
1545 		*type = V4L2_CTRL_TYPE_H264_SLICE_PARAMS;
1546 		break;
1547 	case V4L2_CID_STATELESS_H264_DECODE_PARAMS:
1548 		*type = V4L2_CTRL_TYPE_H264_DECODE_PARAMS;
1549 		break;
1550 	case V4L2_CID_STATELESS_H264_PRED_WEIGHTS:
1551 		*type = V4L2_CTRL_TYPE_H264_PRED_WEIGHTS;
1552 		break;
1553 	case V4L2_CID_STATELESS_VP8_FRAME:
1554 		*type = V4L2_CTRL_TYPE_VP8_FRAME;
1555 		break;
1556 	case V4L2_CID_STATELESS_HEVC_SPS:
1557 		*type = V4L2_CTRL_TYPE_HEVC_SPS;
1558 		break;
1559 	case V4L2_CID_STATELESS_HEVC_PPS:
1560 		*type = V4L2_CTRL_TYPE_HEVC_PPS;
1561 		break;
1562 	case V4L2_CID_STATELESS_HEVC_SLICE_PARAMS:
1563 		*type = V4L2_CTRL_TYPE_HEVC_SLICE_PARAMS;
1564 		*flags |= V4L2_CTRL_FLAG_DYNAMIC_ARRAY;
1565 		break;
1566 	case V4L2_CID_STATELESS_HEVC_SCALING_MATRIX:
1567 		*type = V4L2_CTRL_TYPE_HEVC_SCALING_MATRIX;
1568 		break;
1569 	case V4L2_CID_STATELESS_HEVC_DECODE_PARAMS:
1570 		*type = V4L2_CTRL_TYPE_HEVC_DECODE_PARAMS;
1571 		break;
1572 	case V4L2_CID_STATELESS_HEVC_ENTRY_POINT_OFFSETS:
1573 		*type = V4L2_CTRL_TYPE_U32;
1574 		*flags |= V4L2_CTRL_FLAG_DYNAMIC_ARRAY;
1575 		break;
1576 	case V4L2_CID_STATELESS_VP9_COMPRESSED_HDR:
1577 		*type = V4L2_CTRL_TYPE_VP9_COMPRESSED_HDR;
1578 		break;
1579 	case V4L2_CID_STATELESS_VP9_FRAME:
1580 		*type = V4L2_CTRL_TYPE_VP9_FRAME;
1581 		break;
1582 	case V4L2_CID_STATELESS_AV1_SEQUENCE:
1583 		*type = V4L2_CTRL_TYPE_AV1_SEQUENCE;
1584 		break;
1585 	case V4L2_CID_STATELESS_AV1_TILE_GROUP_ENTRY:
1586 		*type = V4L2_CTRL_TYPE_AV1_TILE_GROUP_ENTRY;
1587 		*flags |= V4L2_CTRL_FLAG_DYNAMIC_ARRAY;
1588 		break;
1589 	case V4L2_CID_STATELESS_AV1_FRAME:
1590 		*type = V4L2_CTRL_TYPE_AV1_FRAME;
1591 		break;
1592 	case V4L2_CID_STATELESS_AV1_FILM_GRAIN:
1593 		*type = V4L2_CTRL_TYPE_AV1_FILM_GRAIN;
1594 		break;
1595 	case V4L2_CID_UNIT_CELL_SIZE:
1596 		*type = V4L2_CTRL_TYPE_AREA;
1597 		*flags |= V4L2_CTRL_FLAG_READ_ONLY;
1598 		break;
1599 	case V4L2_CID_COLORIMETRY_HDR10_CLL_INFO:
1600 		*type = V4L2_CTRL_TYPE_HDR10_CLL_INFO;
1601 		break;
1602 	case V4L2_CID_COLORIMETRY_HDR10_MASTERING_DISPLAY:
1603 		*type = V4L2_CTRL_TYPE_HDR10_MASTERING_DISPLAY;
1604 		break;
1605 	default:
1606 		*type = V4L2_CTRL_TYPE_INTEGER;
1607 		break;
1608 	}
1609 	switch (id) {
1610 	case V4L2_CID_MPEG_AUDIO_ENCODING:
1611 	case V4L2_CID_MPEG_AUDIO_MODE:
1612 	case V4L2_CID_MPEG_VIDEO_BITRATE_MODE:
1613 	case V4L2_CID_MPEG_VIDEO_B_FRAMES:
1614 	case V4L2_CID_MPEG_STREAM_TYPE:
1615 		*flags |= V4L2_CTRL_FLAG_UPDATE;
1616 		break;
1617 	case V4L2_CID_AUDIO_VOLUME:
1618 	case V4L2_CID_AUDIO_BALANCE:
1619 	case V4L2_CID_AUDIO_BASS:
1620 	case V4L2_CID_AUDIO_TREBLE:
1621 	case V4L2_CID_BRIGHTNESS:
1622 	case V4L2_CID_CONTRAST:
1623 	case V4L2_CID_SATURATION:
1624 	case V4L2_CID_HUE:
1625 	case V4L2_CID_RED_BALANCE:
1626 	case V4L2_CID_BLUE_BALANCE:
1627 	case V4L2_CID_GAMMA:
1628 	case V4L2_CID_SHARPNESS:
1629 	case V4L2_CID_CHROMA_GAIN:
1630 	case V4L2_CID_RDS_TX_DEVIATION:
1631 	case V4L2_CID_AUDIO_LIMITER_RELEASE_TIME:
1632 	case V4L2_CID_AUDIO_LIMITER_DEVIATION:
1633 	case V4L2_CID_AUDIO_COMPRESSION_GAIN:
1634 	case V4L2_CID_AUDIO_COMPRESSION_THRESHOLD:
1635 	case V4L2_CID_AUDIO_COMPRESSION_ATTACK_TIME:
1636 	case V4L2_CID_AUDIO_COMPRESSION_RELEASE_TIME:
1637 	case V4L2_CID_PILOT_TONE_DEVIATION:
1638 	case V4L2_CID_PILOT_TONE_FREQUENCY:
1639 	case V4L2_CID_TUNE_POWER_LEVEL:
1640 	case V4L2_CID_TUNE_ANTENNA_CAPACITOR:
1641 	case V4L2_CID_RF_TUNER_RF_GAIN:
1642 	case V4L2_CID_RF_TUNER_LNA_GAIN:
1643 	case V4L2_CID_RF_TUNER_MIXER_GAIN:
1644 	case V4L2_CID_RF_TUNER_IF_GAIN:
1645 	case V4L2_CID_RF_TUNER_BANDWIDTH:
1646 	case V4L2_CID_DETECT_MD_GLOBAL_THRESHOLD:
1647 		*flags |= V4L2_CTRL_FLAG_SLIDER;
1648 		break;
1649 	case V4L2_CID_PAN_RELATIVE:
1650 	case V4L2_CID_TILT_RELATIVE:
1651 	case V4L2_CID_FOCUS_RELATIVE:
1652 	case V4L2_CID_IRIS_RELATIVE:
1653 	case V4L2_CID_ZOOM_RELATIVE:
1654 		*flags |= V4L2_CTRL_FLAG_WRITE_ONLY |
1655 			  V4L2_CTRL_FLAG_EXECUTE_ON_WRITE;
1656 		break;
1657 	case V4L2_CID_FLASH_STROBE_STATUS:
1658 	case V4L2_CID_AUTO_FOCUS_STATUS:
1659 	case V4L2_CID_FLASH_READY:
1660 	case V4L2_CID_DV_TX_HOTPLUG:
1661 	case V4L2_CID_DV_TX_RXSENSE:
1662 	case V4L2_CID_DV_TX_EDID_PRESENT:
1663 	case V4L2_CID_DV_RX_POWER_PRESENT:
1664 	case V4L2_CID_DV_RX_IT_CONTENT_TYPE:
1665 	case V4L2_CID_RDS_RX_PTY:
1666 	case V4L2_CID_RDS_RX_PS_NAME:
1667 	case V4L2_CID_RDS_RX_RADIO_TEXT:
1668 	case V4L2_CID_RDS_RX_TRAFFIC_ANNOUNCEMENT:
1669 	case V4L2_CID_RDS_RX_TRAFFIC_PROGRAM:
1670 	case V4L2_CID_RDS_RX_MUSIC_SPEECH:
1671 	case V4L2_CID_CAMERA_ORIENTATION:
1672 	case V4L2_CID_CAMERA_SENSOR_ROTATION:
1673 		*flags |= V4L2_CTRL_FLAG_READ_ONLY;
1674 		break;
1675 	case V4L2_CID_RF_TUNER_PLL_LOCK:
1676 		*flags |= V4L2_CTRL_FLAG_VOLATILE;
1677 		break;
1678 	}
1679 }
1680 EXPORT_SYMBOL(v4l2_ctrl_fill);
1681