Hi,
> > > This is probably a more decriptiive subject.
> > >
> > > On further thought this may be related to uvcvideo using mmap only, I
> > > had to use the read/write option on other modules on the ARM to get
> > > them to work properly.
> >
> > That's interesting. I'd like to know why the request fails. Are you
> > familiar with Linux programming enough to add a few print statements in
> > the driver and see where it fails ?
> >
> > Laurent Pinchart
>
> Thanks for your help.
>
> If you could give me some guidance on where to start looking in uvcvideo
> it would be a great help.
Sure.
The code starts in uvc_v4l2_do_ioctl. To allocate the buffers, an application
calls VIDIOC_REQBUFS. You will find a first check in that function, which
returns the error code you noticed.
if (rb->type != V4L2_BUF_TYPE_VIDEO_CAPTURE ||
rb->memory != V4L2_MEMORY_MMAP)
return -EINVAL;
Try to add a print statement before and after the check. If the check fails,
print rb->type and rb->memory.
I can't see any other place where the driver might return -EINVAL in response
to VIDIOC_REQBUFS.
> I am not an expert by any description but I can probably bumble through
> adding a few print statements.
Use printk(KERN_DEBUG "message", arg1, arg2, ...) to print messages to the
kernel log. You can then retrieve them using the dmesg command.
> I had taken the direction of running
> luvcview under gdb to see exactly what was being returned from the
> driver. I am currently making my way through the luvcview code to learn
> exactly how it works.
The driver seems to return -22 (-EINVAL) when luvcview tries to allocate the
buffers with the VIDIOC_REQBUFS ioctl. Check the ioctl() return value (should
be -1) and the errno value (should be 22).
> I had originally been working with cameras that use the spca or gspca
> driver when I found this comment from Michel on the spca50x-devs mailing
> list which was the key to making them work on the device:
>
> Le Vendredi 30 Décembre 2005 05:24, 孙钦东 a écrit :
> sqd,
> You should run spcaserv with read method parameters (-g) instead mmap .
> I have see some memory corruption with mmap only with the Arm CPU, maybe a
> wrong memory alignement
Laurent Pinchart
_______________________________________________
Linux-uvc-devel mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/linux-uvc-devel