tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

GSoC status report - USB Video Class (UVC) driver

Current UVC driver status:

uvideo driver

- Attaches to UVC cameras and (currently) dumps all UVC descriptors.
  Can read and set controls, but there is no external interface for
  this yet.  Negotiates a video streaming format and starts an
  isochronous transfer.  Sends the video data to the video driver.

video driver

- Will implement Video4Linux2 API.  Currently implements a buffer
  queue exported via read() that fills an arbitrary number of buffers
  with video data and then queues them for reading by userspace.  This
  will be tweaked for use by mmap() as well (Video4Linux2 provides
  multiple ways of reading video data).

- Supports basic open/close and format negotiation operations.  The
  goal is to have a generic v4l2 driver for hardware drivers
  implementing the appropriate interface, similar to the audio driver.


- gtk2 test app that reads video from /dev/video.  Currently very
  basic; just displays an image and allows saving as PNG.  Only
  supports MJPEG frames at the moment.  This app serves as a
  demonstration of how to add default Huffman tables to the JPEG data;
  UVC spec allows cameras to leave out the Huffman tables.


Some problems that I've encountered:

ISOC transfers.  This is an ongoing problem, but I'm not quite sure
how to properly select parameters for an isoc transfer.  Adding
debugging messages changes the timing of things, and it's easy to get
to the point where the hardware stops sending any video data.
Specifically, in usbd_setup_isoc(), what seems to work best is
providing frlengths and nframes parameters sufficient to capture an
entire video frame, where I naively expect arbitrary parameters to
work fine as long as the driver properly assembles the data later (a
video frame is composed of data from multiple isoc payloads).

JPEG images lacking Huffman tables.  After getting image data from the
camera, it was a bit of a dissapointment to be unable to open the
image...  Of course, the UVC spec mentioned that Huffman tables were
optional, and directed me to the JPEG spec to find the tables to use.

UVC spec defines several error conditions during video transfer.  I've
not encountered these from my hardware, so I'm not sure how to code
and test handling for these errors, but I will need to come up with
some way of simulating them.

Various minor problems due to stupidity/ignorance, such as wondering
why my driver no longer compiles before realizing I had done cvs
update, thinking I had porperly defined a device major number and then
wondering why open() didn't work... etc.

Home | Main Index | Thread Index | Old Index