From patchwork Sat Feb 27 20:20:18 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonio Ospite X-Patchwork-Id: 82721 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o1RKVBRu007854 for ; Sat, 27 Feb 2010 20:31:11 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030800Ab0B0UbK (ORCPT ); Sat, 27 Feb 2010 15:31:10 -0500 Received: from smtp-out108.alice.it ([85.37.17.108]:3632 "EHLO smtp-out108.alice.it" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030784Ab0B0UbJ (ORCPT ); Sat, 27 Feb 2010 15:31:09 -0500 Received: from FBCMMO01.fbc.local ([192.168.68.195]) by smtp-out108.alice.it with Microsoft SMTPSVC(6.0.3790.3959); Sat, 27 Feb 2010 21:20:52 +0100 Received: from FBCMCL01B01.fbc.local ([192.168.69.82]) by FBCMMO01.fbc.local with Microsoft SMTPSVC(6.0.3790.3959); Sat, 27 Feb 2010 21:20:52 +0100 Received: from badebec ([82.61.82.143]) by FBCMCL01B01.fbc.local with Microsoft SMTPSVC(6.0.3790.3959); Sat, 27 Feb 2010 21:20:51 +0100 Received: by badebec with local (Exim 4.71) (envelope-from ) id 1NlT9a-00024Z-Fw; Sat, 27 Feb 2010 21:20:46 +0100 From: Antonio Ospite To: linux-media@vger.kernel.org Cc: Max Thrun , Jean-Francois Moine , Antonio Ospite Subject: [PATCH 01/11] ov534: Remove ambiguous controls Date: Sat, 27 Feb 2010 21:20:18 +0100 Message-Id: <1267302028-7941-2-git-send-email-ospite@studenti.unina.it> X-Mailer: git-send-email 1.7.0 In-Reply-To: <1267302028-7941-1-git-send-email-ospite@studenti.unina.it> References: <1267302028-7941-1-git-send-email-ospite@studenti.unina.it> X-OriginalArrivalTime: 27 Feb 2010 20:20:52.0148 (UTC) FILETIME=[5BA87F40:01CAB7EA] Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Sat, 27 Feb 2010 20:31:12 +0000 (UTC) Index: gspca/linux/drivers/media/video/gspca/ov534.c =================================================================== --- gspca.orig/linux/drivers/media/video/gspca/ov534.c +++ gspca/linux/drivers/media/video/gspca/ov534.c @@ -60,8 +60,6 @@ u8 contrast; u8 gain; u8 exposure; - u8 redblc; - u8 blueblc; u8 hue; u8 autogain; u8 awb; @@ -76,10 +74,6 @@ static int sd_getgain(struct gspca_dev *gspca_dev, __s32 *val); static int sd_setexposure(struct gspca_dev *gspca_dev, __s32 val); static int sd_getexposure(struct gspca_dev *gspca_dev, __s32 *val); -static int sd_setredblc(struct gspca_dev *gspca_dev, __s32 val); -static int sd_getredblc(struct gspca_dev *gspca_dev, __s32 *val); -static int sd_setblueblc(struct gspca_dev *gspca_dev, __s32 val); -static int sd_getblueblc(struct gspca_dev *gspca_dev, __s32 *val); static int sd_setautogain(struct gspca_dev *gspca_dev, __s32 val); static int sd_getautogain(struct gspca_dev *gspca_dev, __s32 *val); static int sd_setsharpness(struct gspca_dev *gspca_dev, __s32 val); @@ -156,34 +150,6 @@ }, { /* 4 */ { - .id = V4L2_CID_RED_BALANCE, - .type = V4L2_CTRL_TYPE_INTEGER, - .name = "Red Balance", - .minimum = 0, - .maximum = 255, - .step = 1, -#define RED_BALANCE_DEF 128 - .default_value = RED_BALANCE_DEF, - }, - .set = sd_setredblc, - .get = sd_getredblc, - }, - { /* 5 */ - { - .id = V4L2_CID_BLUE_BALANCE, - .type = V4L2_CTRL_TYPE_INTEGER, - .name = "Blue Balance", - .minimum = 0, - .maximum = 255, - .step = 1, -#define BLUE_BALANCE_DEF 128 - .default_value = BLUE_BALANCE_DEF, - }, - .set = sd_setblueblc, - .get = sd_getblueblc, - }, - { /* 6 */ - { .id = V4L2_CID_HUE, .type = V4L2_CTRL_TYPE_INTEGER, .name = "Hue", @@ -196,7 +162,7 @@ .set = sd_sethue, .get = sd_gethue, }, - { /* 7 */ + { /* 5 */ { .id = V4L2_CID_AUTOGAIN, .type = V4L2_CTRL_TYPE_BOOLEAN, @@ -210,8 +176,8 @@ .set = sd_setautogain, .get = sd_getautogain, }, -#define AWB_IDX 8 - { /* 8 */ +#define AWB_IDX 6 + { /* 6 */ { .id = V4L2_CID_AUTO_WHITE_BALANCE, .type = V4L2_CTRL_TYPE_BOOLEAN, @@ -225,7 +191,7 @@ .set = sd_setawb, .get = sd_getawb, }, - { /* 9 */ + { /* 7 */ { .id = V4L2_CID_SHARPNESS, .type = V4L2_CTRL_TYPE_INTEGER, @@ -239,7 +205,7 @@ .set = sd_setsharpness, .get = sd_getsharpness, }, - { /* 10 */ + { /* 8 */ { .id = V4L2_CID_HFLIP, .type = V4L2_CTRL_TYPE_BOOLEAN, @@ -253,7 +219,7 @@ .set = sd_sethflip, .get = sd_gethflip, }, - { /* 11 */ + { /* 9 */ { .id = V4L2_CID_VFLIP, .type = V4L2_CTRL_TYPE_BOOLEAN, @@ -722,20 +688,6 @@ sccb_reg_write(gspca_dev, 0x10, val << 1); } -static void setredblc(struct gspca_dev *gspca_dev) -{ - struct sd *sd = (struct sd *) gspca_dev; - - sccb_reg_write(gspca_dev, 0x43, sd->redblc); -} - -static void setblueblc(struct gspca_dev *gspca_dev) -{ - struct sd *sd = (struct sd *) gspca_dev; - - sccb_reg_write(gspca_dev, 0x42, sd->blueblc); -} - static void sethue(struct gspca_dev *gspca_dev) { struct sd *sd = (struct sd *) gspca_dev; @@ -825,8 +777,6 @@ sd->contrast = CONTRAST_DEF; sd->gain = GAIN_DEF; sd->exposure = EXPO_DEF; - sd->redblc = RED_BALANCE_DEF; - sd->blueblc = BLUE_BALANCE_DEF; sd->hue = HUE_DEF; #if AUTOGAIN_DEF != 0 sd->autogain = AUTOGAIN_DEF; @@ -907,8 +857,6 @@ setautogain(gspca_dev); setawb(gspca_dev); setgain(gspca_dev); - setredblc(gspca_dev); - setblueblc(gspca_dev); sethue(gspca_dev); setexposure(gspca_dev); setbrightness(gspca_dev); @@ -1092,42 +1040,6 @@ return 0; } -static int sd_setredblc(struct gspca_dev *gspca_dev, __s32 val) -{ - struct sd *sd = (struct sd *) gspca_dev; - - sd->redblc = val; - if (gspca_dev->streaming) - setredblc(gspca_dev); - return 0; -} - -static int sd_getredblc(struct gspca_dev *gspca_dev, __s32 *val) -{ - struct sd *sd = (struct sd *) gspca_dev; - - *val = sd->redblc; - return 0; -} - -static int sd_setblueblc(struct gspca_dev *gspca_dev, __s32 val) -{ - struct sd *sd = (struct sd *) gspca_dev; - - sd->blueblc = val; - if (gspca_dev->streaming) - setblueblc(gspca_dev); - return 0; -} - -static int sd_getblueblc(struct gspca_dev *gspca_dev, __s32 *val) -{ - struct sd *sd = (struct sd *) gspca_dev; - - *val = sd->blueblc; - return 0; -} - static int sd_sethue(struct gspca_dev *gspca_dev, __s32 val) { struct sd *sd = (struct sd *) gspca_dev;