aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Thrun <bear24rw@gmail.com>2010-02-27 15:20:18 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-05-17 23:46:53 -0400
commitc3f52f630d067c7590ed438bfb0a82bcb91e0b21 (patch)
tree1526a480db99a03efcfbd16e0abf7d72cb506d22
parentc4ea13b40bc962245a38148dc5e7633fd8428880 (diff)
V4L/DVB: gspca- ov534: Remove ambiguous controls
Remove Blue/Red Channel Target Value, they are meant for Black Level Calibration but it is not completely clear how to use them. Signed-off-by: Max Thrun <bear24rw@gmail.com> Signed-off-by: Antonio Ospite <ospite@studenti.unina.it> Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r--drivers/media/video/gspca/ov534.c100
1 files changed, 6 insertions, 94 deletions
diff --git a/drivers/media/video/gspca/ov534.c b/drivers/media/video/gspca/ov534.c
index 957e05e2d08f..2a0e8a3e794f 100644
--- a/drivers/media/video/gspca/ov534.c
+++ b/drivers/media/video/gspca/ov534.c
@@ -60,8 +60,6 @@ struct sd {
60 u8 contrast; 60 u8 contrast;
61 u8 gain; 61 u8 gain;
62 u8 exposure; 62 u8 exposure;
63 u8 redblc;
64 u8 blueblc;
65 u8 hue; 63 u8 hue;
66 u8 autogain; 64 u8 autogain;
67 u8 awb; 65 u8 awb;
@@ -76,10 +74,6 @@ static int sd_setgain(struct gspca_dev *gspca_dev, __s32 val);
76static int sd_getgain(struct gspca_dev *gspca_dev, __s32 *val); 74static int sd_getgain(struct gspca_dev *gspca_dev, __s32 *val);
77static int sd_setexposure(struct gspca_dev *gspca_dev, __s32 val); 75static int sd_setexposure(struct gspca_dev *gspca_dev, __s32 val);
78static int sd_getexposure(struct gspca_dev *gspca_dev, __s32 *val); 76static int sd_getexposure(struct gspca_dev *gspca_dev, __s32 *val);
79static int sd_setredblc(struct gspca_dev *gspca_dev, __s32 val);
80static int sd_getredblc(struct gspca_dev *gspca_dev, __s32 *val);
81static int sd_setblueblc(struct gspca_dev *gspca_dev, __s32 val);
82static int sd_getblueblc(struct gspca_dev *gspca_dev, __s32 *val);
83static int sd_setautogain(struct gspca_dev *gspca_dev, __s32 val); 77static int sd_setautogain(struct gspca_dev *gspca_dev, __s32 val);
84static int sd_getautogain(struct gspca_dev *gspca_dev, __s32 *val); 78static int sd_getautogain(struct gspca_dev *gspca_dev, __s32 *val);
85static int sd_setsharpness(struct gspca_dev *gspca_dev, __s32 val); 79static int sd_setsharpness(struct gspca_dev *gspca_dev, __s32 val);
@@ -156,34 +150,6 @@ static const struct ctrl sd_ctrls[] = {
156 }, 150 },
157 { /* 4 */ 151 { /* 4 */
158 { 152 {
159 .id = V4L2_CID_RED_BALANCE,
160 .type = V4L2_CTRL_TYPE_INTEGER,
161 .name = "Red Balance",
162 .minimum = 0,
163 .maximum = 255,
164 .step = 1,
165#define RED_BALANCE_DEF 128
166 .default_value = RED_BALANCE_DEF,
167 },
168 .set = sd_setredblc,
169 .get = sd_getredblc,
170 },
171 { /* 5 */
172 {
173 .id = V4L2_CID_BLUE_BALANCE,
174 .type = V4L2_CTRL_TYPE_INTEGER,
175 .name = "Blue Balance",
176 .minimum = 0,
177 .maximum = 255,
178 .step = 1,
179#define BLUE_BALANCE_DEF 128
180 .default_value = BLUE_BALANCE_DEF,
181 },
182 .set = sd_setblueblc,
183 .get = sd_getblueblc,
184 },
185 { /* 6 */
186 {
187 .id = V4L2_CID_HUE, 153 .id = V4L2_CID_HUE,
188 .type = V4L2_CTRL_TYPE_INTEGER, 154 .type = V4L2_CTRL_TYPE_INTEGER,
189 .name = "Hue", 155 .name = "Hue",
@@ -196,7 +162,7 @@ static const struct ctrl sd_ctrls[] = {
196 .set = sd_sethue, 162 .set = sd_sethue,
197 .get = sd_gethue, 163 .get = sd_gethue,
198 }, 164 },
199 { /* 7 */ 165 { /* 5 */
200 { 166 {
201 .id = V4L2_CID_AUTOGAIN, 167 .id = V4L2_CID_AUTOGAIN,
202 .type = V4L2_CTRL_TYPE_BOOLEAN, 168 .type = V4L2_CTRL_TYPE_BOOLEAN,
@@ -210,8 +176,8 @@ static const struct ctrl sd_ctrls[] = {
210 .set = sd_setautogain, 176 .set = sd_setautogain,
211 .get = sd_getautogain, 177 .get = sd_getautogain,
212 }, 178 },
213#define AWB_IDX 8 179#define AWB_IDX 6
214 { /* 8 */ 180 { /* 6 */
215 { 181 {
216 .id = V4L2_CID_AUTO_WHITE_BALANCE, 182 .id = V4L2_CID_AUTO_WHITE_BALANCE,
217 .type = V4L2_CTRL_TYPE_BOOLEAN, 183 .type = V4L2_CTRL_TYPE_BOOLEAN,
@@ -225,7 +191,7 @@ static const struct ctrl sd_ctrls[] = {
225 .set = sd_setawb, 191 .set = sd_setawb,
226 .get = sd_getawb, 192 .get = sd_getawb,
227 }, 193 },
228 { /* 9 */ 194 { /* 7 */
229 { 195 {
230 .id = V4L2_CID_SHARPNESS, 196 .id = V4L2_CID_SHARPNESS,
231 .type = V4L2_CTRL_TYPE_INTEGER, 197 .type = V4L2_CTRL_TYPE_INTEGER,
@@ -239,7 +205,7 @@ static const struct ctrl sd_ctrls[] = {
239 .set = sd_setsharpness, 205 .set = sd_setsharpness,
240 .get = sd_getsharpness, 206 .get = sd_getsharpness,
241 }, 207 },
242 { /* 10 */ 208 { /* 8 */
243 { 209 {
244 .id = V4L2_CID_HFLIP, 210 .id = V4L2_CID_HFLIP,
245 .type = V4L2_CTRL_TYPE_BOOLEAN, 211 .type = V4L2_CTRL_TYPE_BOOLEAN,
@@ -253,7 +219,7 @@ static const struct ctrl sd_ctrls[] = {
253 .set = sd_sethflip, 219 .set = sd_sethflip,
254 .get = sd_gethflip, 220 .get = sd_gethflip,
255 }, 221 },
256 { /* 11 */ 222 { /* 9 */
257 { 223 {
258 .id = V4L2_CID_VFLIP, 224 .id = V4L2_CID_VFLIP,
259 .type = V4L2_CTRL_TYPE_BOOLEAN, 225 .type = V4L2_CTRL_TYPE_BOOLEAN,
@@ -722,20 +688,6 @@ static void setexposure(struct gspca_dev *gspca_dev)
722 sccb_reg_write(gspca_dev, 0x10, val << 1); 688 sccb_reg_write(gspca_dev, 0x10, val << 1);
723} 689}
724 690
725static void setredblc(struct gspca_dev *gspca_dev)
726{
727 struct sd *sd = (struct sd *) gspca_dev;
728
729 sccb_reg_write(gspca_dev, 0x43, sd->redblc);
730}
731
732static void setblueblc(struct gspca_dev *gspca_dev)
733{
734 struct sd *sd = (struct sd *) gspca_dev;
735
736 sccb_reg_write(gspca_dev, 0x42, sd->blueblc);
737}
738
739static void sethue(struct gspca_dev *gspca_dev) 691static void sethue(struct gspca_dev *gspca_dev)
740{ 692{
741 struct sd *sd = (struct sd *) gspca_dev; 693 struct sd *sd = (struct sd *) gspca_dev;
@@ -825,8 +777,6 @@ static int sd_config(struct gspca_dev *gspca_dev,
825 sd->contrast = CONTRAST_DEF; 777 sd->contrast = CONTRAST_DEF;
826 sd->gain = GAIN_DEF; 778 sd->gain = GAIN_DEF;
827 sd->exposure = EXPO_DEF; 779 sd->exposure = EXPO_DEF;
828 sd->redblc = RED_BALANCE_DEF;
829 sd->blueblc = BLUE_BALANCE_DEF;
830 sd->hue = HUE_DEF; 780 sd->hue = HUE_DEF;
831#if AUTOGAIN_DEF != 0 781#if AUTOGAIN_DEF != 0
832 sd->autogain = AUTOGAIN_DEF; 782 sd->autogain = AUTOGAIN_DEF;
@@ -907,8 +857,6 @@ static int sd_start(struct gspca_dev *gspca_dev)
907 setautogain(gspca_dev); 857 setautogain(gspca_dev);
908 setawb(gspca_dev); 858 setawb(gspca_dev);
909 setgain(gspca_dev); 859 setgain(gspca_dev);
910 setredblc(gspca_dev);
911 setblueblc(gspca_dev);
912 sethue(gspca_dev); 860 sethue(gspca_dev);
913 setexposure(gspca_dev); 861 setexposure(gspca_dev);
914 setbrightness(gspca_dev); 862 setbrightness(gspca_dev);
@@ -1092,42 +1040,6 @@ static int sd_getcontrast(struct gspca_dev *gspca_dev, __s32 *val)
1092 return 0; 1040 return 0;
1093} 1041}
1094 1042
1095static int sd_setredblc(struct gspca_dev *gspca_dev, __s32 val)
1096{
1097 struct sd *sd = (struct sd *) gspca_dev;
1098
1099 sd->redblc = val;
1100 if (gspca_dev->streaming)
1101 setredblc(gspca_dev);
1102 return 0;
1103}
1104
1105static int sd_getredblc(struct gspca_dev *gspca_dev, __s32 *val)
1106{
1107 struct sd *sd = (struct sd *) gspca_dev;
1108
1109 *val = sd->redblc;
1110 return 0;
1111}
1112
1113static int sd_setblueblc(struct gspca_dev *gspca_dev, __s32 val)
1114{
1115 struct sd *sd = (struct sd *) gspca_dev;
1116
1117 sd->blueblc = val;
1118 if (gspca_dev->streaming)
1119 setblueblc(gspca_dev);
1120 return 0;
1121}
1122
1123static int sd_getblueblc(struct gspca_dev *gspca_dev, __s32 *val)
1124{
1125 struct sd *sd = (struct sd *) gspca_dev;
1126
1127 *val = sd->blueblc;
1128 return 0;
1129}
1130
1131static int sd_sethue(struct gspca_dev *gspca_dev, __s32 val) 1043static int sd_sethue(struct gspca_dev *gspca_dev, __s32 val)
1132{ 1044{
1133 struct sd *sd = (struct sd *) gspca_dev; 1045 struct sd *sd = (struct sd *) gspca_dev;