Hello,
We have our board set-up with a FPGA feeding 16bit YUV422P Discrete Sync to VIP0. Using OMX I was able to set-up the capture component for VIP0 and capture the signal with success:
I am now trying to change to the v4l2/vpss driver so I can capture using gstreamer (omx_camera did not work, it kept locking up syslink and kernel). I have configured the hdvpss_capture_sdev_info[] in ti81xx_vpss.c as below:
.name = TVP7002_INST0, .board_info = { /* TODO Find the correct address of the TVP7002 connected */ //I2C_BOARD_INFO("tvp7002", 0x5d), //.platform_data = &tvp7002_pdata, }, .vip_port_cfg = { .ctrlChanSel = VPS_VIP_CTRL_CHAN_SEL_7_0, .ancChSel8b = VPS_VIP_ANC_CH_SEL_DONT_CARE, .pixClkEdgePol = VPS_VIP_PIX_CLK_EDGE_POL_FALLING, .invertFidPol = 0, .embConfig = { .errCorrEnable = 0, .srcNumPos = VPS_VIP_SRC_NUM_POS_DONT_CARE, .isMaxChan3Bits = 0, }, .disConfig = { .fidSkewPostCnt = 0, .fidSkewPreCnt = 0, .lineCaptureStyle = VPS_VIP_LINE_CAPTURE_STYLE_ACTVID, .fidDetectMode = VPS_VIP_FID_DETECT_MODE_PIN, .actvidPol = VPS_VIP_POLARITY_HIGH, .vsyncPol = VPS_VIP_POLARITY_LOW, .hsyncPol = VPS_VIP_POLARITY_LOW, } }, .video_capture_mode = VPS_CAPT_VIDEO_CAPTURE_MODE_SINGLE_CH_NON_MUX_DISCRETE_SYNC_ACTVID_VSYNC, .video_if_mode = VPS_CAPT_VIDEO_IF_MODE_16BIT, .input_data_format = FVID2_DF_YUV422P,
I can capture using saLoopBack example and v4l2src through gstreamer succesfully, but the video signal is not correct. There is some kind of sync issue that I can not figure out (see attached):
I dumped the VIP0 registers using the OMX model and the v4l2 model to compare and they are different but I have no way of interpreting them as the VPSS register documentation is NDA. Maybe someone from TI could read these for me and tell me what the differences mean (see attached files)?
root@gatdvr3:~# ./devmem_test.o -v -r -l 1024 0x48105500 Request to memread 0x400 bytes from address 0x48105500 using 1 byte accesses Attempting to map 0x1000 bytes at address 0x48105000 open(/dev/mem) ok mmap() ok OK? y 48105500: 01 00 00 00 04 a5 40 00 00 00 00 00 00 00 00 00 48105510: 00 00 00 00 00 00 00 00 00 00 00 00 00 44 00 00 48105520: fc ff ff ff fc ff ff ff ff ff ff ff ff ff ff ff 48105530: 38 04 80 07 00 00 00 00 00 00 00 00 00 00 00 00 48105540: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 48105550: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 48105560: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 48105570: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 48105580: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 48105590: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 481055a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 481055b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 481055c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 481055d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 481055e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 481055f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 48105600: 01 00 00 00 04 a5 40 00 00 00 00 00 00 00 00 00 48105610: 00 00 00 00 00 00 00 00 00 00 00 00 00 44 00 00 48105620: fc ff ff ff fc ff ff ff ff ff ff ff ff ff ff ff 48105630: 38 04 80 07 00 00 00 00 00 00 00 00 00 00 00 00 48105640: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 48105650: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 48105660: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 48105670: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 48105680: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 48105690: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 481056a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 481056b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 481056c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 481056d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 481056e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 481056f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 48105700: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 48105710: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 48105720: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 48105730: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 48105740: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 48105750: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 48105760: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 48105770: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 48105780: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 48105790: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 481057a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 481057b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 481057c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 481057d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 481057e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 481057f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 48105800: 00 40 00 00 00 00 00 00 00 00 00 00 00 00 00 00 48105810: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 48105820: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 48105830: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 48105840: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc 48105850: 00 08 84 0c 10 00 10 00 90 01 04 00 00 00 00 00 48105860: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 48105870: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 48105880: 00 40 00 00 00 00 00 00 00 00 00 00 00 00 00 00 48105890: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 481058a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 481058b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 481058c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc 481058d0: 00 08 84 0c 10 00 10 00 90 01 04 00 00 00 00 00 481058e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 481058f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
root@gatdvr41:~# ./devmem_test.o -v -r -l 1024 0x48105500 Request to memread 0x400 bytes from address 0x48105500 using 1 byte accesses Attempting to map 0x1000 bytes at address 0x48105000 open(/dev/mem) ok mmap() ok OK? y 48105500: 01 00 00 00 14 a1 40 00 00 00 00 00 00 00 00 00 48105510: 00 00 00 00 00 00 00 00 00 00 00 00 00 44 00 00 48105520: fc ff ff ff fc ff ff ff ff ff ff ff ff ff ff ff 48105530: 38 04 80 07 00 00 00 00 00 00 00 00 00 00 00 00 48105540: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 48105550: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 48105560: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 48105570: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 48105580: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 48105590: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 481055a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 481055b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 481055c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 481055d0: 00 00 00 00 00 00 00 00 ff ff ff ff ff ff ff ff 481055e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 481055f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 48105600: 01 00 00 00 14 a1 40 00 00 00 00 00 00 00 00 00 48105610: 00 00 00 00 00 00 00 00 00 00 00 00 00 44 00 00 48105620: fc ff ff ff fc ff ff ff ff ff ff ff ff ff ff ff 48105630: 38 04 80 07 00 00 00 00 00 00 00 00 00 00 00 00 48105640: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 48105650: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 48105660: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 48105670: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 48105680: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 48105690: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 481056a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 481056b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 481056c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 481056d0: 00 00 00 00 00 00 00 00 ff ff ff ff ff ff ff ff 481056e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 481056f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 48105700: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 48105710: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 48105720: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 48105730: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 48105740: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 48105750: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 48105760: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 48105770: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 48105780: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 48105790: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 481057a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 481057b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 481057c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 481057d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 481057e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 481057f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 48105800: 00 40 00 00 00 00 00 00 00 00 00 00 00 00 00 00 48105810: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 48105820: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 48105830: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 48105840: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc 48105850: 00 08 84 0c 10 00 10 00 90 01 04 00 00 00 00 00 48105860: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 48105870: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 48105880: 00 40 00 00 00 00 00 00 00 00 00 00 00 00 00 00 48105890: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 481058a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 481058b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 481058c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc 481058d0: 00 08 84 0c 10 00 10 00 90 01 04 00 00 00 00 00 481058e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 481058f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Here is a side by side of the v4l2 (left, not working) versus the OMX (right, working) dump:
I have tried using VPS_VIP_LINE_CAPTURE_STYLE_HSYNC as the lineCaptureStyle for the VPSS but this causes frames to never be dequeued. Same if I try changing video_capture_mode to VPS_CAPT_VIDEO_CAPTURE_MODE_SINGLE_CH_NON_MUX_DISCRETE_SYNC_HSYNC_VSYNC.
Anyone out there have ideas?
Thanks-