Subject: ugen isochronous transfers working or not?
To: tech-kern <tech-kern@netbsd.org>
From: theo <theo_n4@flex087.wuipo.wau.nl>
List: tech-kern
Date: 03/09/2003 23:56:22
Hi all,

The last few days i've been trying to write a ugen based driver
for my webcam (philips ToUcam Pro, pcvc740K), but I can't get
isochronous transfers to work.

Whenever I read() from the isochronous endpoint it enters
sleep() in the ugenread() function from which it never wakes.
(except when killing the program or unplugging the device)

I've been going through the linux pwc driver, and am sure
that I do the same initializations (setting power save mode
off, setting leds, setting video mode and selecting an alter-
nate interface), but to no avail; so far the camera is nothing
but an expensive usb-controlable blinking LED.

The only other example of code I could find using the ugen driver
in isochronous mode is also for a webcam (OV511 iirc), and does
exactly the same: do some initializations, then open the iso-
chronous endpoint and read()...

now i've got two hypothesis:
1) my camera isn't correctly initialized, and is not sending
any data.
2) ugen isochronous code is broken somewhere.

of course the first hypothesis is the most likely, but I've
done a considerable amount of checking of my code against
(supposedly) working linux code, and am now almost sure that the
reason must lie elsewhere.

I managed to trace down the sleep(), but being unfamilliar with
the rest of the usb device driver framework, i've got no idea what
is supposed to wake it.

Any ideas?
Did I miss anything essential?
Can anyone confirm that the OV511 driver *is* working on a stock
NetBSD 1.6 system?
Should I drop the idea of writing an isochronous ugen based driver
and instead focus on writing a dedicated driver?

For what it's worth: it is a stock i386/NetBSD 1.6 system with
ohci usb controller. Allowing short transfers on the isochronous
endpoint does not make any difference whatsoever.

with kind regards,

Theo Borm.