From patchwork Wed Aug 29 12:31:07 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Prabhakar Lad X-Patchwork-Id: 1384831 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 98EADDF2AB for ; Wed, 29 Aug 2012 12:32:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753374Ab2H2McW (ORCPT ); Wed, 29 Aug 2012 08:32:22 -0400 Received: from devils.ext.ti.com ([198.47.26.153]:44929 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751532Ab2H2McV (ORCPT ); Wed, 29 Aug 2012 08:32:21 -0400 Received: from dbdp20.itg.ti.com ([172.24.170.38]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id q7TCVbJa022384; Wed, 29 Aug 2012 07:31:38 -0500 Received: from DBDE71.ent.ti.com (localhost [127.0.0.1]) by dbdp20.itg.ti.com (8.13.8/8.13.8) with ESMTP id q7TCVTFi011452; Wed, 29 Aug 2012 18:01:30 +0530 (IST) Received: from dbdp32.itg.ti.com (172.24.170.251) by DBDE71.ent.ti.com (172.24.170.149) with Microsoft SMTP Server id 14.1.323.3; Wed, 29 Aug 2012 18:01:29 +0530 Received: from localhost.localdomain (dbdp20.itg.ti.com [172.24.170.38]) by dbdp32.itg.ti.com (8.13.8/8.13.8) with ESMTP id q7TCVNJ1012687; Wed, 29 Aug 2012 18:01:23 +0530 From: Prabhakar Lad To: LMML CC: dlos , , Manjunath Hadli , "Lad, Prabhakar" , Sakari Ailus , Hans Verkuil , Laurent Pinchart , Mauro Carvalho Chehab , Sylwester Nawrocki , Hans de Goede , Kyungmin Park Subject: [PATCH] media: v4l2-ctrls: add control for dpcm predictor Date: Wed, 29 Aug 2012 18:01:07 +0530 Message-ID: <1346243467-17094-1-git-send-email-prabhakar.lad@ti.com> X-Mailer: git-send-email 1.7.0.4 MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org From: Lad, Prabhakar add V4L2_CID_DPCM_PREDICTOR control of type menu, which determines the dpcm predictor. The predictor can be either simple or advanced. Signed-off-by: Lad, Prabhakar Signed-off-by: Manjunath Hadli Cc: Sakari Ailus Cc: Hans Verkuil Cc: Laurent Pinchart Cc: Mauro Carvalho Chehab Cc: Sylwester Nawrocki Cc: Hans de Goede Cc: Kyungmin Park --- This patches has one checkpatch warning for line over 80 characters altough it can be avoided I have kept it for consistency. drivers/media/v4l2-core/v4l2-ctrls.c | 9 +++++++++ include/linux/videodev2.h | 5 +++++ 2 files changed, 14 insertions(+), 0 deletions(-) diff --git a/drivers/media/v4l2-core/v4l2-ctrls.c b/drivers/media/v4l2-core/v4l2-ctrls.c index b6a2ee7..2d7bc15 100644 --- a/drivers/media/v4l2-core/v4l2-ctrls.c +++ b/drivers/media/v4l2-core/v4l2-ctrls.c @@ -425,6 +425,11 @@ const char * const *v4l2_ctrl_get_menu(u32 id) "Gray", NULL, }; + static const char * const dpcm_predictor[] = { + "Simple Predictor", + "Advanced Predictor", + NULL, + }; switch (id) { case V4L2_CID_MPEG_AUDIO_SAMPLING_FREQ: @@ -502,6 +507,8 @@ const char * const *v4l2_ctrl_get_menu(u32 id) return mpeg4_profile; case V4L2_CID_JPEG_CHROMA_SUBSAMPLING: return jpeg_chroma_subsampling; + case V4L2_CID_DPCM_PREDICTOR: + return dpcm_predictor; default: return NULL; @@ -732,6 +739,7 @@ const char *v4l2_ctrl_get_name(u32 id) case V4L2_CID_IMAGE_PROC_CLASS: return "Image Processing Controls"; case V4L2_CID_LINK_FREQ: return "Link Frequency"; case V4L2_CID_PIXEL_RATE: return "Pixel Rate"; + case V4L2_CID_DPCM_PREDICTOR: return "DPCM Predictor"; default: return NULL; @@ -832,6 +840,7 @@ void v4l2_ctrl_fill(u32 id, const char **name, enum v4l2_ctrl_type *type, case V4L2_CID_ISO_SENSITIVITY_AUTO: case V4L2_CID_EXPOSURE_METERING: case V4L2_CID_SCENE_MODE: + case V4L2_CID_DPCM_PREDICTOR: *type = V4L2_CTRL_TYPE_MENU; break; case V4L2_CID_LINK_FREQ: diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h index 6d6dfa7..4edb941 100644 --- a/include/linux/videodev2.h +++ b/include/linux/videodev2.h @@ -2000,6 +2000,11 @@ enum v4l2_jpeg_chroma_subsampling { #define V4L2_CID_LINK_FREQ (V4L2_CID_IMAGE_PROC_CLASS_BASE + 1) #define V4L2_CID_PIXEL_RATE (V4L2_CID_IMAGE_PROC_CLASS_BASE + 2) +#define V4L2_CID_DPCM_PREDICTOR (V4L2_CID_IMAGE_PROC_CLASS_BASE + 3) +enum v4l2_dpcm_predictor { + V4L2_DPCM_PREDICTOR_SIMPLE = 0, + V4L2_DPCM_PREDICTOR_ADVANCE = 1, +}; /* * T U N I N G