Web lists-archives.com

[Spca50x-devs] Patch: gspca-zc3xx-pas106b-detect.patch




Hi,

This patch moves the detection of the 2wr SIF pas106b sensor to before detecing
other 2 wire sensors (as it was done with gspcav1) without this the pas106b
gets misdetected as an HDCS2020b.

This makes my Philips SPC 200NC cam work, but unfortunately the picture is
upside down (same with gspcav1). While experimenting to try to fix this I've
found the meaning of one pas106b register and a comment now documents this.

Signed-off-by: Hans de Goede <j.w.r.degoede@xxxxxx>

Regards,

Hans
This patch moves the detection of the 2wr SIF pas106b sensor to before detecing
other 2 wire sensors (as it was done with gspcav1) without this the pas106b
gets misdetected as an HDCS2020b.

This makes my Philips SPC 200NC cam work, but unfortunately the picture is
upside down (same with gspcav1). While experimenting to try to fix this I've
found the meaning of one pas106b register and a comment now documents this.

Signed-off-by: Hans de Goede <j.w.r.degoede@xxxxxx>
diff -r 380c5715fd90 linux/drivers/media/video/gspca/zc3xx.c
--- a/linux/drivers/media/video/gspca/zc3xx.c	Wed Aug 06 10:49:16 2008 +0200
+++ b/linux/drivers/media/video/gspca/zc3xx.c	Thu Aug 07 12:18:01 2008 +0200
@@ -4134,6 +4134,7 @@
 	{0xaa, 0x0c, 0x0005},
 	{0xaa, 0x0d, 0x0000},
 	{0xaa, 0x0e, 0x0002},
+/*	{0xaa, 0x11, 0x0000}, seems to control exposure (0 = max exp) */
 	{0xaa, 0x14, 0x0081},
 
 /* Other registors */
@@ -6972,6 +6973,10 @@
 				/* may probe but with write in reg 0x0010 */
 		return -1;		/* don't probe */
 	}
+	sensor = sif_probe(gspca_dev);
+	if (sensor >= 0)
+		return sensor;
+
 	sensor = vga_2wr_probe(gspca_dev);
 	if (sensor >= 0) {
 		if (sensor < 0x7600)
@@ -6984,7 +6989,7 @@
 			return sensor;
 		return sensor2;
 	}
-	return sif_probe(gspca_dev);
+	return -1;
 }
 
 /* this function is called at probe time */
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Spca50x-devs mailing list
Spca50x-devs@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/spca50x-devs