Initial patch for Trust WB3100P

Lars Luthman <[email protected]>
Newsgroups gmane.linux.drivers.spca50x.devel
Message-ID <1205864669.5147.29.camel@c-z>
I have a Trust WB3100P webcam. It works with the sn9c102 driver in the
2.6.24.3 kernel tree, but the only useful program that works with that
is Kopete - all others either can't handle V4L2 or don't know how to
handle the image format of the camera (Bayer coding with optional Sonix
compression). So I want a V4L1 driver for it.

I thought I'd try gspca, so I downloaded the gspcav1-20071224 tarball.
The driver does not recognise the camera, but with the small attached
patch I got it to detect it and sort of work in Camorama and Kopete -
the Sonix compression works but there is a grid of green pixels across
the image, there are occasional flashes of colour, the image keeps
hopping back and forth sideways a few pixels and the left edge of the
image seems to be inactive - it sort of looks as if there is a gray
blanket hanging over that part of the image. Also, accessing the camera
is really slow and the controls don't work right - v4l-info takes 17
seconds to print out the information for the camera and Kopete and
Camorama take at least as long as that to start capturing. None of the
controls in Kopete or Camorama seem to work except for the "Brightness"
control, and when I touch any other control in Kopete "Brightness" gets
reset to 0.

It works OK with the sn9c102 driver, so obviously there is code in there
that gets it right - could anyone point me to the parts of the code that
does the initialisation and control so I can fix it in my patch? I had a
look at it but don't quite get it - I've never touched any kernel module
code before.

The changes in the patch are based on the info that the sn9c102 driver
prints to dmesg - I know that the bridge is a SN9C103 and the sensor is
a PAS202BCB.


--ll

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

_______________________________________________
Spca50x-devs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/spca50x-devs
trustwb3100p.diff (text/x-patch, 1.5 KB)
Only in gspcav1-20071224-edit/decoder: gspcadecoder.o
Only in gspcav1-20071224-edit/decoder: .gspcadecoder.o.cmd
diff -ru gspcav1-20071224/gspca_core.c gspcav1-20071224-edit/gspca_core.c
--- gspcav1-20071224/gspca_core.c	2007-12-24 17:56:47.000000000 +0100
+++ gspcav1-20071224-edit/gspca_core.c	2008-03-18 18:54:06.000000000 +0100
@@ -422,6 +422,7 @@
 	Lenovo,
 	LogitechQC4Notebooks,
 	PhilipsSPC220NC,
+	TrustWB3100P,
 	LastCamera
 };
 static struct cam_list clist[] = {
@@ -620,6 +621,7 @@
 	{Lenovo,"lenovo MI1310_SOC"},
 	{LogitechQC4Notebooks,"Logitech QuickCam for Notebooks"},
 	{PhilipsSPC220NC,"Philips SPC220NC PAC207"},
+	{TrustWB3100P,"Trust WB3100P"},
 	{-1, NULL}
 };
 static __devinitdata struct usb_device_id device_table[] = {
@@ -834,6 +836,7 @@
 	{USB_DEVICE(0x046d, 0x08af)},	/* Logitech QuickCam Cool */
 	{USB_DEVICE(0x093a, 0x2472)},	/* PAC207 Genius VideoCam ge110 */
 	{USB_DEVICE(0x093a, 0x2463)},	/* Philips spc200nc pac207 */
+	{USB_DEVICE(0x0c45, 0x60af)},	/* Trust WB3100P */
 	{USB_DEVICE(0x0000, 0x0000)},	/* MystFromOri Unknow Camera */
 	{}			/* Terminating entry */
 };
@@ -4029,6 +4032,14 @@
 			spca50x->i2c_ctrl_reg = 0x81;
 			spca50x->i2c_base = 0x11;
 			break;
+		case 0x60af: /* Trust WB3100P */
+			spca50x->desc = TrustWB3100P;
+			spca50x->bridge = BRIDGE_SONIX;
+			spca50x->sensor = SENSOR_PAS202;
+			spca50x->customid = SN9C103;
+			spca50x->i2c_ctrl_reg = 0x81;
+			spca50x->i2c_base = 0x40;
+			break;
 		default:
 			goto error;
 		};
signature.asc (application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQBH4AjdQ3FGUATHfi4RAvJvAJ4rEI5iO25JgJlH9qkdkTMJ3mW48gCdGZ0P
bcRWAW00nNH9TJ9IfJ1/myY=
=tRkw
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.