I have two different Logitech Quckcam Express cams, the new one (based on HDCS-1020 sensor) and the old one (based on HDCS-1000) and both of them works incorrect with mod_quickcam in Mandrake 9.2. The new one gives out picture with black borders at left and bottom sides, but the old ones does not produce an output at all. Here is (self-explanatory, I hope) patch:
--- qc-hdcs.c.orig 2003-09-03 13:40:45.000000000 +0600
+++ qc-hdcs.c 2003-09-09 17:18:55.000000000 +0600
@@ -93,8 +93,9 @@
int r; if (sd->compress) return -EINVAL;
- sd->maxwidth = 360; /* CIF */
- sd->maxheight = 296;
+ sd->maxwidth = IS_1020(qc) ? 352 : 360; /* CIF */
+ sd->maxheight = IS_1020(qc) ? 288 : 296;
+
if (sd->subsample) {
sd->maxwidth /= 2; /* QCIF */
sd->maxheight /= 2;
@@ -138,7 +139,7 @@
I2C_SET_CHECK(HDCS_LWCOL, 0x57); /* End at column 352 *//* 0x07 - 0x50 */ - I2C_SET_CHECK(HDCS_TCTRL, 9); /* Set PGA sample duration (was 0x7E for IS_870, but didn't work well) */ + I2C_SET_CHECK(HDCS_TCTRL, IS_1020(qc) ? 9 : 0x7e); /* Set PGA sample duration (was 0x7E for IS_870, but didn't work well) */
I2C_SET_CHECK(control, 0); /* FIXME:should not be anymore necessary (already done) */
@@ -290,10 +291,10 @@
* has visible windows size of 360x296 pixels, the first upper-left
* visible pixel is at 8,8.
* FIXME: is it same for HDCS1020? Please somebody test it. */
- static const unsigned int originx = 8; /* First visible pixel */
- static const unsigned int originy = 8;
- static const unsigned int maxwidth = 360; /* Visible sensor size */
- static const unsigned int maxheight = 296;
+ unsigned int originx = IS_1020(qc) ? 24 : 8; /* First visible pixel */
+ unsigned int originy = 8;
+ unsigned int maxwidth = IS_1020(qc) ? 352 : 360; /* Visible sensor size
*/
+ unsigned int maxheight = IS_1020(qc) ? 288 : 296;
unsigned char control = GET_CONTROL;
struct qc_sensor_data *sd = &qc->sensor_data;
int r;
-- Andrey
