Skip to content

Commit

Permalink
[media] gscpa_ov519: Fix the bandwidth calc for enabling compression
Browse files Browse the repository at this point in the history
Somehow the code has ended up assuming 1400 packets/sec which of course
is wrong for usb1 devices like the ov511 cameras. usb1 only does 1000
(isoc) packets / sec.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Hans de Goede authored and Mauro Carvalho Chehab committed Jan 6, 2012
1 parent 4d6454d commit 0218d53
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/media/video/gspca/ov519.c
Original file line number Diff line number Diff line change
Expand Up @@ -3683,8 +3683,8 @@ static void ov511_mode_init_regs(struct sd *sd)
/* Check if we have enough bandwidth to disable compression */
fps = (interlaced ? 60 : 30) / (sd->clockdiv + 1) + 1;
needed = fps * sd->gspca_dev.width * sd->gspca_dev.height * 3 / 2;
/* 1400 is a conservative estimate of the max nr of isoc packets/sec */
if (needed > 1400 * packet_size) {
/* 1000 isoc packets/sec */
if (needed > 1000 * packet_size) {
/* Enable Y and UV quantization and compression */
reg_w(sd, R511_COMP_EN, 0x07);
reg_w(sd, R511_COMP_LUT_EN, 0x03);
Expand Down

0 comments on commit 0218d53

Please sign in to comment.