Hi all, I am trying to use a CMOS image sensor from OmniVision (OV5640) with Allwinner A20 (on Olimex Olinuxino-A20-Micro).
Basically, it almost works out-of-the-box, but I have some issues with color conversion and the image on the screen has completely wrong colors (LSD situation :) - YUV is somehow badly converted to RGB). I am also using A10-TS touchscreen from Olimex (just a normal 10" panel - parallel RGB, 18bit). I am using the OV5640 driver from sun4i (found in linux/drivers/media/video/sun4i_csi/device). On the top (in userspace), I am using a sample test application found with the sun4i driver itself (/linux/drivers/media/video/sun4i_csi/test/app_test_ok.c). I have also found several other versions of the same application on the web (source is only called differently - test_camera.c, but written by the same guy - Rockie Cheng). The colors are behaving best (for now) when I set csi_format to: csi_format = V4L2_PIX_FMT_YUV422P and display format to: disp_format = DISP_FORMAT_YUV422; but they are still quite wrong. However, if I'm using V4L2_PIX_FMT_YUYV as csi_format (this is how OV5640 actually sends the picture to the A20), I get a lot of ghosting, which implies that the CSC is not working and 16-bit data is somewhere interpreted as 24-bit data. Almost the same thing happens when I set the display format to RGB (and the display is in fact RGB not YUV). The strange thing is that this "best" situation has no ghosting, so it's probably the matter of mixing Y and U or V channels somewhere. In fact image details are there, so Y is probably functional - from theoretical side the likeliest is that U and V are mixed somewhere. So maybe someone has done something similar and can shed some light here - since A20 user manual and datasheet contain only basic info about CSI and image pipeline. Any kind of guidance is welcome - documents, snippets... Of course, the hard way would be to go through register settings and check for everything, but as I would need a lot of kernel recompilations for it, I thought first to see if someone has done something similar. There's also some things which are not crystal clear with the Fex file, so my culprit might lie there as well. Although I don't think so, but it could happen that I've made a mistake there (for instance I've configured framebuffer to be RGB888, and LCD to 18-bit - this could easily be a mistake if display driver is trying to use RGB8888 as framebuffer). All in all - any help greatly appreciated :) Best regards, Ivan -- 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.
