[cpia] Re: 2 cameras streaming at once?

WJ Vlothuizen vlothuizen@fel.tno.nl
Tue, 05 Sep 2000 12:45:09 +0200


I (try to) use 2 USB CPiA cameras at once. My current setup is:
- kernel 2.3.49
- cpia-1.1 using usb (ohci), with a patch to parse_picture() that speeds
up processing (at the cost of readability :-)
- client using mmap/VIDIOCMCAPTURE/VIDIOCSYNC at about 5 pictures/s

I can basically use 2 camera's, but occasionally commands fail with
retval -110 (timed out) or -32 (USB_ST_STALL), which does not seem to
harm the capturing. After several minutes I get a message:

  hub.c: already running port 1 disabled by hub (EMI?), re-enabling
  usb.c: USB disconnect on device 2

after which things fail (Expectedly, because the camera will be reset).
Things seem to get somewhat better when I remove the non-essential
do_commands() from fetch_frame(), so the problem seems to be
traffic-related.

While looking through the source of cpia.c I got the impression that the
driver will not really perform double buffering in the sense that one
buffer is filled in the background while the other is 'used' by the
client. Am I right, and would such behaviour be required/wanted by
video4linux?

Regards,
Wouter Vlothuizen