Capture from CMOS-matrix

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Capture from CMOS-matrix

3,449 Views
BrilliantovKiri
Senior Contributor I
Hello! I have to capture and encode video from OmniVision OV2715 CMOS-matrix. I write driver and add matrix description in mx53_loco.c After loading all modules I see in dmesg what matrix found and configured. root@freescale ~$ cat /proc/modules mxc_v4l2_capture 18356 1 - Live 0x7f0b1000 ov2715 12136 0 - Live 0x7f0a9000 //my module ipu_still 1671 1 mxc_v4l2_capture, Live 0x7f0a3000 ipu_prp_vf_sdc_bg 3285 1 mxc_v4l2_capture, Live 0x7f09d000 ipu_prp_vf_sdc 3392 1 mxc_v4l2_capture, Live 0x7f097000 ipu_prp_enc 3865 1 mxc_v4l2_capture, Live 0x7f091000 ipu_csi_enc 2449 1 mxc_v4l2_capture, Live 0x7f08b000 Output stream from matrix have size 1920x1080. Now I try capture this stream with mxc_v4l2_capture.out. root@freescale ~$ /unit_tests/mxc_v4l2_capture.out -iw 1920 -ih 1080 -ow 1920 -oh 1080 in_width = 1920, in_height = 1080 out_width = 1920, out_height = 1080 top = 0, left = 0 sensor chip is ov2715_camera sensor frame size is 1920x1080 sensor frame format is UYVY Width = 1920 Height = 1080 Image size = 3110400 pixelformat = 842093913 YUV420 mxc_ipu mxc_ipu: IDMAC20's EBA0 is not 8-byte aligned mxc_ipu mxc_ipu: IDMAC20's EBA1 is not 8-byte aligned ERROR: v4l2 capture: mxc_v4l_dqueue timeout enc_counter 0 VIDIOC_DQBUF failed. ERROR: v4l2 capture: VIDIOC_QBUF: buffer already queued VIDIOC_QBUF failed mxc_v4l_close: release resource I try some output resolution but result always fail. I don't see any error messages in dmesg output. On osciloscope I see FrameValid and LineValid signals. I use linux-2.6.35.3 from LTIB (L2.6.35_11.09.01_ER_source_bundle and IMX_MMCODECS_11.09). Why I can't capture stream and how can I solve this problem? Thank you and excuse me my bad english.
Labels (1)
0 Kudos
7 Replies

952 Views
BrilliantovKiri
Senior Contributor I
Strange facts: 1. succesfully capture data with mxc_vpu_test 2. if I not run mxc_vpu_test I can't capture data with GStreamer pipeline I not see in mxc_vpu_test code any special functions or methods.
0 Kudos

952 Views
jpuckett
Contributor III

I don't have a setup to confirm this, but according to the code if you specify "-d 1" in the arguments to mxc_v4l2_overlay.out it will set the output to DI1, which I believe is the VGA output on the QSB.

0 Kudos

952 Views
BrilliantovKiri
Senior Contributor I

Hello, James!

I try use mxc_v4l2_overlay.out with VGA, but I view only black background with tux.
I can't connect LCD to expand slot because matrix used it.

0 Kudos

952 Views
BrilliantovKiri
Senior Contributor I

Hello, Randy!

I apply linux-2.6.35.3-imx_11.09.01.bz2 and linux-2.6.35.3-imx_11.09.01_201112.tar.gz patches.

0 Kudos

952 Views
jpuckett
Contributor III

The mxc_v4l2_capture.out app reads frames from the capture device and writes them to a file.  It uses the last argument in the command line as the file name and saves 100 frames by default which is why you ended up with a file named "600" that was 72000000 bytes in size.  I'm not sure why the larger resolutions would fail though.

Are you trying to stream video to the screen?  If so you should look at the mxc_v4l2_overlay.out utility instead.

In case you didn't know, you can view the code for all of the test apps by prepping the imx-test package like this:

ltib -m prep -p imx-test

The files will show up in ltib/rpm/BUILD/imx-test-11.09.01

Judging from responses I've received from Freescale they seem to be moving away from the V4L2 drivers in favor of their IPU library included in the imx-lib package.  Have a look at imx5x_IPU_LIB_UG.pdf for more info on that.

0 Kudos

952 Views
RandyKrakora
NXP Employee
NXP Employee

This probably won't help much, but worth a shot:

http://imxcommunity.org/profiles/blogs/tv-in-demo-for-ard-a-simple-how-to

Also, did you apply this patch? I can capture using the Freescale imx53 Sabre video in ( which has 7180 ) without this patch, but it's worth a look, right?

http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=i.MX535&nodeId=018rH3ZrDR988D&fpsp=1&...

Updates and Patches (5) -> IMX53_LINUX_1109_BSP_PATCH

0 Kudos

952 Views
BrilliantovKiri
Senior Contributor I

Very strange, but

root@freescale ~$ /unit_tests/mxc_v4l2_capture.out -iw 800 -ih 600 -ow 800 -oh 600
in_width = 800, in_height = 600
out_width = 800, out_height = 600
top = 0, left = 0
sensor chip is ov2715_camera
sensor frame size is 1920x1080
sensor frame format is UYVY
         Width = 800     Height = 600    Image size = 720000
         pixelformat = 842093913
YUV420
mxc_ipu mxc_ipu: IDMAC20's EBA0 is not 8-byte aligned
mxc_ipu mxc_ipu: IDMAC20's EBA1 is not 8-byte aligned
buf.index 1
buf.index 2
buf.index 0
mxc_v4l_close: release resource

root@freescale ~$ ls -l 600
-rw-r--r--    1 root     root      72000000 Jul 27  2012 600

0 Kudos