summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video
diff options
context:
space:
mode:
authorJean-Francois Moine <moinejf@free.fr>2008-08-24 16:25:27 +0200
committerJean-Francois Moine <moinejf@free.fr>2008-08-24 16:25:27 +0200
commitd28f838d327d215dec6835dc4fd3debfa1567afe (patch)
treee87a9b1c7d3496c83de590987b21d96cfb909355 /linux/drivers/media/video
parent0cd01f25c07618238bfd4f52346b7073e9500f54 (diff)
downloadmediapointer-dvb-s2-d28f838d327d215dec6835dc4fd3debfa1567afe.tar.gz
mediapointer-dvb-s2-d28f838d327d215dec6835dc4fd3debfa1567afe.tar.bz2
gspca: Change initialization and gamma of zc3xx - pas106.
From: Jean-Francois Moine <moinejf@free.fr> Priority: high Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Diffstat (limited to 'linux/drivers/media/video')
-rw-r--r--linux/drivers/media/video/gspca/pac207.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/linux/drivers/media/video/gspca/pac207.c b/linux/drivers/media/video/gspca/pac207.c
index 620c96316..e6b5c8a5b 100644
--- a/linux/drivers/media/video/gspca/pac207.c
+++ b/linux/drivers/media/video/gspca/pac207.c
@@ -131,7 +131,8 @@ static struct ctrl sd_ctrls[] = {
.minimum = 0,
.maximum = 1,
.step = 1,
- .default_value = 1,
+#define AUTOGAIN_DEF 1
+ .default_value = AUTOGAIN_DEF,
.flags = 0,
},
.set = sd_setautogain,
@@ -256,13 +257,6 @@ static int sd_config(struct gspca_dev *gspca_dev,
return -ENODEV;
}
- pac207_write_reg(gspca_dev, 0x41, 0x00);
- /* Bit_0=Image Format,
- * Bit_1=LED,
- * Bit_2=Compression test mode enable */
- pac207_write_reg(gspca_dev, 0x0f, 0x00); /* Power Control */
- pac207_write_reg(gspca_dev, 0x11, 0x30); /* Analog Bias */
-
PDEBUG(D_PROBE,
"Pixart PAC207BCA Image Processor and Control Chip detected"
" (vid/pid 0x%04X:0x%04X)", id->idVendor, id->idProduct);
@@ -274,6 +268,7 @@ static int sd_config(struct gspca_dev *gspca_dev,
sd->brightness = PAC207_BRIGHTNESS_DEFAULT;
sd->exposure = PAC207_EXPOSURE_DEFAULT;
sd->gain = PAC207_GAIN_DEFAULT;
+ sd->autogain = AUTOGAIN_DEF;
return 0;
}
@@ -281,9 +276,13 @@ static int sd_config(struct gspca_dev *gspca_dev,
/* this function is called at open time */
static int sd_open(struct gspca_dev *gspca_dev)
{
- struct sd *sd = (struct sd *) gspca_dev;
+ pac207_write_reg(gspca_dev, 0x41, 0x00);
+ /* Bit_0=Image Format,
+ * Bit_1=LED,
+ * Bit_2=Compression test mode enable */
+ pac207_write_reg(gspca_dev, 0x0f, 0x00); /* Power Control */
+ pac207_write_reg(gspca_dev, 0x11, 0x30); /* Analog Bias */
- sd->autogain = 1;
return 0;
}