Une nouvelle aventure s'ouvre à moi : histoire de m'amuser un peu.
J'ai acheter une petite webcam sachant pertinament que son support sous Linux n'était pas encore présent.
La voici :
Cette webcam est une :
diff -urbNB sn9c102-1.03_beta/sn9c102_tas5110c1b.c sn9c102-1.03_beta-clucas/sn9c102_tas5110c1b.c
--- sn9c102-1.03_beta/sn9c102_tas5110c1b.c 2004-07-19 02:29:16.000000000 +0200
+++ sn9c102-1.03_beta-clucas/sn9c102_tas5110c1b.c 2004-07-28 09:01:35.000000000 +0200
@@ -100,8 +100,10 @@
sn9c102_attach_sensor(cam, &tas5110c1b);
/* At the moment, only devices whose PID is 0x6005 have this sensor */
- if (tas5110c1b.usbdev->descriptor.idProduct != 0x6005)
+ if( ( tas5110c1b.usbdev->descriptor.idProduct != 0x6005) &&
+ ( tas5110c1b.usbdev->descriptor.idProduct != 0x6001) ) {
return -ENODEV;
+ }
return 0;
}
Maintenant que le capteur était bien pris en compte, faisons quelques tests.usb 3-2: [sn9c102_urb_complete:613] SOF before expected EOF after 3 bytes of image data usb 3-2: [sn9c102_urb_complete:602] SOF detected: new video frame usb 3-2: [sn9c102_urb_complete:572] Video frame captured: 101376 bytes usb 3-2: [sn9c102_urb_complete:602] SOF detected: new video frame usb 3-2: [sn9c102_urb_complete:572] Video frame captured: 101376 bytesLuca a fait ensuite ce qu'il fallait pour corriger cela et le tour était joué. Vous pouvez donc voir ma sale face :

diff -urbNB linux-2.6.8-rc2/include/linux/videodev.h linux-2.6.8-rc2-clucas/include/linux/videodev.h --- linux-2.6.8-rc2/include/linux/videodev.h 2004-07-18 06:59:31.000000000 +0200 +++ linux-2.6.8-rc2-clucas/include/linux/videodev.h 2004-08-06 08:59:17.000000000 +0200 @@ -3,6 +3,7 @@ #include <linux/types.h> #include <linux/version.h> +#include <linux/compiler.h> /* for __user macro */ #define HAVE_V4L2 1 #include <linux/videodev2.h>