Hi,

I have written a driver for the Konica webcam chip found in the
Intel YC76 webcam. It uses the usbvideo, so it just acts as a
miniport driver.

The patch is against 2.5.4-pre2 and can be found @
http://www.renegade.org.uk/konica/patch-2.5.4-pre2-konicawc.diff

I had to make a small change to usbvideo.[ch] so that I could
override the StartDataPump & StopDataPump functions as although
the webcam uses isochronous URBs, it sends a small status URB for
each data URB. I have included the patch against usbvideo.[ch] below.
I'm not sure who the maintainer is for it, so if you are reading
this could you check this change is OK ;)

cheers
si


diff -urN -X /home/spse/dontdiff linux-2.5.4-pre2/drivers/usb/usbvideo.c 
linux-2.5.4-pre2-konicawc/drivers/usb/usbvideo.c
--- linux-2.5.4-pre2/drivers/usb/usbvideo.c     Thu Feb  7 21:46:14 2002
+++ linux-2.5.4-pre2-konicawc/drivers/usb/usbvideo.c    Fri Feb  8 00:53:18 2002
@@ -791,6 +791,10 @@
                cams->cb.getFrame = usbvideo_GetFrame;
        if (cams->cb.disconnect == NULL)
                cams->cb.disconnect = usbvideo_Disconnect;
+       if (cams->cb.startDataPump == NULL)
+               cams->cb.startDataPump = usbvideo_StartDataPump;
+       if (cams->cb.stopDataPump == NULL)
+               cams->cb.stopDataPump = usbvideo_StopDataPump;
 #if USES_PROC_FS
        /*
         * If both /proc fs callbacks are NULL then we assume that the driver
@@ -963,7 +967,7 @@
        uvd->remove_pending = 1; /* Now all ISO data will be ignored */
 
        /* At this time we ask to cancel outstanding URBs */
-       usbvideo_StopDataPump(uvd);
+       GET_CALLBACK(uvd, stopDataPump)(uvd);
 
        for (i=0; i < USBVIDEO_NUMSBUF; i++)
                usb_free_urb(uvd->sbuf[i].urb);
@@ -1299,7 +1303,7 @@
        if (errCode == 0) {
                /* Start data pump if we have valid endpoint */
                if (uvd->video_endp != 0)
-                       errCode = usbvideo_StartDataPump(uvd);
+                       errCode = GET_CALLBACK(uvd, startDataPump)(uvd);
                if (errCode == 0) {
                        if (VALID_CALLBACK(uvd, setupOnOpen)) {
                                if (uvd->debug > 1)
@@ -1349,8 +1353,8 @@
        if (uvd->debug > 1)
                info("%s($%p)", proc, dev);
 
-       down(&uvd->lock);       
-       usbvideo_StopDataPump(uvd);
+       down(&uvd->lock);
+       GET_CALLBACK(uvd, stopDataPump)(uvd);
        usbvideo_rvfree(uvd->fbuf, uvd->fbuf_size);
        uvd->fbuf = NULL;
        RingQueue_Free(&uvd->dp);
diff -urN -X /home/spse/dontdiff linux-2.5.4-pre2/drivers/usb/usbvideo.h 
linux-2.5.4-pre2-konicawc/drivers/usb/usbvideo.h
--- linux-2.5.4-pre2/drivers/usb/usbvideo.h     Thu Feb  7 21:45:59 2002
+++ linux-2.5.4-pre2-konicawc/drivers/usb/usbvideo.h    Thu Feb  7 23:15:50 2002
@@ -269,6 +269,8 @@
        int (*getFrame)(uvd_t *, int);
        int (*procfs_read)(char *page,char **start,off_t off,int count,int *eof,void 
*data);
        int (*procfs_write)(struct file *file,const char *buffer,unsigned long 
count,void *data);
+       int (*startDataPump)(uvd_t *uvd);
+       void (*stopDataPump)(uvd_t *uvd);
 } usbvideo_cb_t;
 
 struct s_usbvideo_t {


_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to