AnsweredAssumed Answered

IMX6 SoloX VADC

Question asked by Luca Pisani on Jan 13, 2016
Latest reply on Apr 20, 2016 by JohnDoe1z

Hi all,

 

I'm using a board based on sabre-sd iMX6 SoloX. The kernel base is 3.14.28_1.0.0_ga.

I would know how to use VADC input with Linux to have the stream of an analog camera.

I think that everything is set fine but I cannot have a clean image returned. I also think that part of the documantation is wrong in the pdf "i.MX_6_Linux_Reference_Manual.pdf" downloaded in the documentation package "fsl-yocto-3.14.28-1.0.0.gz"

 

this is my dts (the analog camera is connected to VADC_IN0 and GND)

 

&csi1 {

  status = "okay";

  port {

       csi1_ep: endpoint {

            remote-endpoint = <&vadc_ep>;

       };

  };

};

 

&vadc {

  vadc_in = <0>;   /* VADC_IN0 */

  csi_id = <0>;      /* csi id 0 -> csi 1 */

  status = "okay";

  port {

       vadc_ep: endpoint {

            remote-endpoint = <&csi1_ep>;

  };

  };

};

 

In the doc file i.MX_6_Linux_Reference_Manual.pdf in the chapter 57 (VADC) in the "Unit Test" part I found this:

Before running the unit test, make sure that the following modules are loaded:

• insmod fsl_csi.ko

• insmod mxc_vadc_tvin.ko

• insmod csi_v4l2_capture.ko

BUT no one of these modules exists in the kernel 3.14.28

 

The modules loaded at boot are MXC_VADC and mx6s_capture (VIDEO_MXC_CSI_CAMERA).

:~$ lsmod

......

mxc_vadc                8466  1

mx6s_capture           17061  0

 

this the return from dmesg:

[   10.372159] CSI: Registered sensor subdevice: fsl_vadc

[   10.392807] wait vadc auto detect video mode...

[   10.811833] video mode NTSC

[   10.811839] vadc driver loaded

 

To test the source the documentation say this:

Run the unit test:

/unit_tests/csi_v4l2_tvin.out -d /dev/video<x>

BUT this file not exist. I tried recompiling the unit test (I used imx-test-5.2.tar.gz) or using a Yocto precompiled sdcard image for iMX6 SoloX SDB.

 

The closest test seems be "mx6s_v4l2_capture.out"

If I run :

udooer@udooneo:/$ ./mx6s_v4l2_capture.out -l

open video device /dev/video0

Found v4l2 capture device /dev/video0

pixelformat (output by camera): YUV4

CaptureMode=0, Width=720, Height=480 30.000 fps

Seems that the camera is recognized.

The only test I'm able to do with this file is capture a video with this command:

/unit_test/mx6s_v4l2_capture.out -ow 720 -oh 480 -d /dev/video0 -fr 30 -of test_vadc.yuv

How should I reproduce this video?

The best result that I've accomplished is by running this mplayer command:

mplayer -demuxer rawvideo -rawvideo w=720:h=480:format=rgb32 test_vadc.yuv

the video is played at high speed and the colors are wrong(probably the blue and green are exchanged).  A screenshot in attachement.

 

Sorry for the long post. I would know how to use correctly the VADC on the iMX6 SoloX.

how to save correctly a video or stream the video in the video output ? etc.

Also how to save a picture/frame?

The documentation does not help and looks outdated.

Attachments

Outcomes