diff options
author | Eduardo Valentin <eduardo.valentin@nokia.com> | 2009-08-11 17:49:12 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-09-12 11:19:19 -0400 |
commit | fdf82dc2e2d43cf135b5fd352dea523642bb553a (patch) | |
tree | 64fe2e69e8de63c88998579546f67590f63c3ed8 /drivers/media/video/v4l2-common.c | |
parent | 6b4249413abb634d9b2ff44c685da744f02e49d1 (diff) |
V4L/DVB (12549): v4l2: video device: Add FM TX controls default configurations
This patch adds basic configurations for FM TX extended controls.
That includes controls names, menu strings, pointer identification,
type classification and flags configuration.
Signed-off-by: Eduardo Valentin <eduardo.valentin@nokia.com>
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 | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/drivers/media/video/v4l2-common.c b/drivers/media/video/v4l2-common.c index 536150c34067..3a0c64935b0e 100644 --- a/drivers/media/video/v4l2-common.c +++ b/drivers/media/video/v4l2-common.c | |||
@@ -342,6 +342,12 @@ const char **v4l2_ctrl_get_menu(u32 id) | |||
342 | "Sepia", | 342 | "Sepia", |
343 | NULL | 343 | NULL |
344 | }; | 344 | }; |
345 | static const char *tune_preemphasis[] = { | ||
346 | "No preemphasis", | ||
347 | "50 useconds", | ||
348 | "75 useconds", | ||
349 | NULL, | ||
350 | }; | ||
345 | 351 | ||
346 | switch (id) { | 352 | switch (id) { |
347 | case V4L2_CID_MPEG_AUDIO_SAMPLING_FREQ: | 353 | case V4L2_CID_MPEG_AUDIO_SAMPLING_FREQ: |
@@ -380,6 +386,8 @@ const char **v4l2_ctrl_get_menu(u32 id) | |||
380 | return camera_exposure_auto; | 386 | return camera_exposure_auto; |
381 | case V4L2_CID_COLORFX: | 387 | case V4L2_CID_COLORFX: |
382 | return colorfx; | 388 | return colorfx; |
389 | case V4L2_CID_TUNE_PREEMPHASIS: | ||
390 | return tune_preemphasis; | ||
383 | default: | 391 | default: |
384 | return NULL; | 392 | return NULL; |
385 | } | 393 | } |
@@ -478,6 +486,28 @@ const char *v4l2_ctrl_get_name(u32 id) | |||
478 | case V4L2_CID_ZOOM_CONTINUOUS: return "Zoom, Continuous"; | 486 | case V4L2_CID_ZOOM_CONTINUOUS: return "Zoom, Continuous"; |
479 | case V4L2_CID_PRIVACY: return "Privacy"; | 487 | case V4L2_CID_PRIVACY: return "Privacy"; |
480 | 488 | ||
489 | /* FM Radio Modulator control */ | ||
490 | case V4L2_CID_FM_TX_CLASS: return "FM Radio Modulator Controls"; | ||
491 | case V4L2_CID_RDS_TX_DEVIATION: return "RDS Signal Deviation"; | ||
492 | case V4L2_CID_RDS_TX_PI: return "RDS Program ID"; | ||
493 | case V4L2_CID_RDS_TX_PTY: return "RDS Program Type"; | ||
494 | case V4L2_CID_RDS_TX_PS_NAME: return "RDS PS Name"; | ||
495 | case V4L2_CID_RDS_TX_RADIO_TEXT: return "RDS Radio Text"; | ||
496 | case V4L2_CID_AUDIO_LIMITER_ENABLED: return "Audio Limiter Feature Enabled"; | ||
497 | case V4L2_CID_AUDIO_LIMITER_RELEASE_TIME: return "Audio Limiter Release Time"; | ||
498 | case V4L2_CID_AUDIO_LIMITER_DEVIATION: return "Audio Limiter Deviation"; | ||
499 | case V4L2_CID_AUDIO_COMPRESSION_ENABLED: return "Audio Compression Feature Enabled"; | ||
500 | case V4L2_CID_AUDIO_COMPRESSION_GAIN: return "Audio Compression Gain"; | ||
501 | case V4L2_CID_AUDIO_COMPRESSION_THRESHOLD: return "Audio Compression Threshold"; | ||
502 | case V4L2_CID_AUDIO_COMPRESSION_ATTACK_TIME: return "Audio Compression Attack Time"; | ||
503 | case V4L2_CID_AUDIO_COMPRESSION_RELEASE_TIME: return "Audio Compression Release Time"; | ||
504 | case V4L2_CID_PILOT_TONE_ENABLED: return "Pilot Tone Feature Enabled"; | ||
505 | case V4L2_CID_PILOT_TONE_DEVIATION: return "Pilot Tone Deviation"; | ||
506 | case V4L2_CID_PILOT_TONE_FREQUENCY: return "Pilot Tone Frequency"; | ||
507 | case V4L2_CID_TUNE_PREEMPHASIS: return "Pre-emphasis settings"; | ||
508 | case V4L2_CID_TUNE_POWER_LEVEL: return "Tune Power Level"; | ||
509 | case V4L2_CID_TUNE_ANTENNA_CAPACITOR: return "Tune Antenna Capacitor"; | ||
510 | |||
481 | default: | 511 | default: |
482 | return NULL; | 512 | return NULL; |
483 | } | 513 | } |
@@ -510,6 +540,9 @@ int v4l2_ctrl_query_fill(struct v4l2_queryctrl *qctrl, s32 min, s32 max, s32 ste | |||
510 | case V4L2_CID_EXPOSURE_AUTO_PRIORITY: | 540 | case V4L2_CID_EXPOSURE_AUTO_PRIORITY: |
511 | case V4L2_CID_FOCUS_AUTO: | 541 | case V4L2_CID_FOCUS_AUTO: |
512 | case V4L2_CID_PRIVACY: | 542 | case V4L2_CID_PRIVACY: |
543 | case V4L2_CID_AUDIO_LIMITER_ENABLED: | ||
544 | case V4L2_CID_AUDIO_COMPRESSION_ENABLED: | ||
545 | case V4L2_CID_PILOT_TONE_ENABLED: | ||
513 | qctrl->type = V4L2_CTRL_TYPE_BOOLEAN; | 546 | qctrl->type = V4L2_CTRL_TYPE_BOOLEAN; |
514 | min = 0; | 547 | min = 0; |
515 | max = step = 1; | 548 | max = step = 1; |
@@ -538,12 +571,18 @@ int v4l2_ctrl_query_fill(struct v4l2_queryctrl *qctrl, s32 min, s32 max, s32 ste | |||
538 | case V4L2_CID_MPEG_STREAM_VBI_FMT: | 571 | case V4L2_CID_MPEG_STREAM_VBI_FMT: |
539 | case V4L2_CID_EXPOSURE_AUTO: | 572 | case V4L2_CID_EXPOSURE_AUTO: |
540 | case V4L2_CID_COLORFX: | 573 | case V4L2_CID_COLORFX: |
574 | case V4L2_CID_TUNE_PREEMPHASIS: | ||
541 | qctrl->type = V4L2_CTRL_TYPE_MENU; | 575 | qctrl->type = V4L2_CTRL_TYPE_MENU; |
542 | step = 1; | 576 | step = 1; |
543 | break; | 577 | break; |
578 | case V4L2_CID_RDS_TX_PS_NAME: | ||
579 | case V4L2_CID_RDS_TX_RADIO_TEXT: | ||
580 | qctrl->type = V4L2_CTRL_TYPE_STRING; | ||
581 | break; | ||
544 | case V4L2_CID_USER_CLASS: | 582 | case V4L2_CID_USER_CLASS: |
545 | case V4L2_CID_CAMERA_CLASS: | 583 | case V4L2_CID_CAMERA_CLASS: |
546 | case V4L2_CID_MPEG_CLASS: | 584 | case V4L2_CID_MPEG_CLASS: |
585 | case V4L2_CID_FM_TX_CLASS: | ||
547 | qctrl->type = V4L2_CTRL_TYPE_CTRL_CLASS; | 586 | qctrl->type = V4L2_CTRL_TYPE_CTRL_CLASS; |
548 | qctrl->flags |= V4L2_CTRL_FLAG_READ_ONLY; | 587 | qctrl->flags |= V4L2_CTRL_FLAG_READ_ONLY; |
549 | min = max = step = def = 0; | 588 | min = max = step = def = 0; |
@@ -572,6 +611,17 @@ int v4l2_ctrl_query_fill(struct v4l2_queryctrl *qctrl, s32 min, s32 max, s32 ste | |||
572 | case V4L2_CID_BLUE_BALANCE: | 611 | case V4L2_CID_BLUE_BALANCE: |
573 | case V4L2_CID_GAMMA: | 612 | case V4L2_CID_GAMMA: |
574 | case V4L2_CID_SHARPNESS: | 613 | case V4L2_CID_SHARPNESS: |
614 | case V4L2_CID_RDS_TX_DEVIATION: | ||
615 | case V4L2_CID_AUDIO_LIMITER_RELEASE_TIME: | ||
616 | case V4L2_CID_AUDIO_LIMITER_DEVIATION: | ||
617 | case V4L2_CID_AUDIO_COMPRESSION_GAIN: | ||
618 | case V4L2_CID_AUDIO_COMPRESSION_THRESHOLD: | ||
619 | case V4L2_CID_AUDIO_COMPRESSION_ATTACK_TIME: | ||
620 | case V4L2_CID_AUDIO_COMPRESSION_RELEASE_TIME: | ||
621 | case V4L2_CID_PILOT_TONE_DEVIATION: | ||
622 | case V4L2_CID_PILOT_TONE_FREQUENCY: | ||
623 | case V4L2_CID_TUNE_POWER_LEVEL: | ||
624 | case V4L2_CID_TUNE_ANTENNA_CAPACITOR: | ||
575 | qctrl->flags |= V4L2_CTRL_FLAG_SLIDER; | 625 | qctrl->flags |= V4L2_CTRL_FLAG_SLIDER; |
576 | break; | 626 | break; |
577 | case V4L2_CID_PAN_RELATIVE: | 627 | case V4L2_CID_PAN_RELATIVE: |