Analog Camera Module on Embedded Linux on Colibri T20 board (with ADV7180)

Hi,

I am trying to connect the Analog Camera Module (ACM - Rev 1.1) with the Colibri Evaluation Board (Rev 3.1).
I have compiled the latest revision of Kernel and followed the details as described on link for enabling the analog camera support in Kernel.
I am using the RFS, which downloaded form link.

I want to use ACM with ADV7180 decoder - for only one channel - channel 1 X2 connector on ACM board. I have an HD camera. Current jumpers setting on ACM board are as below:

JP1 - Pin 2 and 3

JP2 - Pin 1 and 2

JP4, JP5, JP6 and JP7 - Open

JP3 - Connected

Commands, which I have applied:


v4l2-ctl -i 1
modprobe adv7180
modprobe tegra_v4l2_camera
gst-launch v4l2src ! deinterlace tff=1 method=4 ! nv_omx_videomixer ! nv_gl_eglimagesink

I am not getting camera’s output. But, white/black lines are displaying on screen running from right-to-left diagonally on screen, only whrn camera is connected.. After some time with connected camera, system hangs/locks-up.

What will be the possible solution for this?
Is there anything, which I am missing something(e.g. Modules, any “.ko” or etc. )?

Let me know about it.

Can you provide the output of

uname -a
cat /etc/issue
ls /lib/modules/

Did you deploy the kernel modules? Also provide the output of lsmod after loading the modules.

Hi,

Outputs are as below:


root@colibri-t20:~# uname -a

Linux colibri-t20 3.1.10-gbe10973 #1 SMP PREEMPT Tue Aug 2 12:40:59 IST 2016 armv7l GNU/Linux


root@colibri-t20:~# cat /etc/issue

.—O—.
| | .-. o o
| | |-----.-----.-----.| | .----…-----.-----.
| | | __ | —‘| ‘–.| .-’| | |
| | | | | |— || --’| | | ’ | | | |
‘—’—‘–’–‘–. |-----’‘----’‘–’ ‘-----’-‘-’-’
-’ |
‘—’

The Angstrom Distribution \n \l

Angstrom v2015.12 - Kernel \r

Colibri_T20_LinuxImageV2.6_20160701


root@colibri-t20:~# ls /lib/modules/

3.1.10-V2.6b2+gbe10973


I don’t have any modules, because I didn’t marked ‘Analog Devices ADV7180 decoder (CONFIG_VIDEO_ADV7180)’ as a module in menuconfig, I have marked it as *. Same with ‘SoC camera support (CONFIG_SOC_CAMERA)’

Is it required to mark as ‘module’?

Please setup the ACM as per the following article on our developer website.

Hi,

Which type of cameras is supported by this ACM?

Is any particular company or camera types only supported by ACM?

Currently I am using ‘HIKVISION -DS-2CE16C2T-IRP’ camera with ACM.

Please, let me know.

Thanks,

Hi Marcel,

I setup the ACM exactly same as described on link.
I am using ADV7180 and Channel 1 on the X2 connector on ACM.

Marked ‘Analog Devices ADV7180 decoder (CONFIG_VIDEO_ADV7180)’ and ‘SoC camera support (CONFIG_SOC_CAMERA)’ as (*) in Kenel menuconfig, so it doesn’t require to load the module.

Set Channel 1:

v4l2-ctl -i 0
Executed successfully. It means communication with ACM is established correctly.(Thinking…!!)

Test Video Output :

gst-launch v4l2src ! deinterlace tff=1 method=4 ! nv_omx_videomixer ! nv_gl_eglimagesink

Is the above command correct for this?

There is 2 nodes ‘/dev/video0’ and ‘/dev/video1’ on the file system.

As I mentioned earlier, that when I am connecting the HD camera with ACM, white & black lines are displayed on screen running from right-to-left diagonal on screen like noisy screen.

Let me know if there is any other way to test the camera with ACM.
Or, Am I missing anything with setup?

Thanks,

Since you used modprobe which is stated in your question, I assumed you had loadable modules. modprobe or insmod is only applicable for loadable modules. Since you have them builtin modprobe is not required.

Did you check your dmesg logs? Does it show output similar to below?

root@colibri-t20:~# dmesg | grep -i "adv"
[    1.042566] Advanced Linux Sound Architecture Driver Version 1.0.24.
[    5.248553] adv7180 0-0021: chip found @ 0x42 (Tegra I2C adapter)
[    5.258223] adv7180 0-0021: ident reg is 0x1e

Is the ADV 7180 detected and shown on running i2cdetect?

root@colibri-t20:~# i2cdetect -y -r 0
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- UU -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- UU -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --                         

Note the address 0x21 which belongs to ADV 7180. You mention two video nodes. Do you have multiple cameras connected? With only ADV 7180 connected, one should only see video0.

One can specify the video node while running the pipeline.

root@colibri-t20:~# gst-launch v4l2src device=/dev/video0 ! deinterlace tff=1 method=4 ! nv_omx_videomixer ! nv_gl_eglimagesink

Any analogue camera should really work but we mainly tested PAL ones. NTSC resp. SECAM ones may require further driver adjustment.

HI Sanchayan,

The output of dmesg and i2cdetect are as below (same as yours):


root@colibri-t20:~# dmesg | grep -i "adv"
[    1.025737] Advanced Linux Sound Architecture Driver Version 1.0.24.
[    5.249201] adv7180 0-0021: chip found @ 0x42 (Tegra I2C adapter)
[    5.258500] adv7180 0-0021: ident reg is 0x1e


 root@colibri-t20:~# i2cdetect -y 0
      0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
 00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
 20: -- UU -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
 50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
 60: -- -- -- -- -- -- -- -- UU -- -- -- -- -- -- -- 
 70: -- -- -- -- -- -- -- -- 

I don’t about it, but I am getting two node in ‘/dev’


root@colibri-t20:~# ls -al /dev/video*
crw-rw----    1 root     video      81,   0 Aug  3 18:11 /dev/video0
crw-rw----    1 root     video      81,   1 Aug  3 18:11 /dev/video1

I have tried with

root@colibri-t20:~# gst-launch v4l2src device=/dev/video0 ! deinterlace tff=1 method=4 ! nv_omx_videomixer ! nv_gl_eglimagesink

command, still result is same.

I am testing with an HD camera, so Is this affecting?

Thanks,
Jaymin

Thanks for information.