Message ID | 20090909181139.06ab4ed5@blackbart.localnet.prv (mailing list archive) |
---|---|
State | Not Applicable |
Headers | show |
On Wed, 9 Sep 2009 18:11:39 -0400 James Blanford <jhblanford@gmail.com> wrote: > Howdy folks, > > Now that I have my old quickcam express working, I can confirm that the > frame rate is half what it was with the old out-of-tree driver. The > gspca driver is throwing out every other frame. When a frame is > completed, a new frame is started with a new frame buffer that passes > the test for being properly queued. But after the first packet is > analysed by the subdriver, the exact same test fails and the entire > frame is marked for discard. > I also have a QuickCam Express, the one with pb0100 sensor. It is slow indeed, but I can't really make a comparison with the old driver. > I'm hoping someone has a few minutes to make a little patch, run the > cam for a couple seconds and look at the debug log. Any comments are > welcome as well. > I get some discarded frames with stv06xx , but not as regularly as you. Also, no discarded frames with ov534 subdriver. Here's the log: [55231.009253] gspca: main v2.7.0 registered [55231.011569] STV06xx: Probing for a stv06xx device [55231.011575] gspca: probing 046d:0840 [55231.011582] STV06xx: Configuring camera [55231.024510] STV06xx: Photobit pb0100 sensor detected [55231.024517] STV06xx: Initializing camera [55231.310369] gspca: probe ok [55231.310408] usbcore: registered new interface driver STV06xx [55231.310413] STV06xx: registered [55445.692828] Frame alloc [55446.298735] New frame - first packet [55446.426667] Frame completed [55446.426674] New frame - first packet [55446.426677] Frame marked for discard [55446.554582] New frame - first packet [55446.714487] Frame completed [55446.714495] New frame - first packet [55446.874375] Frame completed [55446.874383] New frame - first packet [55447.034246] Frame completed [55447.034253] New frame - first packet [55447.194141] Frame completed [55447.194150] New frame - first packet [55447.354020] Frame completed [55447.354027] New frame - first packet [55447.354029] Frame marked for discard [55447.481948] New frame - first packet [55447.641846] Frame completed [55447.641853] New frame - first packet [55447.801725] Frame completed [55447.801732] New frame - first packet [55447.961596] Frame completed [55447.961603] New frame - first packet [55448.121467] Frame completed [55448.121474] New frame - first packet [55448.281355] Frame completed [55448.281363] New frame - first packet [55448.409305] Frame completed [55448.409313] New frame - first packet [55448.569191] Frame completed [55448.569199] New frame - first packet [55448.729067] Frame completed [55448.729075] New frame - first packet [55448.888939] Frame completed [55448.888946] New frame - first packet [55449.048822] Frame completed [55449.048830] New frame - first packet [55449.208710] Frame completed [55449.208717] New frame - first packet [55449.336668] Frame completed [55449.336675] New frame - first packet [55449.496532] Frame completed [55449.496540] New frame - first packet [55449.656421] Frame completed [55449.656429] New frame - first packet [55449.816286] Frame completed [55449.816294] New frame - first packet [55449.976166] Frame completed [55449.976173] New frame - first packet [55449.976175] Frame marked for discard [55450.136047] New frame - first packet
--- gspca.c.orig 2009-09-04 00:58:26.000000000 -0400 +++ gspca.c 2009-09-09 16:27:10.000000000 -0400 @@ -268,9 +268,11 @@ /* when start of a new frame, if the current frame buffer * is not queued, discard the whole frame */ if (packet_type == FIRST_PACKET) { + printk(KERN_DEBUG "New frame - first packet\n"); if ((frame->v4l2_buf.flags & BUF_ALL_FLAGS) != V4L2_BUF_FLAG_QUEUED) { gspca_dev->last_packet_type = DISCARD_PACKET; + printk(KERN_DEBUG "Frame marked for discard\n"); return frame; } frame->data_end = frame->data; @@ -306,6 +308,7 @@ wake_up_interruptible(&gspca_dev->wq); /* event = new frame */ i = (gspca_dev->fr_i + 1) % gspca_dev->nframes; gspca_dev->fr_i = i; + printk(KERN_DEBUG "Frame completed\n"); PDEBUG(D_FRAM, "frame complete len:%d q:%d i:%d o:%d", frame->v4l2_buf.bytesused, gspca_dev->fr_q, @@ -396,6 +399,7 @@ } gspca_dev->fr_i = gspca_dev->fr_o = gspca_dev->fr_q = 0; gspca_dev->last_packet_type = DISCARD_PACKET; + printk(KERN_DEBUG "Frame alloc\n"); gspca_dev->sequence = 0; return 0; }