aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJean-Francois Moine <moinejf@free.fr>2010-01-07 13:59:12 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-02-26 13:10:31 -0500
commit47c833923746decdef557d22e720ba14c81f375c (patch)
tree3421874cb80d457ac4f4dbe17fa873bde6a5f1fe /drivers
parent5599678c703e369fd50105aa60d112bcfd8f186f (diff)
V4L/DVB (13917): gspca - zc3xx: Cleanup code.
- update copyright and module author - change __u8/16 to u8/16 - set unsigned the sd sensor - initialize the controls by macros Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/video/gspca/zc3xx.c130
1 files changed, 64 insertions, 66 deletions
diff --git a/drivers/media/video/gspca/zc3xx.c b/drivers/media/video/gspca/zc3xx.c
index bdab8c4d8ac..345f81698a6 100644
--- a/drivers/media/video/gspca/zc3xx.c
+++ b/drivers/media/video/gspca/zc3xx.c
@@ -1,9 +1,8 @@
1/* 1/*
2 * Z-Star/Vimicro zc301/zc302p/vc30x library 2 * Z-Star/Vimicro zc301/zc302p/vc30x library
3 * Copyright (C) 2004 2005 2006 Michel Xhaard
4 * mxhaard@magic.fr
5 * 3 *
6 * V4L2 by Jean-Francois Moine <http://moinejf.free.fr> 4 * Copyright (C) 2009-2010 Jean-Francois Moine <http://moinejf.free.fr>
5 * Copyright (C) 2004 2005 2006 Michel Xhaard mxhaard@magic.fr
7 * 6 *
8 * This program is free software; you can redistribute it and/or modify 7 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by 8 * it under the terms of the GNU General Public License as published by
@@ -25,7 +24,7 @@
25#include "gspca.h" 24#include "gspca.h"
26#include "jpeg.h" 25#include "jpeg.h"
27 26
28MODULE_AUTHOR("Michel Xhaard <mxhaard@users.sourceforge.net>, " 27MODULE_AUTHOR("Jean-Francois Moine <http://moinejf.free.fr>, "
29 "Serge A. Suchkov <Serge.A.S@tochka.ru>"); 28 "Serge A. Suchkov <Serge.A.S@tochka.ru>");
30MODULE_DESCRIPTION("GSPCA ZC03xx/VC3xx USB Camera Driver"); 29MODULE_DESCRIPTION("GSPCA ZC03xx/VC3xx USB Camera Driver");
31MODULE_LICENSE("GPL"); 30MODULE_LICENSE("GPL");
@@ -39,18 +38,18 @@ static int force_sensor = -1;
39struct sd { 38struct sd {
40 struct gspca_dev gspca_dev; /* !! must be the first item */ 39 struct gspca_dev gspca_dev; /* !! must be the first item */
41 40
42 __u8 brightness; 41 u8 brightness;
43 __u8 contrast; 42 u8 contrast;
44 __u8 gamma; 43 u8 gamma;
45 __u8 autogain; 44 u8 autogain;
46 __u8 lightfreq; 45 u8 lightfreq;
47 __u8 sharpness; 46 u8 sharpness;
48 u8 quality; /* image quality */ 47 u8 quality; /* image quality */
49#define QUALITY_MIN 40 48#define QUALITY_MIN 40
50#define QUALITY_MAX 60 49#define QUALITY_MAX 60
51#define QUALITY_DEF 50 50#define QUALITY_DEF 50
52 51
53 signed char sensor; /* Type of image sensor chip */ 52 u8 sensor; /* Type of image sensor chip */
54/* !! values used in different tables */ 53/* !! values used in different tables */
55#define SENSOR_ADCM2700 0 54#define SENSOR_ADCM2700 0
56#define SENSOR_CS2102 1 55#define SENSOR_CS2102 1
@@ -94,7 +93,6 @@ static int sd_getsharpness(struct gspca_dev *gspca_dev, __s32 *val);
94 93
95static const struct ctrl sd_ctrls[] = { 94static const struct ctrl sd_ctrls[] = {
96#define BRIGHTNESS_IDX 0 95#define BRIGHTNESS_IDX 0
97#define SD_BRIGHTNESS 0
98 { 96 {
99 { 97 {
100 .id = V4L2_CID_BRIGHTNESS, 98 .id = V4L2_CID_BRIGHTNESS,
@@ -103,12 +101,12 @@ static const struct ctrl sd_ctrls[] = {
103 .minimum = 0, 101 .minimum = 0,
104 .maximum = 255, 102 .maximum = 255,
105 .step = 1, 103 .step = 1,
106 .default_value = 128, 104#define BRIGHTNESS_DEF 128
105 .default_value = BRIGHTNESS_DEF,
107 }, 106 },
108 .set = sd_setbrightness, 107 .set = sd_setbrightness,
109 .get = sd_getbrightness, 108 .get = sd_getbrightness,
110 }, 109 },
111#define SD_CONTRAST 1
112 { 110 {
113 { 111 {
114 .id = V4L2_CID_CONTRAST, 112 .id = V4L2_CID_CONTRAST,
@@ -117,12 +115,12 @@ static const struct ctrl sd_ctrls[] = {
117 .minimum = 0, 115 .minimum = 0,
118 .maximum = 255, 116 .maximum = 255,
119 .step = 1, 117 .step = 1,
120 .default_value = 128, 118#define CONTRAST_DEF 128
119 .default_value = CONTRAST_DEF,
121 }, 120 },
122 .set = sd_setcontrast, 121 .set = sd_setcontrast,
123 .get = sd_getcontrast, 122 .get = sd_getcontrast,
124 }, 123 },
125#define SD_GAMMA 2
126 { 124 {
127 { 125 {
128 .id = V4L2_CID_GAMMA, 126 .id = V4L2_CID_GAMMA,
@@ -136,7 +134,6 @@ static const struct ctrl sd_ctrls[] = {
136 .set = sd_setgamma, 134 .set = sd_setgamma,
137 .get = sd_getgamma, 135 .get = sd_getgamma,
138 }, 136 },
139#define SD_AUTOGAIN 3
140 { 137 {
141 { 138 {
142 .id = V4L2_CID_AUTOGAIN, 139 .id = V4L2_CID_AUTOGAIN,
@@ -145,13 +142,13 @@ static const struct ctrl sd_ctrls[] = {
145 .minimum = 0, 142 .minimum = 0,
146 .maximum = 1, 143 .maximum = 1,
147 .step = 1, 144 .step = 1,
148 .default_value = 1, 145#define AUTOGAIN_DEF 1
146 .default_value = AUTOGAIN_DEF,
149 }, 147 },
150 .set = sd_setautogain, 148 .set = sd_setautogain,
151 .get = sd_getautogain, 149 .get = sd_getautogain,
152 }, 150 },
153#define LIGHTFREQ_IDX 4 151#define LIGHTFREQ_IDX 4
154#define SD_FREQ 4
155 { 152 {
156 { 153 {
157 .id = V4L2_CID_POWER_LINE_FREQUENCY, 154 .id = V4L2_CID_POWER_LINE_FREQUENCY,
@@ -160,12 +157,12 @@ static const struct ctrl sd_ctrls[] = {
160 .minimum = 0, 157 .minimum = 0,
161 .maximum = 2, /* 0: 0, 1: 50Hz, 2:60Hz */ 158 .maximum = 2, /* 0: 0, 1: 50Hz, 2:60Hz */
162 .step = 1, 159 .step = 1,
163 .default_value = 1, 160#define FREQ_DEF 0
161 .default_value = FREQ_DEF,
164 }, 162 },
165 .set = sd_setfreq, 163 .set = sd_setfreq,
166 .get = sd_getfreq, 164 .get = sd_getfreq,
167 }, 165 },
168#define SD_SHARPNESS 5
169 { 166 {
170 { 167 {
171 .id = V4L2_CID_SHARPNESS, 168 .id = V4L2_CID_SHARPNESS,
@@ -174,7 +171,8 @@ static const struct ctrl sd_ctrls[] = {
174 .minimum = 0, 171 .minimum = 0,
175 .maximum = 3, 172 .maximum = 3,
176 .step = 1, 173 .step = 1,
177 .default_value = 2, 174#define SHARPNESS_DEF 2
175 .default_value = SHARPNESS_DEF,
178 }, 176 },
179 .set = sd_setsharpness, 177 .set = sd_setsharpness,
180 .get = sd_getsharpness, 178 .get = sd_getsharpness,
@@ -209,9 +207,9 @@ static const struct v4l2_pix_format sif_mode[] = {
209 207
210/* usb exchanges */ 208/* usb exchanges */
211struct usb_action { 209struct usb_action {
212 __u8 req; 210 u8 req;
213 __u8 val; 211 u8 val;
214 __u16 idx; 212 u16 idx;
215}; 213};
216 214
217static const struct usb_action adcm2700_Initial[] = { 215static const struct usb_action adcm2700_Initial[] = {
@@ -5841,7 +5839,7 @@ static const struct usb_action tas5130c_vf0250_NoFlikerScale[] = {
5841}; 5839};
5842 5840
5843static u8 reg_r_i(struct gspca_dev *gspca_dev, 5841static u8 reg_r_i(struct gspca_dev *gspca_dev,
5844 __u16 index) 5842 u16 index)
5845{ 5843{
5846 usb_control_msg(gspca_dev->dev, 5844 usb_control_msg(gspca_dev->dev,
5847 usb_rcvctrlpipe(gspca_dev->dev, 0), 5845 usb_rcvctrlpipe(gspca_dev->dev, 0),
@@ -5854,7 +5852,7 @@ static u8 reg_r_i(struct gspca_dev *gspca_dev,
5854} 5852}
5855 5853
5856static u8 reg_r(struct gspca_dev *gspca_dev, 5854static u8 reg_r(struct gspca_dev *gspca_dev,
5857 __u16 index) 5855 u16 index)
5858{ 5856{
5859 u8 ret; 5857 u8 ret;
5860 5858
@@ -5864,8 +5862,8 @@ static u8 reg_r(struct gspca_dev *gspca_dev,
5864} 5862}
5865 5863
5866static void reg_w_i(struct usb_device *dev, 5864static void reg_w_i(struct usb_device *dev,
5867 __u8 value, 5865 u8 value,
5868 __u16 index) 5866 u16 index)
5869{ 5867{
5870 usb_control_msg(dev, 5868 usb_control_msg(dev,
5871 usb_sndctrlpipe(dev, 0), 5869 usb_sndctrlpipe(dev, 0),
@@ -5876,18 +5874,18 @@ static void reg_w_i(struct usb_device *dev,
5876} 5874}
5877 5875
5878static void reg_w(struct usb_device *dev, 5876static void reg_w(struct usb_device *dev,
5879 __u8 value, 5877 u8 value,
5880 __u16 index) 5878 u16 index)
5881{ 5879{
5882 PDEBUG(D_USBO, "reg w [%04x] = %02x", index, value); 5880 PDEBUG(D_USBO, "reg w [%04x] = %02x", index, value);
5883 reg_w_i(dev, value, index); 5881 reg_w_i(dev, value, index);
5884} 5882}
5885 5883
5886static __u16 i2c_read(struct gspca_dev *gspca_dev, 5884static u16 i2c_read(struct gspca_dev *gspca_dev,
5887 __u8 reg) 5885 u8 reg)
5888{ 5886{
5889 __u8 retbyte; 5887 u8 retbyte;
5890 __u16 retval; 5888 u16 retval;
5891 5889
5892 reg_w_i(gspca_dev->dev, reg, 0x0092); 5890 reg_w_i(gspca_dev->dev, reg, 0x0092);
5893 reg_w_i(gspca_dev->dev, 0x02, 0x0090); /* <- read command */ 5891 reg_w_i(gspca_dev->dev, 0x02, 0x0090); /* <- read command */
@@ -5902,12 +5900,12 @@ static __u16 i2c_read(struct gspca_dev *gspca_dev,
5902 return retval; 5900 return retval;
5903} 5901}
5904 5902
5905static __u8 i2c_write(struct gspca_dev *gspca_dev, 5903static u8 i2c_write(struct gspca_dev *gspca_dev,
5906 __u8 reg, 5904 u8 reg,
5907 __u8 valL, 5905 u8 valL,
5908 __u8 valH) 5906 u8 valH)
5909{ 5907{
5910 __u8 retbyte; 5908 u8 retbyte;
5911 5909
5912 reg_w_i(gspca_dev->dev, reg, 0x92); 5910 reg_w_i(gspca_dev->dev, reg, 0x92);
5913 reg_w_i(gspca_dev->dev, valL, 0x93); 5911 reg_w_i(gspca_dev->dev, valL, 0x93);
@@ -5959,24 +5957,24 @@ static void setmatrix(struct gspca_dev *gspca_dev)
5959{ 5957{
5960 struct sd *sd = (struct sd *) gspca_dev; 5958 struct sd *sd = (struct sd *) gspca_dev;
5961 int i; 5959 int i;
5962 const __u8 *matrix; 5960 const u8 *matrix;
5963 static const u8 adcm2700_matrix[9] = 5961 static const u8 adcm2700_matrix[9] =
5964/* {0x66, 0xed, 0xed, 0xed, 0x66, 0xed, 0xed, 0xed, 0x66}; */ 5962/* {0x66, 0xed, 0xed, 0xed, 0x66, 0xed, 0xed, 0xed, 0x66}; */
5965/*ms-win*/ 5963/*ms-win*/
5966 {0x74, 0xed, 0xed, 0xed, 0x74, 0xed, 0xed, 0xed, 0x74}; 5964 {0x74, 0xed, 0xed, 0xed, 0x74, 0xed, 0xed, 0xed, 0x74};
5967 static const __u8 gc0305_matrix[9] = 5965 static const u8 gc0305_matrix[9] =
5968 {0x50, 0xf8, 0xf8, 0xf8, 0x50, 0xf8, 0xf8, 0xf8, 0x50}; 5966 {0x50, 0xf8, 0xf8, 0xf8, 0x50, 0xf8, 0xf8, 0xf8, 0x50};
5969 static const __u8 ov7620_matrix[9] = 5967 static const u8 ov7620_matrix[9] =
5970 {0x58, 0xf4, 0xf4, 0xf4, 0x58, 0xf4, 0xf4, 0xf4, 0x58}; 5968 {0x58, 0xf4, 0xf4, 0xf4, 0x58, 0xf4, 0xf4, 0xf4, 0x58};
5971 static const __u8 pas202b_matrix[9] = 5969 static const u8 pas202b_matrix[9] =
5972 {0x4c, 0xf5, 0xff, 0xf9, 0x51, 0xf5, 0xfb, 0xed, 0x5f}; 5970 {0x4c, 0xf5, 0xff, 0xf9, 0x51, 0xf5, 0xfb, 0xed, 0x5f};
5973 static const __u8 po2030_matrix[9] = 5971 static const u8 po2030_matrix[9] =
5974 {0x60, 0xf0, 0xf0, 0xf0, 0x60, 0xf0, 0xf0, 0xf0, 0x60}; 5972 {0x60, 0xf0, 0xf0, 0xf0, 0x60, 0xf0, 0xf0, 0xf0, 0x60};
5975 static const u8 tas5130c_matrix[9] = 5973 static const u8 tas5130c_matrix[9] =
5976 {0x68, 0xec, 0xec, 0xec, 0x68, 0xec, 0xec, 0xec, 0x68}; 5974 {0x68, 0xec, 0xec, 0xec, 0x68, 0xec, 0xec, 0xec, 0x68};
5977 static const __u8 vf0250_matrix[9] = 5975 static const u8 vf0250_matrix[9] =
5978 {0x7b, 0xea, 0xea, 0xea, 0x7b, 0xea, 0xea, 0xea, 0x7b}; 5976 {0x7b, 0xea, 0xea, 0xea, 0x7b, 0xea, 0xea, 0xea, 0x7b};
5979 static const __u8 *matrix_tb[SENSOR_MAX] = { 5977 static const u8 *matrix_tb[SENSOR_MAX] = {
5980 adcm2700_matrix, /* SENSOR_ADCM2700 0 */ 5978 adcm2700_matrix, /* SENSOR_ADCM2700 0 */
5981 ov7620_matrix, /* SENSOR_CS2102 1 */ 5979 ov7620_matrix, /* SENSOR_CS2102 1 */
5982 NULL, /* SENSOR_CS2102K 2 */ 5980 NULL, /* SENSOR_CS2102K 2 */
@@ -6008,7 +6006,7 @@ static void setmatrix(struct gspca_dev *gspca_dev)
6008static void setbrightness(struct gspca_dev *gspca_dev) 6006static void setbrightness(struct gspca_dev *gspca_dev)
6009{ 6007{
6010 struct sd *sd = (struct sd *) gspca_dev; 6008 struct sd *sd = (struct sd *) gspca_dev;
6011 __u8 brightness; 6009 u8 brightness;
6012 6010
6013 switch (sd->sensor) { 6011 switch (sd->sensor) {
6014 case SENSOR_GC0305: 6012 case SENSOR_GC0305:
@@ -6037,7 +6035,7 @@ static void setsharpness(struct gspca_dev *gspca_dev)
6037 struct sd *sd = (struct sd *) gspca_dev; 6035 struct sd *sd = (struct sd *) gspca_dev;
6038 struct usb_device *dev = gspca_dev->dev; 6036 struct usb_device *dev = gspca_dev->dev;
6039 int sharpness; 6037 int sharpness;
6040 static const __u8 sharpness_tb[][2] = { 6038 static const u8 sharpness_tb[][2] = {
6041 {0x02, 0x03}, 6039 {0x02, 0x03},
6042 {0x04, 0x07}, 6040 {0x04, 0x07},
6043 {0x08, 0x0f}, 6041 {0x08, 0x0f},
@@ -6056,7 +6054,7 @@ static void setcontrast(struct gspca_dev *gspca_dev)
6056{ 6054{
6057 struct sd *sd = (struct sd *) gspca_dev; 6055 struct sd *sd = (struct sd *) gspca_dev;
6058 struct usb_device *dev = gspca_dev->dev; 6056 struct usb_device *dev = gspca_dev->dev;
6059 const __u8 *Tgamma; 6057 const u8 *Tgamma;
6060 int g, i, k, adj, gp; 6058 int g, i, k, adj, gp;
6061 u8 gr[16]; 6059 u8 gr[16];
6062 static const u8 delta_tb[16] = /* delta for contrast */ 6060 static const u8 delta_tb[16] = /* delta for contrast */
@@ -6111,7 +6109,7 @@ static void setquality(struct gspca_dev *gspca_dev)
6111{ 6109{
6112 struct sd *sd = (struct sd *) gspca_dev; 6110 struct sd *sd = (struct sd *) gspca_dev;
6113 struct usb_device *dev = gspca_dev->dev; 6111 struct usb_device *dev = gspca_dev->dev;
6114 __u8 frxt; 6112 u8 frxt;
6115 6113
6116 switch (sd->sensor) { 6114 switch (sd->sensor) {
6117 case SENSOR_ADCM2700: 6115 case SENSOR_ADCM2700:
@@ -6233,7 +6231,7 @@ static int setlightfreq(struct gspca_dev *gspca_dev)
6233 mode = gspca_dev->cam.cam_mode[(int) gspca_dev->curr_mode].priv; 6231 mode = gspca_dev->cam.cam_mode[(int) gspca_dev->curr_mode].priv;
6234 if (!mode) 6232 if (!mode)
6235 i++; /* 640x480 */ 6233 i++; /* 640x480 */
6236 zc3_freq = freq_tb[(int) sd->sensor][i]; 6234 zc3_freq = freq_tb[sd->sensor][i];
6237 if (zc3_freq != NULL) { 6235 if (zc3_freq != NULL) {
6238 usb_exchange(gspca_dev, zc3_freq); 6236 usb_exchange(gspca_dev, zc3_freq);
6239 switch (sd->sensor) { 6237 switch (sd->sensor) {
@@ -6262,7 +6260,7 @@ static int setlightfreq(struct gspca_dev *gspca_dev)
6262static void setautogain(struct gspca_dev *gspca_dev) 6260static void setautogain(struct gspca_dev *gspca_dev)
6263{ 6261{
6264 struct sd *sd = (struct sd *) gspca_dev; 6262 struct sd *sd = (struct sd *) gspca_dev;
6265 __u8 autoval; 6263 u8 autoval;
6266 6264
6267 if (sd->autogain) 6265 if (sd->autogain)
6268 autoval = 0x42; 6266 autoval = 0x42;
@@ -6312,7 +6310,7 @@ static void start_2wr_probe(struct usb_device *dev, int sensor)
6312 6310
6313static int sif_probe(struct gspca_dev *gspca_dev) 6311static int sif_probe(struct gspca_dev *gspca_dev)
6314{ 6312{
6315 __u16 checkword; 6313 u16 checkword;
6316 6314
6317 start_2wr_probe(gspca_dev->dev, 0x0f); /* PAS106 */ 6315 start_2wr_probe(gspca_dev->dev, 0x0f); /* PAS106 */
6318 reg_w(gspca_dev->dev, 0x08, 0x008d); 6316 reg_w(gspca_dev->dev, 0x08, 0x008d);
@@ -6422,8 +6420,8 @@ ov_check:
6422} 6420}
6423 6421
6424struct sensor_by_chipset_revision { 6422struct sensor_by_chipset_revision {
6425 __u16 revision; 6423 u16 revision;
6426 __u8 internal_sensor_id; 6424 u8 internal_sensor_id;
6427}; 6425};
6428static const struct sensor_by_chipset_revision chipset_revision_sensor[] = { 6426static const struct sensor_by_chipset_revision chipset_revision_sensor[] = {
6429 {0xc000, 0x12}, /* TAS5130C */ 6427 {0xc000, 0x12}, /* TAS5130C */
@@ -6440,7 +6438,7 @@ static int vga_3wr_probe(struct gspca_dev *gspca_dev)
6440 struct sd *sd = (struct sd *) gspca_dev; 6438 struct sd *sd = (struct sd *) gspca_dev;
6441 struct usb_device *dev = gspca_dev->dev; 6439 struct usb_device *dev = gspca_dev->dev;
6442 int i; 6440 int i;
6443 __u8 retbyte; 6441 u8 retbyte;
6444 u16 retword; 6442 u16 retword;
6445 6443
6446/*fixme: lack of 8b=b3 (11,12)-> 10, 8b=e0 (14,15,16)-> 12 found in gspcav1*/ 6444/*fixme: lack of 8b=b3 (11,12)-> 10, 8b=e0 (14,15,16)-> 12 found in gspcav1*/
@@ -6589,7 +6587,7 @@ static int sd_config(struct gspca_dev *gspca_dev,
6589 struct cam *cam; 6587 struct cam *cam;
6590 int sensor; 6588 int sensor;
6591 int vga = 1; /* 1: vga, 0: sif */ 6589 int vga = 1; /* 1: vga, 0: sif */
6592 static const __u8 gamma[SENSOR_MAX] = { 6590 static const u8 gamma[SENSOR_MAX] = {
6593 4, /* SENSOR_ADCM2700 0 */ 6591 4, /* SENSOR_ADCM2700 0 */
6594 4, /* SENSOR_CS2102 1 */ 6592 4, /* SENSOR_CS2102 1 */
6595 5, /* SENSOR_CS2102K 2 */ 6593 5, /* SENSOR_CS2102K 2 */
@@ -6612,7 +6610,7 @@ static int sd_config(struct gspca_dev *gspca_dev,
6612 }; 6610 };
6613 6611
6614 /* define some sensors from the vendor/product */ 6612 /* define some sensors from the vendor/product */
6615 sd->sharpness = 2; 6613 sd->sharpness = SHARPNESS_DEF;
6616 sd->sensor = id->driver_info; 6614 sd->sensor = id->driver_info;
6617 sensor = zcxx_probeSensor(gspca_dev); 6615 sensor = zcxx_probeSensor(gspca_dev);
6618 if (sensor >= 0) 6616 if (sensor >= 0)
@@ -6764,11 +6762,11 @@ static int sd_config(struct gspca_dev *gspca_dev,
6764 cam->cam_mode = sif_mode; 6762 cam->cam_mode = sif_mode;
6765 cam->nmodes = ARRAY_SIZE(sif_mode); 6763 cam->nmodes = ARRAY_SIZE(sif_mode);
6766 } 6764 }
6767 sd->brightness = sd_ctrls[SD_BRIGHTNESS].qctrl.default_value; 6765 sd->brightness = BRIGHTNESS_DEF;
6768 sd->contrast = sd_ctrls[SD_CONTRAST].qctrl.default_value; 6766 sd->contrast = CONTRAST_DEF;
6769 sd->gamma = gamma[(int) sd->sensor]; 6767 sd->gamma = gamma[sd->sensor];
6770 sd->autogain = sd_ctrls[SD_AUTOGAIN].qctrl.default_value; 6768 sd->autogain = AUTOGAIN_DEF;
6771 sd->lightfreq = sd_ctrls[SD_FREQ].qctrl.default_value; 6769 sd->lightfreq = FREQ_DEF;
6772 sd->quality = QUALITY_DEF; 6770 sd->quality = QUALITY_DEF;
6773 6771
6774 switch (sd->sensor) { 6772 switch (sd->sensor) {
@@ -6835,7 +6833,7 @@ static int sd_start(struct gspca_dev *gspca_dev)
6835 jpeg_set_qual(sd->jpeg_hdr, sd->quality); 6833 jpeg_set_qual(sd->jpeg_hdr, sd->quality);
6836 6834
6837 mode = gspca_dev->cam.cam_mode[(int) gspca_dev->curr_mode].priv; 6835 mode = gspca_dev->cam.cam_mode[(int) gspca_dev->curr_mode].priv;
6838 zc3_init = init_tb[(int) sd->sensor][mode]; 6836 zc3_init = init_tb[sd->sensor][mode];
6839 switch (sd->sensor) { 6837 switch (sd->sensor) {
6840 case SENSOR_HV7131C: 6838 case SENSOR_HV7131C:
6841 zcxx_probeSensor(gspca_dev); 6839 zcxx_probeSensor(gspca_dev);