[cpia] usb errors using cpia/gqcam

Johannes Erdfelt johannes@erdfelt.com
Thu, 23 Nov 2000 12:24:21 -0500


On Thu, Nov 23, 2000, Peter Pregler <Peter_Pregler@email.com> wrote:
> On Wed, Nov 22, 2000 at 11:41:30AM -0500, Johannes Erdfelt wrote:
> > 
> > You can't use 2 cpia cameras on the same bus because there isn't enough
> > bandwidth. The open failing is the USB core telling you that.
> 
> > It works on 2 busses because each bus has it's own bandwidth.
> 
> A bandwidth traffic shaper was what I suspected. Thanx for the info.
> And of cause this answers the question for all guys that connect
> several cameras to a bus and had problems. Make sure that the
> open/close of the camera is serialized by software means.
> 
> Hmmm, thinking of the following scenario I see no real need for such a
> hard limit. Imagine that you have ten webcams that take a picture
> every 10 seconds. It would be fine if the usb-system would allow the
> user to issue the requests and deliver the data with a unspecified bit
> rate (comparable to ATM-UBR ;). Or is the isochronous mode for USB we
> use (AFAIK) just capable of handling constant bit rate. Sorry for
> asking such simple questions but I am not that familiar with the
> usb-spec. In other words, is it possible to modify the cpia-driver to
> allocate and use the usb-bus in a less rigid way?

The USB spec mandates that certain transfers are guaranteed bandwidth.
Isochronous is at the top of the list.

The USB core enforces this.

We could workaround this by postponing the transfer for Isochronous
transfers, but it wouldn't be perfect. The CPiA camera doesn't start
transferring data immediately so there will always be dead frames. I
don't think you could get 10 cameras working like this tho.

There may be another way. I'll have to think about it.

The reason why it fails at open is because it tests one frame or
something (I haven't looked at the code recently) at open and the
bandwidth allocation fails.

JE