diff options
author | Laurent Pinchart <laurent.pinchart@skynet.be> | 2008-12-14 14:24:04 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-12-30 06:39:10 -0500 |
commit | 74980159e75e3a6913d23d1508da57d018fe7436 (patch) | |
tree | 973a0e8756ea3997cebc053e016f1f8f1c822236 /drivers/media/video/v4l2-common.c | |
parent | 046425f8c4ac431db00c09a6d9fba16560b8e5b9 (diff) |
V4L/DVB (9899): v4l2: Add missing control names
Update v4l2_ctrl_get_name() and v4l2_ctrl_get_menu() with missing
control names and menu values.
Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/v4l2-common.c')
-rw-r--r-- | drivers/media/video/v4l2-common.c | 88 |
1 files changed, 77 insertions, 11 deletions
diff --git a/drivers/media/video/v4l2-common.c b/drivers/media/video/v4l2-common.c index 26f3254337da..c676b0b0f708 100644 --- a/drivers/media/video/v4l2-common.c +++ b/drivers/media/video/v4l2-common.c | |||
@@ -321,6 +321,19 @@ const char **v4l2_ctrl_get_menu(u32 id) | |||
321 | "Private packet, IVTV format", | 321 | "Private packet, IVTV format", |
322 | NULL | 322 | NULL |
323 | }; | 323 | }; |
324 | static const char *camera_power_line_frequency[] = { | ||
325 | "Disabled", | ||
326 | "50 Hz", | ||
327 | "60 Hz", | ||
328 | NULL | ||
329 | }; | ||
330 | static const char *camera_exposure_auto[] = { | ||
331 | "Auto Mode", | ||
332 | "Manual Mode", | ||
333 | "Shutter Priority Mode", | ||
334 | "Aperture Priority Mode", | ||
335 | NULL | ||
336 | }; | ||
324 | 337 | ||
325 | switch (id) { | 338 | switch (id) { |
326 | case V4L2_CID_MPEG_AUDIO_SAMPLING_FREQ: | 339 | case V4L2_CID_MPEG_AUDIO_SAMPLING_FREQ: |
@@ -353,6 +366,10 @@ const char **v4l2_ctrl_get_menu(u32 id) | |||
353 | return mpeg_stream_type; | 366 | return mpeg_stream_type; |
354 | case V4L2_CID_MPEG_STREAM_VBI_FMT: | 367 | case V4L2_CID_MPEG_STREAM_VBI_FMT: |
355 | return mpeg_stream_vbi_fmt; | 368 | return mpeg_stream_vbi_fmt; |
369 | case V4L2_CID_POWER_LINE_FREQUENCY: | ||
370 | return camera_power_line_frequency; | ||
371 | case V4L2_CID_EXPOSURE_AUTO: | ||
372 | return camera_exposure_auto; | ||
356 | default: | 373 | default: |
357 | return NULL; | 374 | return NULL; |
358 | } | 375 | } |
@@ -364,17 +381,37 @@ const char *v4l2_ctrl_get_name(u32 id) | |||
364 | { | 381 | { |
365 | switch (id) { | 382 | switch (id) { |
366 | /* USER controls */ | 383 | /* USER controls */ |
367 | case V4L2_CID_USER_CLASS: return "User Controls"; | 384 | case V4L2_CID_USER_CLASS: return "User Controls"; |
368 | case V4L2_CID_AUDIO_VOLUME: return "Volume"; | 385 | case V4L2_CID_AUDIO_VOLUME: return "Volume"; |
369 | case V4L2_CID_AUDIO_MUTE: return "Mute"; | 386 | case V4L2_CID_AUDIO_MUTE: return "Mute"; |
370 | case V4L2_CID_AUDIO_BALANCE: return "Balance"; | 387 | case V4L2_CID_AUDIO_BALANCE: return "Balance"; |
371 | case V4L2_CID_AUDIO_BASS: return "Bass"; | 388 | case V4L2_CID_AUDIO_BASS: return "Bass"; |
372 | case V4L2_CID_AUDIO_TREBLE: return "Treble"; | 389 | case V4L2_CID_AUDIO_TREBLE: return "Treble"; |
373 | case V4L2_CID_AUDIO_LOUDNESS: return "Loudness"; | 390 | case V4L2_CID_AUDIO_LOUDNESS: return "Loudness"; |
374 | case V4L2_CID_BRIGHTNESS: return "Brightness"; | 391 | case V4L2_CID_BRIGHTNESS: return "Brightness"; |
375 | case V4L2_CID_CONTRAST: return "Contrast"; | 392 | case V4L2_CID_CONTRAST: return "Contrast"; |
376 | case V4L2_CID_SATURATION: return "Saturation"; | 393 | case V4L2_CID_SATURATION: return "Saturation"; |
377 | case V4L2_CID_HUE: return "Hue"; | 394 | case V4L2_CID_HUE: return "Hue"; |
395 | case V4L2_CID_BLACK_LEVEL: return "Black Level"; | ||
396 | case V4L2_CID_AUTO_WHITE_BALANCE: return "White Balance, Automatic"; | ||
397 | case V4L2_CID_DO_WHITE_BALANCE: return "Do White Balance"; | ||
398 | case V4L2_CID_RED_BALANCE: return "Red Balance"; | ||
399 | case V4L2_CID_BLUE_BALANCE: return "Blue Balance"; | ||
400 | case V4L2_CID_GAMMA: return "Gamma"; | ||
401 | case V4L2_CID_EXPOSURE: return "Exposure"; | ||
402 | case V4L2_CID_AUTOGAIN: return "Gain, Automatic"; | ||
403 | case V4L2_CID_GAIN: return "Gain"; | ||
404 | case V4L2_CID_HFLIP: return "Horizontal Flip"; | ||
405 | case V4L2_CID_VFLIP: return "Vertical Flip"; | ||
406 | case V4L2_CID_HCENTER: return "Horizontal Center"; | ||
407 | case V4L2_CID_VCENTER: return "Vertical Center"; | ||
408 | case V4L2_CID_POWER_LINE_FREQUENCY: return "Power Line Frequency"; | ||
409 | case V4L2_CID_HUE_AUTO: return "Hue, Automatic"; | ||
410 | case V4L2_CID_WHITE_BALANCE_TEMPERATURE: return "White Balance Temperature"; | ||
411 | case V4L2_CID_SHARPNESS: return "Sharpness"; | ||
412 | case V4L2_CID_BACKLIGHT_COMPENSATION: return "Backlight Compensation"; | ||
413 | case V4L2_CID_CHROMA_AGC: return "Chroma AGC"; | ||
414 | case V4L2_CID_COLOR_KILLER: return "Color Killer"; | ||
378 | 415 | ||
379 | /* MPEG controls */ | 416 | /* MPEG controls */ |
380 | case V4L2_CID_MPEG_CLASS: return "MPEG Encoder Controls"; | 417 | case V4L2_CID_MPEG_CLASS: return "MPEG Encoder Controls"; |
@@ -411,6 +448,25 @@ const char *v4l2_ctrl_get_name(u32 id) | |||
411 | case V4L2_CID_MPEG_STREAM_PES_ID_VIDEO: return "Stream PES Video ID"; | 448 | case V4L2_CID_MPEG_STREAM_PES_ID_VIDEO: return "Stream PES Video ID"; |
412 | case V4L2_CID_MPEG_STREAM_VBI_FMT: return "Stream VBI Format"; | 449 | case V4L2_CID_MPEG_STREAM_VBI_FMT: return "Stream VBI Format"; |
413 | 450 | ||
451 | /* CAMERA controls */ | ||
452 | case V4L2_CID_CAMERA_CLASS: return "Camera Controls"; | ||
453 | case V4L2_CID_EXPOSURE_AUTO: return "Auto Exposure"; | ||
454 | case V4L2_CID_EXPOSURE_ABSOLUTE: return "Exposure Time, Absolute"; | ||
455 | case V4L2_CID_EXPOSURE_AUTO_PRIORITY: return "Exposure, Dynamic Framerate"; | ||
456 | case V4L2_CID_PAN_RELATIVE: return "Pan, Relative"; | ||
457 | case V4L2_CID_TILT_RELATIVE: return "Tilt, Relative"; | ||
458 | case V4L2_CID_PAN_RESET: return "Pan, Reset"; | ||
459 | case V4L2_CID_TILT_RESET: return "Tilt, Reset"; | ||
460 | case V4L2_CID_PAN_ABSOLUTE: return "Pan, Absolute"; | ||
461 | case V4L2_CID_TILT_ABSOLUTE: return "Tilt, Absolute"; | ||
462 | case V4L2_CID_FOCUS_ABSOLUTE: return "Focus, Absolute"; | ||
463 | case V4L2_CID_FOCUS_RELATIVE: return "Focus, Relative"; | ||
464 | case V4L2_CID_FOCUS_AUTO: return "Focus, Automatic"; | ||
465 | case V4L2_CID_ZOOM_ABSOLUTE: return "Zoom, Absolute"; | ||
466 | case V4L2_CID_ZOOM_RELATIVE: return "Zoom, Relative"; | ||
467 | case V4L2_CID_ZOOM_CONTINUOUS: return "Zoom, Continuous"; | ||
468 | case V4L2_CID_PRIVACY: return "Privacy"; | ||
469 | |||
414 | default: | 470 | default: |
415 | return NULL; | 471 | return NULL; |
416 | } | 472 | } |
@@ -429,14 +485,22 @@ int v4l2_ctrl_query_fill(struct v4l2_queryctrl *qctrl, s32 min, s32 max, s32 ste | |||
429 | switch (qctrl->id) { | 485 | switch (qctrl->id) { |
430 | case V4L2_CID_AUDIO_MUTE: | 486 | case V4L2_CID_AUDIO_MUTE: |
431 | case V4L2_CID_AUDIO_LOUDNESS: | 487 | case V4L2_CID_AUDIO_LOUDNESS: |
488 | case V4L2_CID_AUTO_WHITE_BALANCE: | ||
489 | case V4L2_CID_AUTOGAIN: | ||
490 | case V4L2_CID_HFLIP: | ||
491 | case V4L2_CID_VFLIP: | ||
492 | case V4L2_CID_HUE_AUTO: | ||
432 | case V4L2_CID_MPEG_AUDIO_MUTE: | 493 | case V4L2_CID_MPEG_AUDIO_MUTE: |
433 | case V4L2_CID_MPEG_VIDEO_MUTE: | 494 | case V4L2_CID_MPEG_VIDEO_MUTE: |
434 | case V4L2_CID_MPEG_VIDEO_GOP_CLOSURE: | 495 | case V4L2_CID_MPEG_VIDEO_GOP_CLOSURE: |
435 | case V4L2_CID_MPEG_VIDEO_PULLDOWN: | 496 | case V4L2_CID_MPEG_VIDEO_PULLDOWN: |
497 | case V4L2_CID_EXPOSURE_AUTO_PRIORITY: | ||
498 | case V4L2_CID_PRIVACY: | ||
436 | qctrl->type = V4L2_CTRL_TYPE_BOOLEAN; | 499 | qctrl->type = V4L2_CTRL_TYPE_BOOLEAN; |
437 | min = 0; | 500 | min = 0; |
438 | max = step = 1; | 501 | max = step = 1; |
439 | break; | 502 | break; |
503 | case V4L2_CID_POWER_LINE_FREQUENCY: | ||
440 | case V4L2_CID_MPEG_AUDIO_SAMPLING_FREQ: | 504 | case V4L2_CID_MPEG_AUDIO_SAMPLING_FREQ: |
441 | case V4L2_CID_MPEG_AUDIO_ENCODING: | 505 | case V4L2_CID_MPEG_AUDIO_ENCODING: |
442 | case V4L2_CID_MPEG_AUDIO_L1_BITRATE: | 506 | case V4L2_CID_MPEG_AUDIO_L1_BITRATE: |
@@ -452,10 +516,12 @@ int v4l2_ctrl_query_fill(struct v4l2_queryctrl *qctrl, s32 min, s32 max, s32 ste | |||
452 | case V4L2_CID_MPEG_VIDEO_BITRATE_MODE: | 516 | case V4L2_CID_MPEG_VIDEO_BITRATE_MODE: |
453 | case V4L2_CID_MPEG_STREAM_TYPE: | 517 | case V4L2_CID_MPEG_STREAM_TYPE: |
454 | case V4L2_CID_MPEG_STREAM_VBI_FMT: | 518 | case V4L2_CID_MPEG_STREAM_VBI_FMT: |
519 | case V4L2_CID_EXPOSURE_AUTO: | ||
455 | qctrl->type = V4L2_CTRL_TYPE_MENU; | 520 | qctrl->type = V4L2_CTRL_TYPE_MENU; |
456 | step = 1; | 521 | step = 1; |
457 | break; | 522 | break; |
458 | case V4L2_CID_USER_CLASS: | 523 | case V4L2_CID_USER_CLASS: |
524 | case V4L2_CID_CAMERA_CLASS: | ||
459 | case V4L2_CID_MPEG_CLASS: | 525 | case V4L2_CID_MPEG_CLASS: |
460 | qctrl->type = V4L2_CTRL_TYPE_CTRL_CLASS; | 526 | qctrl->type = V4L2_CTRL_TYPE_CTRL_CLASS; |
461 | qctrl->flags |= V4L2_CTRL_FLAG_READ_ONLY; | 527 | qctrl->flags |= V4L2_CTRL_FLAG_READ_ONLY; |