summaryrefslogtreecommitdiffstats
path: root/drivers/media/video/gspca/stv06xx/stv06xx_sensor.h
diff options
context:
space:
mode:
authorHans de Goede2010-10-27 14:12:30 +0200
committerMauro Carvalho Chehab2010-12-29 11:16:40 +0100
commitc0b33bdc5b8d9c1120dece660480d4dd86b817ee (patch)
treeebcc92bf6b05336943b9268337ea3d994af4ca43 /drivers/media/video/gspca/stv06xx/stv06xx_sensor.h
parent[media] saa7164: Checkpatch compliance cleanup (diff)
downloadkernel-qcow2-linux-c0b33bdc5b8d9c1120dece660480d4dd86b817ee.tar.gz
kernel-qcow2-linux-c0b33bdc5b8d9c1120dece660480d4dd86b817ee.tar.xz
kernel-qcow2-linux-c0b33bdc5b8d9c1120dece660480d4dd86b817ee.zip
[media] gspca-stv06xx: support bandwidth changing
stv06xx devices have only one altsetting, but the actual used bandwidth can be programmed through a register. We were already setting this register lower then the max packetsize of the altsetting indicates. This patch makes the gspca-stv06xx update the usb descriptor for the alt setting to reflect the actual packetsize in use, so that the usb subsystem uses the correct information for scheduling usb transfers. This patch also tries to fallback to lower speeds in case a ENOSPC error is received when submitting urbs, but currently this is only supported with stv06xx cams with the pb0100 sensor, as this is the only one for which we know how to change the framerate. This patch is based on an initial incomplete patch by Lee Jones <lee.jones@canonical.com> Signed-off-by: Lee Jones <lee.jones@canonical.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/gspca/stv06xx/stv06xx_sensor.h')
-rw-r--r--drivers/media/video/gspca/stv06xx/stv06xx_sensor.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/media/video/gspca/stv06xx/stv06xx_sensor.h b/drivers/media/video/gspca/stv06xx/stv06xx_sensor.h
index 934b9cebc1ab..fb229d8ded58 100644
--- a/drivers/media/video/gspca/stv06xx/stv06xx_sensor.h
+++ b/drivers/media/video/gspca/stv06xx/stv06xx_sensor.h
@@ -53,6 +53,10 @@ struct stv06xx_sensor {
/* length of an i2c word */
u8 i2c_len;
+ /* Isoc packet size (per mode) */
+ int min_packet_size[4];
+ int max_packet_size[4];
+
/* Probes if the sensor is connected */
int (*probe)(struct sd *sd);