Hmm, I think what you've sent is not an app, but a support file for V4L. 
Either way, I can tell what the issue is:

So, V4L2CameraDevice::captureThread is probably called somehow before 
V4L2CameraDevice::startDevice in the main app. startDevice needs to be 
called first and initialize the V4L buffers - from what I see in the 
current A20 driver - you only need to do S_FMT followed by QUERYBUF and 
then QBUF ioctls. This is a bit dirty, but quick and should work.

When V4L2CameraDevice::captureThread is started it basically checks whether 
the buffer is ready to be dequeued with v4l2WaitCameraReady, and then tries 
to dequeue a buffer with getPreviewFrame, and fails.

Something in this pipeline is not correct. I cannot look more into the code 
now, but it's quite strange how select() in v4l2WaitCameraReady() passes 
and then yet DQBUF fails. This is a bit puzzling for me.

Please take a look at the following file:
https://github.com/allwinner-ics/lichee_linux-3.0/blob/master/drivers/media/video/sun4i_csi/test/app_test_ok.c

It has the correct way of how you should use the OV5640 driver - S_FMT, 
QUERYBUF and QBUF are done in main_test() - you also have a loop there 
which calls read_frame(), where DQBUF is performed.
Check the way V4L is used in this app against your app - I'm pretty sure 
you have an error somewhere.

Regarding the AML8726 kernel - I don't know where you've found ov5640 
driver, but I cannot find it in the tar archive.

-- 
You received this message because you are subscribed to the Google Groups 
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to