diff options
author | Jean-Francois Moine <moinejf@free.fr> | 2008-09-03 16:12:16 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-09-03 17:37:34 -0400 |
commit | 66e4124f41808b50f6e1b6771621d6c7bf1c34a6 (patch) | |
tree | 5649e1ed0159e8de67f8bbf7fd7f399dd024acbb | |
parent | 4202f71ca1e52d73cab14f3695fdef6b6f010a0b (diff) |
V4L/DVB (8820): gspca: Change initialization and gamma of zc3xx - pas106.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r-- | drivers/media/video/gspca/pac207.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/drivers/media/video/gspca/pac207.c b/drivers/media/video/gspca/pac207.c index 620c9631629e..e6b5c8a5b5d9 100644 --- a/drivers/media/video/gspca/pac207.c +++ b/drivers/media/video/gspca/pac207.c | |||
@@ -131,7 +131,8 @@ static struct ctrl sd_ctrls[] = { | |||
131 | .minimum = 0, | 131 | .minimum = 0, |
132 | .maximum = 1, | 132 | .maximum = 1, |
133 | .step = 1, | 133 | .step = 1, |
134 | .default_value = 1, | 134 | #define AUTOGAIN_DEF 1 |
135 | .default_value = AUTOGAIN_DEF, | ||
135 | .flags = 0, | 136 | .flags = 0, |
136 | }, | 137 | }, |
137 | .set = sd_setautogain, | 138 | .set = sd_setautogain, |
@@ -256,13 +257,6 @@ static int sd_config(struct gspca_dev *gspca_dev, | |||
256 | return -ENODEV; | 257 | return -ENODEV; |
257 | } | 258 | } |
258 | 259 | ||
259 | pac207_write_reg(gspca_dev, 0x41, 0x00); | ||
260 | /* Bit_0=Image Format, | ||
261 | * Bit_1=LED, | ||
262 | * Bit_2=Compression test mode enable */ | ||
263 | pac207_write_reg(gspca_dev, 0x0f, 0x00); /* Power Control */ | ||
264 | pac207_write_reg(gspca_dev, 0x11, 0x30); /* Analog Bias */ | ||
265 | |||
266 | PDEBUG(D_PROBE, | 260 | PDEBUG(D_PROBE, |
267 | "Pixart PAC207BCA Image Processor and Control Chip detected" | 261 | "Pixart PAC207BCA Image Processor and Control Chip detected" |
268 | " (vid/pid 0x%04X:0x%04X)", id->idVendor, id->idProduct); | 262 | " (vid/pid 0x%04X:0x%04X)", id->idVendor, id->idProduct); |
@@ -274,6 +268,7 @@ static int sd_config(struct gspca_dev *gspca_dev, | |||
274 | sd->brightness = PAC207_BRIGHTNESS_DEFAULT; | 268 | sd->brightness = PAC207_BRIGHTNESS_DEFAULT; |
275 | sd->exposure = PAC207_EXPOSURE_DEFAULT; | 269 | sd->exposure = PAC207_EXPOSURE_DEFAULT; |
276 | sd->gain = PAC207_GAIN_DEFAULT; | 270 | sd->gain = PAC207_GAIN_DEFAULT; |
271 | sd->autogain = AUTOGAIN_DEF; | ||
277 | 272 | ||
278 | return 0; | 273 | return 0; |
279 | } | 274 | } |
@@ -281,9 +276,13 @@ static int sd_config(struct gspca_dev *gspca_dev, | |||
281 | /* this function is called at open time */ | 276 | /* this function is called at open time */ |
282 | static int sd_open(struct gspca_dev *gspca_dev) | 277 | static int sd_open(struct gspca_dev *gspca_dev) |
283 | { | 278 | { |
284 | struct sd *sd = (struct sd *) gspca_dev; | 279 | pac207_write_reg(gspca_dev, 0x41, 0x00); |
280 | /* Bit_0=Image Format, | ||
281 | * Bit_1=LED, | ||
282 | * Bit_2=Compression test mode enable */ | ||
283 | pac207_write_reg(gspca_dev, 0x0f, 0x00); /* Power Control */ | ||
284 | pac207_write_reg(gspca_dev, 0x11, 0x30); /* Analog Bias */ | ||
285 | 285 | ||
286 | sd->autogain = 1; | ||
287 | return 0; | 286 | return 0; |
288 | } | 287 | } |
289 | 288 | ||