Unable to initialize camera (via mmap interface)

Jonathan Corbet corbet at lwn.net
Thu Dec 13 09:57:00 EST 2007


> I'm trying to initialize the camera device and running into some 
> errors.  I'm attempting to use the mmap interface initialized by 
> VIDIOCGMBUF ioctl.  the ioctl is returning -1 and errno is 22. 

The problem, almost certainly, is that VIDIOCGMBUF is a V4L1 command,
while the camera driver implements the V4L2 API.  Almost everything from
V4L1 can be mapped over, but VIDIOCGMBUF makes assumptions about the
placement of DMA buffers which cannot be guaranteed with V4L2.  In
particular, it wants them all to be contiguous in memory.

Due to the way the cafe_ccic driver works, filling in support for
VIDIOCGMBUF is actually feasible, though not entirely trivial.  Far
better, if at all possible, would be to use the V4L2 API, which (like
high-definition TV and IPv6) is definitely the way of the future.
Someday. 

jon

Jonathan Corbet / LWN.net / corbet at lwn.net



More information about the Devel mailing list