Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 285685
b: refs/heads/master
c: eb3fb7c
h: refs/heads/master
i:
  285683: 90b9a14
v: v3
  • Loading branch information
Hans de Goede authored and Mauro Carvalho Chehab committed Jan 6, 2012
1 parent 48c83ff commit 5f7f65f
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 2 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: 51e23be28418cf836287615cf78b237af13ea1b3
refs/heads/master: eb3fb7c9633f79077c7c650efe0edec1840926da
3 changes: 2 additions & 1 deletion trunk/drivers/media/video/gspca/gspca.c
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,8 @@ static u32 which_bandwidth(struct gspca_dev *gspca_dev)
bandwidth = gspca_dev->cam.cam_mode[i].sizeimage;

/* if the image is compressed, estimate its mean size */
if (bandwidth < gspca_dev->cam.cam_mode[i].width *
if (!gspca_dev->cam.needs_full_bandwidth &&
bandwidth < gspca_dev->cam.cam_mode[i].width *
gspca_dev->cam.cam_mode[i].height)
bandwidth = bandwidth * 3 / 8; /* 0.375 */

Expand Down
3 changes: 3 additions & 0 deletions trunk/drivers/media/video/gspca/gspca.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ struct cam {
u8 bulk; /* image transfer by 0:isoc / 1:bulk */
u8 npkt; /* number of packets in an ISOC message
* 0 is the default value: 32 packets */
u8 needs_full_bandwidth;/* Set this flag to notify the bandwidth calc.
* code that the cam fills all image buffers to
* the max, even when using compression. */
};

struct gspca_dev;
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/media/video/gspca/nw80x.c
Original file line number Diff line number Diff line change
Expand Up @@ -1764,6 +1764,7 @@ static int sd_config(struct gspca_dev *gspca_dev,
webcam = 0;
sd->webcam = webcam;
gspca_dev->cam.ctrls = sd->ctrls;
gspca_dev->cam.needs_full_bandwidth = 1;
sd->ag_cnt = -1;

/*
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/media/video/gspca/sn9c20x.c
Original file line number Diff line number Diff line change
Expand Up @@ -2048,6 +2048,7 @@ static int sd_config(struct gspca_dev *gspca_dev,
struct cam *cam;

cam = &gspca_dev->cam;
cam->needs_full_bandwidth = 1;

sd->sensor = (id->driver_info >> 8) & 0xff;
sd->i2c_addr = id->driver_info & 0xff;
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/media/video/gspca/spca561.c
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,7 @@ static int sd_config(struct gspca_dev *gspca_dev,
}

cam = &gspca_dev->cam;
cam->needs_full_bandwidth = 1;

sd->chip_revision = id->driver_info;
if (sd->chip_revision == Rev012A) {
Expand Down

0 comments on commit 5f7f65f

Please sign in to comment.