Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 109569
b: refs/heads/master
c: 66e4124
h: refs/heads/master
i:
  109567: f2cb472
v: v3
  • Loading branch information
Jean-Francois Moine authored and Mauro Carvalho Chehab committed Sep 3, 2008
1 parent 4a55daf commit 132df6c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4202f71ca1e52d73cab14f3695fdef6b6f010a0b
refs/heads/master: 66e4124f41808b50f6e1b6771621d6c7bf1c34a6
19 changes: 9 additions & 10 deletions trunk/drivers/media/video/gspca/pac207.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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);
Expand All @@ -274,16 +268,21 @@ 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;
}

/* 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;
}

Expand Down

0 comments on commit 132df6c

Please sign in to comment.