Hi all,
We have a custom i.MX6Dual board on which we receive 2 BT656 PAL video flows. These flows are decoded by an AVD7280 video decoder chip on each channel which provides either:
The kernel used is Linux 3.0.35_4.0.0.
Interlaced at 25 fps : OK
We can successfully read the interlaced video flow at 25 fps using either:
mxc_v4l2_tvin -ow 720 -oh 576 -vi 0 -vo 17 -dv ### CSI0 -> HDMI
mxc_v4l2_tvin -ow 720 -oh 576 -vi 1 -vo 17 -dv ### CSI1 -> HDMI
gst-launch -v --gst-debug=2 -e mfw_v4lsrc device=/dev/video0 fps-n=25 input=1 ! vpuenc codec=avc framerate-nu=25 bitrate=4194304 ! rtph264pay ! udpsink host=10.100.57.5 port=5000 sync=false -v &
gst-launch -v --gst-debug=2 -e mfw_v4lsrc device=/dev/video1 fps-n=25 input=1 ! vpuenc codec=avc framerate-nu=25 bitrate=4194304 ! rtph264pay ! udpsink host=10.100.57.5 port=5002 sync=false -v &
Progressive at 50 fps : KO
When activating the I2P feature (using Analog Devices provided scripts that we assume reliable), we can’t read the video flow anymore using either application.
The main change we have tried is:
diff --git a/drivers/media/video/mxc/capture/mxc_v4l2_capture.c b/drivers/media/video/mxc/capture/mxc_v4l2_capture.c
index d21f847..05fcede 100644
Index: drivers/media/video/mxc/capture/mxc_v4l2_capture.c
===================================================================
--- a/drivers/media/video/mxc/capture/mxc_v4l2_capture.c
+++ b/drivers/media/video/mxc/capture/mxc_v4l2_capture.c
@@ -1343,10 +1343,14 @@ static int mxc_v4l2_s_param(cam_data *cam, struct v4l2_streamparm *parm)
csi_param.mclk = 0;
pr_debug(" clock_curr=mclk=%d\n", ifparm.u.bt656.clock_curr);
+#if 0
if (ifparm.u.bt656.clock_curr == 0)
csi_param.clk_mode = IPU_CSI_CLK_MODE_CCIR656_INTERLACED;
else
csi_param.clk_mode = IPU_CSI_CLK_MODE_GATED_CLK;
+#else
+ csi_param.clk_mode = IPU_CSI_CLK_MODE_CCIR656_PROGRESSIVE;
+#endif
csi_param.pixclk_pol = ifparm.u.bt656.latch_clk_inv;
We have also tried a few other changes in our driver without any success (sensor’s streamcap.timeperframe.denominator set to 50 instead of 25, testing a few bt656 structure member changes or PAL attributes) but nothing works… It always fails in the VIDIOC_DQBUF ioctl, and it looks like the video frames of the capture device are ignored!
Questions
Has anybody successfully read PAL progressive video frames on BT656 at 50 fps?
By checking on i.MX community, we saw Switching CSI into Progressive bt.656 Mode mentioning successful support of the TW9912 (competitor of the ADV7280) but on 2.6.35 and on an unspecified type of CPU.
We also checked Q&A: Is it really possible to implement the BT656 with SAV / EAV and without external HSYNC/VSYN... explaining it doesn’t work on i.MX6Q and our feeling is similar.
Any suggestion?
已解决! 转到解答。
rogeriopimentel Feb 26, 2014 2:17 PM (in response to jamesbone)
We don't have any HW like this to test and so, it wasn't tested.
If you're trying to capture progressive images, I'd recommend to use mxc_v4l2_overlay unit test as example code instead of mxc_v4l2_tvin.
The overlay is used to capture and display videos from OVxxxx cameras that send progressive signals and don't use VDI block in IPU.
Rgds
Rogerio
rogeriopimentel Feb 26, 2014 2:17 PM (in response to jamesbone)
We don't have any HW like this to test and so, it wasn't tested.
If you're trying to capture progressive images, I'd recommend to use mxc_v4l2_overlay unit test as example code instead of mxc_v4l2_tvin.
The overlay is used to capture and display videos from OVxxxx cameras that send progressive signals and don't use VDI block in IPU.
Rgds
Rogerio