tvp5158 porting to imx27 platform

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

tvp5158 porting to imx27 platform

Jump to solution
2,124 Views
zhangjay
Contributor II

Hi all,

 

I'm using tv decoder(tvp5158) on imx27, using the 4 channel half D1 mode.

I config the register by using i2c, and set the interface param as below:

 

param->Vsync_pol = 0x0;
param->clk_mode = 0x0;//gated
param->pixclk_pol = 0x0;
param->data_width = 0x1;
param->data_pol = 0x0;
param->ext_vsync = 0x1;
param->Vsync_pol = 0x0;
param->Hsync_pol = 0x0;
param->width = width - 1;
param->height = height - 1;
param->pixel_fmt = IPU_PIX_FMT_UYVY;
param->mclk = 54000000;
/* setup cropping */

when insert the mode, I use the mxc_v4l2_capture test tool to capture image, but I always get the error log

mx27# ./mxc_v4l2_capture.out -w 360 -h 480 -c 1 /mnt/sample.yuv

g_width = 360, g_height = 480

TVP5158 Chip version = TVP5158

        ====>chip id: tvp5158

Patch is downloading...

0xa2  0x10  0x25  0xe5  0xe8  0x00  0x1b  0x04 

0x1e  0x90  0xa5  0x00  0x02  0x01  0x14  0x00  0x51  0x58  0x0d  0x02  0x81  0x00  0x03  0x03 

0x80  0x80  0x00  0x80  0x00  0x00  0x10  0x0a  0x40  0x00  0x00  0x00  0x0c  0x00  0x00  0x00 

0x00  0x00  0x00  0x80  0x00  0xf5  0x00  0x00  0x00  0x06  0x1e  0x04  0x00  0xf2  0x08  0x04 

0xff  0xff  0x00  0x00  0x6a  0x08  0x05  0x07  0x7a  0x00  0xd0  0x02  0x19  0x00  0xf0  0x00 

0x25  0x03  0x40  0x00  0x04  0x00  0x07  0x00  0x7a  0x00  0xd0  0x02  0x01  0x00  0x15  0x00 

0x7a  0x00  0xd0  0x02  0x8d  0x00  0xbc  0x02  0x26  0x00  0xdc  0x00  0x1e  0x09  0x34  0x03 

0x00  0x09  0x40  0x1e  0x18  0x00  0x0b  0x00  0x00  0x1f  0x1f  0x02  0x10  0x04  0x64  0x20 

0x7d  0x00  0x8a  0x64  0x04  0x02  0x0f  0x0f  0x03  0x05  0x20  0x1e  0x02  0x08  0x03  0x03 

0x0a  0x00  0x5a  0x06  0x00  0x03  0x22  0x00  0x00  0x16  0x1d  0x64  0x00  0x00  0x0a  0x04 

0x10  0x80  0x80  0x00  0x00  0x00  0x60  0x50  0x00  0x00  0x00  0x0a  0x05  0x05  0x03  0xbc 

0xbc  0x00  0x0d  0x02  0x90  0x01  0x78  0x00  0x44  0x40  0x03  0xd8  0x05  0x00  0x01  0x00 

0xa2  0x10  0x25  0xe5  0xe8  0x00  0x1b  0x04  0x40  0x00  0x00  0x01  0xd7  0x0f  0x00  0x00 

0x00  0x88  0x88  0xe0  0x01  0x00  0x00  0x00  0x00  0xa5  0xff  0x7e  0x01  0x00  0x00  0x00 

0x70  0x00  0xd8  0x02  0x00  0x00  0x00  0x00  0x00  0x00  0x00  0x00  0x00  0x00  0x00  0x00 

0x02  0x02  0x00  0x00  0x25  0x25  0x25  0x25  0x61  0x00  0xb0  0x00  0x00  0x00  0x02  0x25 

0x08  0x00  0x00  0x00  0x00  0x00  0x00  0x00  0x00  0x25  0x25  0x25  0x25  0x25  0x0f        ====>chip id: tvp5158

Patch is already running

0xa2  0x10  0x25  0xe5  0xe8  0x00  0x1b  0x04 

0x1e  0x90  0xa6  0x00  0x02  0x01  0x14  0x00  0x51  0x58  0x0d  0x02  0x81  0x00  0x03  0x03 

0x80  0x80  0x00  0x80  0x00  0x00  0x10  0x0a  0x40  0x00  0x00  0x00  0x0c  0x00  0x00  0x00 

0x00  0x00  0x00  0x80  0x00  0xf5  0x00  0x00  0x00  0x06  0x1e  0x04  0x00  0xf2  0x08  0x04 

0xff  0xff  0x00  0x00  0x6a  0x08  0x05  0x07  0x7a  0x00  0xd0  0x02  0x19  0x00  0xf0  0x00 

0x25  0x03  0x40  0x00  0x04  0x00  0x07  0x00  0x7a  0x00  0xd0  0x02  0x01  0x00  0x15  0x00 

0x7a  0x00  0xd0  0x02  0x8d  0x00  0xbc  0x02  0x26  0x00  0xdc  0x00  0x1e  0x09  0x34  0x03 

0x00  0x09  0x40  0x1e  0x18  0x00  0x0b  0x00  0x00  0x1f  0x1f  0x02  0x10  0x04  0x64  0x20 

0x7d  0x00  0x8a  0x64  0x04  0x02  0x0f  0x0f  0x03  0x05  0x20  0x1e  0x02  0x08  0x03  0x03 

0x0a  0x00  0x5a  0x06  0x00  0x03  0x22  0x00  0x00  0x16  0x1d  0x64  0x00  0x00  0x0a  0x04 

0x10  0x80  0x80  0x00  0x00  0x00  0x60  0x50  0x00  0x00  0x00  0x0a  0x05  0x05  0x03  0xbc 

0xbc  0x00  0x0d  0x02  0x90  0x01  0x78  0x00  0x44  0x40  0x03  0xd8  0x05  0x00  0x01  0x00 

0xa2  0x10  0x25  0xe5  0xe8  0x00  0x1b  0x04  0x40  0x00  0x00  0x01  0xd7  0x0f  0x00  0x00 

0x00  0x88  0x88  0xe0  0x01  0x00  0x00  0x00  0x00  0xa5  0xff  0x7e  0x01  0x00  0x00  0x00 

0x70  0x00  0xd8  0x02  0x00  0x00  0x00  0x00  0x00  0x00  0x00  0x00  0x00  0x00  0x00  0x00 

0x02  0x02  0x00  0x00  0x25  0x25  0x25  0x25  0x61  0x00  0xb0  0x00  0x00  0x00  0x02  0x25 

0x08  0x00  0x00  0x00  0x00  0x00  0x00  0x00  0x00  0x25  0x25  0x25  0x25  0x25  0x0f         Width = 360     Height = 480       Image size = 259200

         pixelformat = 842093913

<3>mxc_v4l_dqueue timeout enc_counter 0

VIDIOC_DQBUF failed.

buf.index 0

mx27#

 

Attachment file is my tvp5158 driver, anyone can give me some advice?

Please help me.

Original Attachment has been moved to: tvp5158.c.txt.zip

Labels (3)
0 Kudos
1 Solution
992 Views
fabio_estevam
NXP Employee
NXP Employee

I am not sure how tvp5158 and tvp5150 are similar, but I would suggest you to take a look at the latest kernel that has support for the mx25 visstrim board, which is connected to a tvp5150:

https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/arch/arm/mach-imx/mach-imx27_vi...

The tvp5150 driver is located at:

https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/drivers/media/i2c/tvp5150.c?id=...

Hope this helps.

Regards,

Fabio Estevam

View solution in original post

0 Kudos
6 Replies
992 Views
liyu1
Contributor III

Do you have solved your problem?

               Thanks

0 Kudos
992 Views
翔李
Contributor IV

Hi

I am using tvp5158 on Imx6q board, Linux,can you share your tvp5158 driver source?

My email:xiang.li@ivicar.cn

thanks.

0 Kudos
993 Views
fabio_estevam
NXP Employee
NXP Employee

I am not sure how tvp5158 and tvp5150 are similar, but I would suggest you to take a look at the latest kernel that has support for the mx25 visstrim board, which is connected to a tvp5150:

https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/arch/arm/mach-imx/mach-imx27_vi...

The tvp5150 driver is located at:

https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/drivers/media/i2c/tvp5150.c?id=...

Hope this helps.

Regards,

Fabio Estevam

0 Kudos
992 Views
翔李
Contributor IV

Hi

I am using tvp5158 on Imx6q board, Linux,can you share your tvp5158 driver source?

My email:xiang.li@ivicar.cn

0 Kudos
992 Views
fabio_estevam
NXP Employee
NXP Employee

Sorry, I meant mx27 visstrim board.

0 Kudos
992 Views
zhangjay
Contributor II

Also provide the circuit diagram, there is no Vsync and Hsync on TVP5158.

QQ截图20131028154751.png

0 Kudos