diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2009-02-20 04:30:12 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-03-30 11:42:54 -0400 |
commit | 81dde91f640d6dea89229bb00c4ff38739fc1867 (patch) | |
tree | 4cf88c400e83a2ad34cf294e463b73a3dc57deb9 /drivers/media/video/v4l2-common.c | |
parent | 1a367f3bc3a750b839c5711ecd0c9941e2c5aafa (diff) |
V4L/DVB (10687): v4l2-common/v4l2-spec: support/document write-only and button controls
The controls V4L2_CID_PAN_RESET and V4L2_CID_TILT_RESET changed their type
to button controls (these are unused at the moment, so this is a safe change).
The controls V4L2_CID_PAN_RELATIVE, V4L2_CID_TILT_RELATIVE, V4L2_CID_FOCUS_RELATIVE
and V4L2_CID_ZOOM_RELATIVE are marked as write-only controls.
Cc: Laurent Pinchart <laurent.pinchart@skynet.be>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
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 | 29 |
1 files changed, 24 insertions, 5 deletions
diff --git a/drivers/media/video/v4l2-common.c b/drivers/media/video/v4l2-common.c index cc5f67801bd1..bca4daf87a12 100644 --- a/drivers/media/video/v4l2-common.c +++ b/drivers/media/video/v4l2-common.c | |||
@@ -390,16 +390,16 @@ const char *v4l2_ctrl_get_name(u32 id) | |||
390 | switch (id) { | 390 | switch (id) { |
391 | /* USER controls */ | 391 | /* USER controls */ |
392 | case V4L2_CID_USER_CLASS: return "User Controls"; | 392 | case V4L2_CID_USER_CLASS: return "User Controls"; |
393 | case V4L2_CID_BRIGHTNESS: return "Brightness"; | ||
394 | case V4L2_CID_CONTRAST: return "Contrast"; | ||
395 | case V4L2_CID_SATURATION: return "Saturation"; | ||
396 | case V4L2_CID_HUE: return "Hue"; | ||
393 | case V4L2_CID_AUDIO_VOLUME: return "Volume"; | 397 | case V4L2_CID_AUDIO_VOLUME: return "Volume"; |
394 | case V4L2_CID_AUDIO_MUTE: return "Mute"; | ||
395 | case V4L2_CID_AUDIO_BALANCE: return "Balance"; | 398 | case V4L2_CID_AUDIO_BALANCE: return "Balance"; |
396 | case V4L2_CID_AUDIO_BASS: return "Bass"; | 399 | case V4L2_CID_AUDIO_BASS: return "Bass"; |
397 | case V4L2_CID_AUDIO_TREBLE: return "Treble"; | 400 | case V4L2_CID_AUDIO_TREBLE: return "Treble"; |
401 | case V4L2_CID_AUDIO_MUTE: return "Mute"; | ||
398 | case V4L2_CID_AUDIO_LOUDNESS: return "Loudness"; | 402 | case V4L2_CID_AUDIO_LOUDNESS: return "Loudness"; |
399 | case V4L2_CID_BRIGHTNESS: return "Brightness"; | ||
400 | case V4L2_CID_CONTRAST: return "Contrast"; | ||
401 | case V4L2_CID_SATURATION: return "Saturation"; | ||
402 | case V4L2_CID_HUE: return "Hue"; | ||
403 | case V4L2_CID_BLACK_LEVEL: return "Black Level"; | 403 | case V4L2_CID_BLACK_LEVEL: return "Black Level"; |
404 | case V4L2_CID_AUTO_WHITE_BALANCE: return "White Balance, Automatic"; | 404 | case V4L2_CID_AUTO_WHITE_BALANCE: return "White Balance, Automatic"; |
405 | case V4L2_CID_DO_WHITE_BALANCE: return "Do White Balance"; | 405 | case V4L2_CID_DO_WHITE_BALANCE: return "Do White Balance"; |
@@ -499,16 +499,25 @@ int v4l2_ctrl_query_fill(struct v4l2_queryctrl *qctrl, s32 min, s32 max, s32 ste | |||
499 | case V4L2_CID_HFLIP: | 499 | case V4L2_CID_HFLIP: |
500 | case V4L2_CID_VFLIP: | 500 | case V4L2_CID_VFLIP: |
501 | case V4L2_CID_HUE_AUTO: | 501 | case V4L2_CID_HUE_AUTO: |
502 | case V4L2_CID_CHROMA_AGC: | ||
503 | case V4L2_CID_COLOR_KILLER: | ||
502 | case V4L2_CID_MPEG_AUDIO_MUTE: | 504 | case V4L2_CID_MPEG_AUDIO_MUTE: |
503 | case V4L2_CID_MPEG_VIDEO_MUTE: | 505 | case V4L2_CID_MPEG_VIDEO_MUTE: |
504 | case V4L2_CID_MPEG_VIDEO_GOP_CLOSURE: | 506 | case V4L2_CID_MPEG_VIDEO_GOP_CLOSURE: |
505 | case V4L2_CID_MPEG_VIDEO_PULLDOWN: | 507 | case V4L2_CID_MPEG_VIDEO_PULLDOWN: |
506 | case V4L2_CID_EXPOSURE_AUTO_PRIORITY: | 508 | case V4L2_CID_EXPOSURE_AUTO_PRIORITY: |
509 | case V4L2_CID_FOCUS_AUTO: | ||
507 | case V4L2_CID_PRIVACY: | 510 | case V4L2_CID_PRIVACY: |
508 | qctrl->type = V4L2_CTRL_TYPE_BOOLEAN; | 511 | qctrl->type = V4L2_CTRL_TYPE_BOOLEAN; |
509 | min = 0; | 512 | min = 0; |
510 | max = step = 1; | 513 | max = step = 1; |
511 | break; | 514 | break; |
515 | case V4L2_CID_PAN_RESET: | ||
516 | case V4L2_CID_TILT_RESET: | ||
517 | qctrl->type = V4L2_CTRL_TYPE_BUTTON; | ||
518 | qctrl->flags |= V4L2_CTRL_FLAG_WRITE_ONLY; | ||
519 | min = max = step = def = 0; | ||
520 | break; | ||
512 | case V4L2_CID_POWER_LINE_FREQUENCY: | 521 | case V4L2_CID_POWER_LINE_FREQUENCY: |
513 | case V4L2_CID_MPEG_AUDIO_SAMPLING_FREQ: | 522 | case V4L2_CID_MPEG_AUDIO_SAMPLING_FREQ: |
514 | case V4L2_CID_MPEG_AUDIO_ENCODING: | 523 | case V4L2_CID_MPEG_AUDIO_ENCODING: |
@@ -557,8 +566,17 @@ int v4l2_ctrl_query_fill(struct v4l2_queryctrl *qctrl, s32 min, s32 max, s32 ste | |||
557 | case V4L2_CID_CONTRAST: | 566 | case V4L2_CID_CONTRAST: |
558 | case V4L2_CID_SATURATION: | 567 | case V4L2_CID_SATURATION: |
559 | case V4L2_CID_HUE: | 568 | case V4L2_CID_HUE: |
569 | case V4L2_CID_RED_BALANCE: | ||
570 | case V4L2_CID_BLUE_BALANCE: | ||
571 | case V4L2_CID_GAMMA: | ||
560 | qctrl->flags |= V4L2_CTRL_FLAG_SLIDER; | 572 | qctrl->flags |= V4L2_CTRL_FLAG_SLIDER; |
561 | break; | 573 | break; |
574 | case V4L2_CID_PAN_RELATIVE: | ||
575 | case V4L2_CID_TILT_RELATIVE: | ||
576 | case V4L2_CID_FOCUS_RELATIVE: | ||
577 | case V4L2_CID_ZOOM_RELATIVE: | ||
578 | qctrl->flags |= V4L2_CTRL_FLAG_WRITE_ONLY; | ||
579 | break; | ||
562 | } | 580 | } |
563 | qctrl->minimum = min; | 581 | qctrl->minimum = min; |
564 | qctrl->maximum = max; | 582 | qctrl->maximum = max; |
@@ -578,6 +596,7 @@ int v4l2_ctrl_query_fill_std(struct v4l2_queryctrl *qctrl) | |||
578 | /* USER controls */ | 596 | /* USER controls */ |
579 | case V4L2_CID_USER_CLASS: | 597 | case V4L2_CID_USER_CLASS: |
580 | case V4L2_CID_MPEG_CLASS: | 598 | case V4L2_CID_MPEG_CLASS: |
599 | case V4L2_CID_CAMERA_CLASS: | ||
581 | return v4l2_ctrl_query_fill(qctrl, 0, 0, 0, 0); | 600 | return v4l2_ctrl_query_fill(qctrl, 0, 0, 0, 0); |
582 | case V4L2_CID_AUDIO_VOLUME: | 601 | case V4L2_CID_AUDIO_VOLUME: |
583 | return v4l2_ctrl_query_fill(qctrl, 0, 65535, 65535 / 100, 58880); | 602 | return v4l2_ctrl_query_fill(qctrl, 0, 65535, 65535 / 100, 58880); |