Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 109573
b: refs/heads/master
c: 8a5b2e9
h: refs/heads/master
i:
  109571: 3f2b56f
v: v3
  • Loading branch information
Hans de Goede authored and Mauro Carvalho Chehab committed Sep 3, 2008
1 parent 29724ad commit a07f600
Show file tree
Hide file tree
Showing 5 changed files with 233 additions and 96 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: a1e8288b1d80130119692818b46694660f28e03a
refs/heads/master: 8a5b2e909d56a1d5edec5e8f8848e03aafbc588e
1 change: 1 addition & 0 deletions trunk/Documentation/video4linux/gspca.txt
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ pac7311 093a:2608 Trust WB-3300p
pac7311 093a:260e Gigaware VGA PC Camera, Trust WB-3350p, SIGMA cam 2350
pac7311 093a:260f SnakeCam
pac7311 093a:2621 PAC731x
pac7311 093a:2624 PAC7302
zc3xx 0ac8:0302 Z-star Vimicro zc0302
vc032x 0ac8:0321 Vimicro generic vc0321
vc032x 0ac8:0323 Vimicro Vc0323
Expand Down
16 changes: 5 additions & 11 deletions trunk/drivers/media/video/gspca/pac207.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,6 @@ MODULE_LICENSE("GPL");
#define PAC207_GAIN_KNEE 20

#define PAC207_AUTOGAIN_DEADZONE 30
/* We calculating the autogain at the end of the transfer of a frame, at this
moment a frame with the old settings is being transmitted, and a frame is
being captured with the old settings. So if we adjust the autogain we must
ignore atleast the 2 next frames for the new settings to come into effect
before doing any other adjustments */
#define PAC207_AUTOGAIN_IGNORE_FRAMES 3

/* specific webcam descriptor */
struct sd {
Expand Down Expand Up @@ -338,6 +332,9 @@ static void sd_stopN(struct gspca_dev *gspca_dev)
pac207_write_reg(gspca_dev, 0x0f, 0x00); /* Power Control */
}

/* Include pac common sof detection functions */
#include "pac_common.h"

static void pac207_do_auto_gain(struct gspca_dev *gspca_dev)
{
struct sd *sd = (struct sd *) gspca_dev;
Expand All @@ -351,12 +348,9 @@ static void pac207_do_auto_gain(struct gspca_dev *gspca_dev)
else if (gspca_auto_gain_n_exposure(gspca_dev, avg_lum,
100 + sd->brightness / 2, PAC207_AUTOGAIN_DEADZONE,
PAC207_GAIN_KNEE, PAC207_EXPOSURE_KNEE))
sd->autogain_ignore_frames = PAC207_AUTOGAIN_IGNORE_FRAMES;
sd->autogain_ignore_frames = PAC_AUTOGAIN_IGNORE_FRAMES;
}

/* Include pac common sof detection functions */
#include "pac_common.h"

static void sd_pkt_scan(struct gspca_dev *gspca_dev,
struct gspca_frame *frame,
__u8 *data,
Expand Down Expand Up @@ -500,7 +494,7 @@ static int sd_setautogain(struct gspca_dev *gspca_dev, __s32 val)
sd->gain = PAC207_GAIN_DEFAULT;
if (gspca_dev->streaming) {
sd->autogain_ignore_frames =
PAC207_AUTOGAIN_IGNORE_FRAMES;
PAC_AUTOGAIN_IGNORE_FRAMES;
setexposure(gspca_dev);
setgain(gspca_dev);
}
Expand Down
Loading

0 comments on commit a07f600

Please sign in to comment.