diff options
author | Hans de Goede <hdegoede@redhat.com> | 2012-01-01 11:45:43 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-01-06 07:40:54 -0500 |
commit | 0218d53a12a1b90d261b6f9cf0a4cee38d230916 (patch) | |
tree | a8506abeb6413308ce21bc23f7753df932e64394 /drivers/media | |
parent | 4d6454dbae935825e729f34dc7410bb1b22c7944 (diff) |
[media] gscpa_ov519: Fix the bandwidth calc for enabling compression
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>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/video/gspca/ov519.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/video/gspca/ov519.c b/drivers/media/video/gspca/ov519.c index 3d68ad5015d5..1075668db296 100644 --- a/drivers/media/video/gspca/ov519.c +++ b/drivers/media/video/gspca/ov519.c | |||
@@ -3683,8 +3683,8 @@ static void ov511_mode_init_regs(struct sd *sd) | |||
3683 | /* Check if we have enough bandwidth to disable compression */ | 3683 | /* Check if we have enough bandwidth to disable compression */ |
3684 | fps = (interlaced ? 60 : 30) / (sd->clockdiv + 1) + 1; | 3684 | fps = (interlaced ? 60 : 30) / (sd->clockdiv + 1) + 1; |
3685 | needed = fps * sd->gspca_dev.width * sd->gspca_dev.height * 3 / 2; | 3685 | needed = fps * sd->gspca_dev.width * sd->gspca_dev.height * 3 / 2; |
3686 | /* 1400 is a conservative estimate of the max nr of isoc packets/sec */ | 3686 | /* 1000 isoc packets/sec */ |
3687 | if (needed > 1400 * packet_size) { | 3687 | if (needed > 1000 * packet_size) { |
3688 | /* Enable Y and UV quantization and compression */ | 3688 | /* Enable Y and UV quantization and compression */ |
3689 | reg_w(sd, R511_COMP_EN, 0x07); | 3689 | reg_w(sd, R511_COMP_EN, 0x07); |
3690 | reg_w(sd, R511_COMP_LUT_EN, 0x03); | 3690 | reg_w(sd, R511_COMP_LUT_EN, 0x03); |