From patchwork Thu May 14 11:46:56 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eduardo Valentin X-Patchwork-Id: 23748 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n4EBqaYa020054 for ; Thu, 14 May 2009 11:52:36 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755234AbZENLwb (ORCPT ); Thu, 14 May 2009 07:52:31 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755927AbZENLwb (ORCPT ); Thu, 14 May 2009 07:52:31 -0400 Received: from smtp.nokia.com ([192.100.105.134]:42014 "EHLO mgw-mx09.nokia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755234AbZENLwa (ORCPT ); Thu, 14 May 2009 07:52:30 -0400 Received: from esebh106.NOE.Nokia.com (esebh106.ntc.nokia.com [172.21.138.213]) by mgw-mx09.nokia.com (Switch-3.2.6/Switch-3.2.6) with ESMTP id n4EBq7qv014988; Thu, 14 May 2009 06:52:20 -0500 Received: from vaebh104.NOE.Nokia.com ([10.160.244.30]) by esebh106.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.3959); Thu, 14 May 2009 14:52:03 +0300 Received: from vaebe101.NOE.Nokia.com ([10.160.244.11]) by vaebh104.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.3959); Thu, 14 May 2009 14:52:02 +0300 Received: from localhost.localdomain ([172.21.41.99]) by vaebe101.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.3959); Thu, 14 May 2009 14:52:02 +0300 From: Eduardo Valentin To: Hans Verkuil , Mauro Carvalho Chehab Cc: "Nurkkala Eero.An (EXT-Offcode/Oulu)" , "linux-media@vger.kernel.org" , Eduardo Valentin Subject: [PATCH v3 2/7] v4l2: video device: Add FMTX controls default configurations Date: Thu, 14 May 2009 14:46:56 +0300 Message-Id: <1242301622-29672-3-git-send-email-eduardo.valentin@nokia.com> X-Mailer: git-send-email 1.6.2.GIT In-Reply-To: <1242301622-29672-2-git-send-email-eduardo.valentin@nokia.com> References: <1242301622-29672-1-git-send-email-eduardo.valentin@nokia.com> <1242301622-29672-2-git-send-email-eduardo.valentin@nokia.com> X-OriginalArrivalTime: 14 May 2009 11:52:02.0269 (UTC) FILETIME=[650CE8D0:01C9D48A] X-Nokia-AV: Clean Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Signed-off-by: Eduardo Valentin --- drivers/media/video/v4l2-common.c | 46 +++++++++++++++++++++++++++++++++++++ 1 files changed, 46 insertions(+), 0 deletions(-) diff --git a/drivers/media/video/v4l2-common.c b/drivers/media/video/v4l2-common.c index 7e6203d..389f7b2 100644 --- a/drivers/media/video/v4l2-common.c +++ b/drivers/media/video/v4l2-common.c @@ -340,6 +340,12 @@ const char **v4l2_ctrl_get_menu(u32 id) "Sepia", NULL }; + static const char *fmtx_preemphasis[] = { + "No preemphasis", + "50 useconds", + "75 useconds", + NULL, + }; switch (id) { case V4L2_CID_MPEG_AUDIO_SAMPLING_FREQ: @@ -378,6 +384,8 @@ const char **v4l2_ctrl_get_menu(u32 id) return camera_exposure_auto; case V4L2_CID_COLORFX: return colorfx; + case V4L2_CID_PREEMPHASIS: + return fmtx_preemphasis; default: return NULL; } @@ -476,6 +484,28 @@ const char *v4l2_ctrl_get_name(u32 id) case V4L2_CID_ZOOM_CONTINUOUS: return "Zoom, Continuous"; case V4L2_CID_PRIVACY: return "Privacy"; + /* FM Radio Modulator control */ + case V4L2_CID_FMTX_CLASS: return "FM Radio Modulator Controls"; + case V4L2_CID_RDS_ENABLED: return "RDS Feature Enabled"; + case V4L2_CID_RDS_PI: return "RDS Program ID"; + case V4L2_CID_RDS_PTY: return "RDS Program Type"; + case V4L2_CID_RDS_PS_NAME: return "RDS PS Name"; + case V4L2_CID_RDS_RADIO_TEXT: return "RDS Radio Text"; + case V4L2_CID_AUDIO_LIMITER_ENABLED: return "Audio Limiter Feature Enabled"; + case V4L2_CID_AUDIO_LIMITER_RELEASE_TIME: return "Audio Limiter Release Time"; + case V4L2_CID_AUDIO_LIMITER_DEVIATION: return "Audio Limiter Deviation"; + case V4L2_CID_AUDIO_COMPRESSION_ENABLED: return "Audio Compression Feature Enabled"; + case V4L2_CID_AUDIO_COMPRESSION_GAIN: return "Audio Compression Gain"; + case V4L2_CID_AUDIO_COMPRESSION_THRESHOLD: return "Audio Compression Threshold"; + case V4L2_CID_AUDIO_COMPRESSION_ATTACK_TIME: return "Audio Compression Attack Time"; + case V4L2_CID_AUDIO_COMPRESSION_RELEASE_TIME: return "Audio Compression Release Time"; + case V4L2_CID_PILOT_TONE_ENABLED: return "Pilot Tone Feature Enabled"; + case V4L2_CID_PILOT_TONE_DEVIATION: return "Pilot Tone Deviation"; + case V4L2_CID_PILOT_TONE_FREQUENCY: return "Pilot Tone Frequency"; + case V4L2_CID_PREEMPHASIS: return "Pre-emphasis settings"; + case V4L2_CID_TUNE_POWER_LEVEL: return "Tune Power Level"; + case V4L2_CID_TUNE_ANTENNA_CAPACITOR: return "Tune Antenna Capacitor"; + default: return NULL; } @@ -508,6 +538,10 @@ int v4l2_ctrl_query_fill(struct v4l2_queryctrl *qctrl, s32 min, s32 max, s32 ste case V4L2_CID_EXPOSURE_AUTO_PRIORITY: case V4L2_CID_FOCUS_AUTO: case V4L2_CID_PRIVACY: + case V4L2_CID_RDS_ENABLED: + case V4L2_CID_AUDIO_LIMITER_ENABLED: + case V4L2_CID_AUDIO_COMPRESSION_ENABLED: + case V4L2_CID_PILOT_TONE_ENABLED: qctrl->type = V4L2_CTRL_TYPE_BOOLEAN; min = 0; max = step = 1; @@ -536,12 +570,14 @@ int v4l2_ctrl_query_fill(struct v4l2_queryctrl *qctrl, s32 min, s32 max, s32 ste case V4L2_CID_MPEG_STREAM_VBI_FMT: case V4L2_CID_EXPOSURE_AUTO: case V4L2_CID_COLORFX: + case V4L2_CID_PREEMPHASIS: qctrl->type = V4L2_CTRL_TYPE_MENU; step = 1; break; case V4L2_CID_USER_CLASS: case V4L2_CID_CAMERA_CLASS: case V4L2_CID_MPEG_CLASS: + case V4L2_CID_FMTX_CLASS: qctrl->type = V4L2_CTRL_TYPE_CTRL_CLASS; qctrl->flags |= V4L2_CTRL_FLAG_READ_ONLY; min = max = step = def = 0; @@ -570,6 +606,16 @@ int v4l2_ctrl_query_fill(struct v4l2_queryctrl *qctrl, s32 min, s32 max, s32 ste case V4L2_CID_BLUE_BALANCE: case V4L2_CID_GAMMA: case V4L2_CID_SHARPNESS: + case V4L2_CID_AUDIO_LIMITER_RELEASE_TIME: + case V4L2_CID_AUDIO_LIMITER_DEVIATION: + case V4L2_CID_AUDIO_COMPRESSION_GAIN: + case V4L2_CID_AUDIO_COMPRESSION_THRESHOLD: + case V4L2_CID_AUDIO_COMPRESSION_ATTACK_TIME: + case V4L2_CID_AUDIO_COMPRESSION_RELEASE_TIME: + case V4L2_CID_PILOT_TONE_DEVIATION: + case V4L2_CID_PILOT_TONE_FREQUENCY: + case V4L2_CID_TUNE_POWER_LEVEL: + case V4L2_CID_TUNE_ANTENNA_CAPACITOR: qctrl->flags |= V4L2_CTRL_FLAG_SLIDER; break; case V4L2_CID_PAN_RELATIVE: