diff -Naur linux-2.3.40-orig/Documentation/usb/ov511.txt linux/Documentation/usb/ov511.txt --- linux-2.3.40-orig/Documentation/usb/ov511.txt Fri Jan 21 10:28:12 2000 +++ linux/Documentation/usb/ov511.txt Sat Jan 22 01:36:48 2000 @@ -11,10 +11,6 @@ grab a frame in color (YUV420) at 640x480 or 320x240 using either vidcat or xawtv. Other utilities may work but have not yet been tested. -NOTE: 320x240 does not work reliably for me, and causes complete system crashes. - I recommend not using it until a later version, and if you do, run "sync" - first. - SUPPORTED CAMERAS: ________________________________________________________ Manufacturer | Model | Custom ID | Status @@ -24,6 +20,7 @@ Creative Labs | WebCam 3 | 21 | Working Lifeview | RoboCam | 100 | Untested AverMedia | InterCam Elite | 102 | Working +MediaForte | MV300 | 112 | Untested -------------------------------------------------------- Any camera using the OV511 and the OV7610 CCD should work with this driver. The @@ -39,7 +36,8 @@ http://www.ovt.com/omniusbp.html - A Video4Linux compatible frame grabber program (I recommend vidcat and xawtv) - (see: http://www.exploits.org/v4l/ ) + vidcat is part of the w3cam package: http://www.hdk-berlin.de/~rasca/w3cam/ + xawtv is available at: http://www.in-berlin.de/User/kraxel/xawtv.html HOW TO USE IT: @@ -83,7 +81,7 @@ Now you should be able to run xawtv. Right click for the options dialog. WORKING FEATURES: - o Color streaming/capture at 640x480 (reliably) and 320x240 (unreliably) + o Color streaming/capture at 640x480 and 320x240 o YUV420 color o Setting/getting of saturation, contrast and brightness (no color yet) diff -Naur linux-2.3.40-orig/drivers/usb/ov511.c linux/drivers/usb/ov511.c --- linux-2.3.40-orig/drivers/usb/ov511.c Fri Jan 21 10:28:34 2000 +++ linux/drivers/usb/ov511.c Sat Jan 22 01:36:32 2000 @@ -1,6 +1,6 @@ /* * OmniVision OV511 Camera-to-USB Bridge Driver - * Copyright 1999 Mark W. McClelland + * Copyright 1999/2000 Mark W. McClelland * * Based on the Linux CPiA driver. * @@ -11,7 +11,7 @@ * DEBUG - Debugging code. * FIXME - Something that is broken or needs improvement. * - * Version: 1.05 + * Version: 1.06 * * Please see the file: linux/Documentation/usb/ov511.txt * and the website at: http://people.delphi.com/mmcclelland/linux/ @@ -533,7 +533,7 @@ ov511_i2c_write(dev, 0x20, 0x1c); ov511_i2c_write(dev, 0x24, 0x2e); /* 10 */ ov511_i2c_write(dev, 0x25, 0x7c); /* 8a */ - ov511_i2c_write(dev, 0x26, 0x70); + ov511_i2c_write(dev, 0x26, 0x00); /* was 0x70 */ ov511_i2c_write(dev, 0x28, 0x24); /* 24 */ ov511_i2c_write(dev, 0x2b, 0xac); ov511_i2c_write(dev, 0x2c, 0xfe); @@ -737,20 +737,16 @@ int aPackNum[10]; struct ov511_frame *frame; - if (ov511->curframe == -1) { - return 0; - } - for (i = 0; i < urb->number_of_packets; i++) { int n = urb->iso_frame_desc[i].actual_length; int st = urb->iso_frame_desc[i].status; - + urb->iso_frame_desc[i].actual_length = 0; + urb->iso_frame_desc[i].status = 0; cdata = urb->transfer_buffer + urb->iso_frame_desc[i].offset; - if (!n) continue; - aPackNum[i] = n ? cdata[992] : -1; + if (!n || ov511->curframe == -1) continue; if (st) PDEBUG("data error: [%d] len=%d, status=%d", i, n, st); @@ -767,14 +763,27 @@ #endif if (frame->scanstate == STATE_LINES) { + int iFrameNext; if (waitqueue_active(&frame->wq)) { #if 0 PDEBUG("About to wake up waiting processes"); #endif frame->grabstate = FRAME_DONE; - ov511->curframe = -1; wake_up_interruptible(&frame->wq); } + /* If next frame is ready or grabbing, point to it */ + iFrameNext = (ov511->curframe + 1) % OV511_NUMFRAMES; + if (ov511->frame[iFrameNext].grabstate== FRAME_READY || + ov511->frame[iFrameNext].grabstate== FRAME_GRABBING) { + ov511->curframe = iFrameNext; + frame->scanstate = STATE_SCANNING; + } else { +#if 0 + PDEBUG("Frame not ready? state = %d", + ov511->frame[iFrameNext].grabstate); +#endif + ov511->curframe = -1; + } } } @@ -1623,6 +1632,9 @@ break; case 102: printk("ov511: Camera is a AverMedia InterCam Elite\n"); + break; + case 112: + printk("ov511: Camera is a MediaForte MV300\n"); break; default: err("Specific camera type (%d) not recognized", rc);