imx6q for 7181c

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

imx6q for 7181c

1,085 Views
senli
Contributor II

Hi all:

       I am using ADV7181c on our board with iMX6Q. I have tried to modity the source code in adv7180.c . And the BSP I used is linux 3.14.52.

       I modified the "adv7180_hard_reset", adv7181 I2C register setting for CVBS input that is as below:

 adv7180_write_reg(0x03 , 0x0C);
adv7180_write_reg(0x04 , 0x77);
adv7180_write_reg(0x17 , 0x41);
adv7180_write_reg(0x1D , 0x47);
adv7180_write_reg(0x31 , 0x02);
adv7180_write_reg(0x3A , 0x17);
adv7180_write_reg(0x3B , 0x81);
adv7180_write_reg(0x3D , 0xA2);
adv7180_write_reg(0x3E , 0x6A);
adv7180_write_reg(0x3F , 0xA0);
adv7180_write_reg(0x86 , 0x0B);
adv7180_write_reg(0xF3 , 0x01);
adv7180_write_reg(0xF9 , 0x03);
adv7180_write_reg(0x0E , 0x80);
adv7180_write_reg(0x52 , 0x46);
adv7180_write_reg(0x54 , 0x00);
adv7180_write_reg(0x7F , 0xFF);
adv7180_write_reg(0x81 , 0x30);
adv7180_write_reg(0x90 , 0xC9);
adv7180_write_reg(0x91 , 0x40);
adv7180_write_reg(0x92 , 0x3C);
adv7180_write_reg(0x93 , 0xCA);
adv7180_write_reg(0x94 , 0xD5);
adv7180_write_reg(0xB1 , 0xFF);
adv7180_write_reg(0xB6 , 0x08);
adv7180_write_reg(0xC0 , 0x9A);
adv7180_write_reg(0xCF , 0x50);
adv7180_write_reg(0xD0 , 0x4E);
adv7180_write_reg(0xD1 , 0xB9);
adv7180_write_reg(0xD6 , 0xDD);
adv7180_write_reg(0xD7 , 0xE2);
adv7180_write_reg(0xE5 , 0x51);
adv7180_write_reg(0xF6 , 0x3B);
adv7180_write_reg(0x0E , 0x00);

 

And I also modified the" ioctl_g_ifparm" as below

#if 1
p->u.bt656.nobt_hs_inv = 0;
p->u.bt656.bt_sync_correct = 0;
p->u.bt656.clock_curr = 0;
p->u.bt656.latch_clk_inv =1;
#else
p->u.bt656.nobt_hs_inv = 1;
p->u.bt656.bt_sync_correct = 1;
#endif

But it is working unormally .

I use imxcamera,but it can not display anything .the uart debug message as below

./imxcamera
[ 2207.476389]
[ 2207.476389] In MVC: mxc_v4l_open
[ 2207.481110] In MVC: mxc_v4l_open cam->sensor->type=0x2 cam->sensor=0x7f0056b8
[ 2207.488312] current_input=0
[ 2207.491114] ioctl_g_ifparm
[ 2207.493862] Returning size of 720x625 fmt0x59565955
[ 2207.499006] ioctl_g_fmt_cap
[ 2207.501804] End of mxc_v4l_open: v2f pix widthxheight 720 x 480
[ 2207.507783] End of mxc_v4l_open: crop_bounds widthxheight 720 x 625
[ 2207.514080] End of mxc_v4l_open: crop_defrect widthxheight 720 x 625
[ 2207.520438] End of mxc_v4l_open: crop_current widthxheight 720 x 625
[ 2207.526808] On Open: Input to ipu size is 720 x 625
[ 2207.531706] width=720 height=625 pixelformat=0x59565955 ret=0
[ 2207.537761] ioctl_s_power on
[ 2207.942748] ioctl_init
[ 2207.945132] ioctl_dev_init
[ 2207.947941] mxc_v4l_open ret=0
A camera add to dev list: "/dev/video0"
** Message: GStreamer version 1.4.5
** Message: text sink set to appsink
RecorderEngineCreate success
set file count: 0
set max file size 0
[ 2208.160202]
[ 2208.160202] In MVC: mxc_v4l_open
[ 2208.164981] In MVC: mxc_v4l_open cam->sensor->type=0x2 cam->sensor=0x7f0056b8
[ 2208.172224] current_input=0
[ 2208.175106] ioctl_g_ifparm
[ 2208.177884] Returning size of 720x625 fmt0x59565955
[ 2208.183103] ioctl_g_fmt_cap
[ 2208.185904] End of mxc_v4l_open: v2f pix widthxheight 720 x 480
[ 2208.191827] End of mxc_v4l_open: crop_bounds widthxheight 720 x 625
[ 2208.198741] End of mxc_v4l_open: crop_defrect widthxheight 720 x 625
[ 2208.205214] End of mxc_v4l_open: crop_current widthxheight 720 x 625
[ 2208.211611] On Open: Input to ipu size is 720 x 625
[ 2208.216597] width=720 height=625 pixelformat=0x59565955 ret=0
[ 2208.222693] ioctl_s_power on
[ 2208.632753] ioctl_init
[ 2208.635138] ioctl_dev_init
[ 2208.637949] mxc_v4l_open ret=0
[ 2208.641079] ioctl_g_chip_ident
[ 2208.644778] fmt0x0
[ 2208.647708] V4L2_STD_NTSC status_1=0xf
[ 2208.651477] ioctl_g_fmt_cap
[ 2208.654392] ioctl_enum_framesizes video_idx=0
[ 2208.658877] ioctl_enum_frameintervals sucess i=0
[ 2208.664583] ioctl_enum_frameintervals index<1> error
[ 2208.669583] ioctl_enum_framesizes video_idx=0
[ 2208.674132] ioctl_enum_frameintervals sucess i=0
[ 2208.679200] ioctl_enum_frameintervals index<1> error
[ 2208.684276] ioctl_enum_framesizes video_idx=0
[ 2208.688743] ioctl_enum_frameintervals sucess i=0
[ 2208.693567] ioctl_enum_frameintervals index<1> error
[ 2208.698541] ioctl_enum_framesizes video_idx=0
[ 2208.703016] ioctl_enum_frameintervals sucess i=0
[ 2208.707839] ioctl_enum_frameintervals index<1> error
====== IMXV4L2SRC: 4.0.8 build on Aug 26 2016 18:04:19. ======
display(/dev/fb0) resolution is (1920x720).
====== OVERLAYSINK: 4.0.8 build on Aug 26 2016 18:04:27. ======
====== MP3ENC: 4.0.8 build on Aug 26 2016 18:04:33. ======
display(/dev/fb0) resolution is (1920x720).

** (imxcamera:338): WARNING **: can't set camerabin to playing

engine prepare failed.

And I use ioctl(fd,VIDIOC_DQBUF,&buf);  

I always get the error message "ERROR: v4l2 capture: mxc_v4l_dqueue timeout enc_counter 0"

How can I fixed this problem ?

Labels (2)
Tags (1)
0 Kudos
2 Replies

792 Views
yyuan
Contributor III

hello   

please, imxcamera`s code   Where is the source?

thank you

0 Kudos

792 Views
igorpadykov
NXP Employee
NXP Employee

Hi sen

for adv7181 one can look at

https://community.freescale.com/message/314760#314760

and recommended to test with i.MX6 nxp releases on

i.MX 6 Series Software and Development Tool|NXP 

with imx-test package, use mxc_v4l2_tvin test as v4l2 capture

is used for parallel non bt656 camera

www.nxp.com/lgfiles/NMG/MAD/YOCTO/imx-test-5.3.tar.gz

tests descriptions can be found in attached Linux Manual

sect.6.4.2 Video4Linux API test

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos