We have some issues with our Board trying to receive a 16-Bit video Stream (YUYV with external HSync and VSync) with 1080p25 resolution from an external SOC connected to CSI0 of IPU1 of our iMX6DL
(Pixel Clock ~ 78MHz, HSync Freq ~28kHz, VSync Freq 25Hz).
See schematics attached.
We have TVP5150 connected on CSI1 and also set the GPR13 register to 0x24 so that the routing of both CSI interfaces into the IPU is ok.
TVP5150 input is working very well but on CSI0 we have some severe issues that the IPU does not forward any frame into the V4L interface.
If we misconfigure CSI0 to be a BT656 device with integrated sync then we get some green frames forwarded now and then into our gstreamer pipeline.
The driver for our CSI0 Capture device is hdtv.c which is taken over from our working tvp5150 driver (also attached).
We have extended mxc_v4l2_capture.c so that if we configure V4L2_IF_TYPE_BT656_MODE_NOBT_16BIT that csi_param.data_width = IPU_CSI_DATA_WIDTH_16 is set.
We are running the original 4.1.15 kernel released by NXP.
we also tried with 8-Bit width but it does not work either.
We already checked all electrical connections (by configuring the pins as GPIO and checking for input level and also using an oscilloscope) - all this looks alright (Vsync, HSync are positive pulses, PixelClock samples on rising edge).
The CSI0 registers in IPU look ok as well.
Attached is the console log and also our DTB file.
# insmod /hdtv_mxc.ko
Init HDTV
HDTV PROBE
HDTV: CSI ID 0
ADDR HDTV_DATA: 7F000DECIn MVC: mxc_v4l2_master_attach
slave.name = hdtv
master.name = mxc_v4l2_cap1
mxc_v4l2_master_attach: csi doesn't match:0 - 1
In MVC: mxc_v4l2_master_attach
slave.name = hdtv
master.name = mxc_v4l2_cap0
CAM DEVICE TYPE: 0End of mxc_v4l2_master_attach: v2f pix widthxheight 288 x 352
End of mxc_v4l2_master_attach: crop_bounds widthxheight 1920 x 1080
End of mxc_v4l2_master_attach: crop_defrect widthxheight 1920 x 1080
End of mxc_v4l2_master_attach: crop_current widthxheight 1920 x 1080
camera hdtv is found v4l2 res 0
HDTV PROBE:0 - 0
# gst-launch-1.0 imxv4l2videosrc ! imxipuvideotransform ! fbdevsink
In MVC: mxc_v4l_open
device name is Mxc Camera
clock_curr=mclk=80208000
End of mxc_v4l_open: v2f pix widthxheight 288 x 352
End of mxc_v4l_open: crop_bounds widthxheight 1920 x 1080
End of mxc_v4l_open: crop_defrect widthxheight 1920 x 1080
End of mxc_v4l_open: crop_current widthxheight 1920 x 1080
On Open: Input to ipu size is 1920 x 1080
In MVC:mxc_v4l_ioctl
In MVC: mxc_v4l_do_ioctl 80685600
case VIDIOC_QUERYCAP
In MVC:mxc_v4l_close
mxc_v4l_close: release resource
MVC: In mxc_free_frame_buf
In MVC:mxc_free_frames
In MVC: mxc_v4l_open
device name is Mxc Camera
ERROR: v4l2 capture: slave not found!
Setting pipeline to PAUSED ...
In MVC: mxc_v4l_open
device name is Mxc Camera
clock_curr=mclk=80208000
End of mxc_v4l_open: v2f pix widthxheight 288 x 352
End of mxc_v4l_open: crop_bounds widthxheight 1920 x 1080
End of mxc_v4l_open: crop_defrect widthxheight 1920 x 1080
End of mxc_v4l_open: crop_current widthxheight 1920 x 1080
On Open: Input to ipu size is 1920 x 1080
In MVC:mxc_v4l_ioctl
In MVC: mxc_v4l_do_ioctl 80685600
case VIDIOC_QUERYCAP
In MVC:mxc_v4l_ioctl
In MVC: mxc_v4l_do_ioctl 8008563f
case default or not supported:-2146937281 - 0x8008563F
In MVC:mxc_v4l_ioctl
In MVC: mxc_v4l_do_ioctl 80085617
case VIDIOC_G_STD
In mxc_v4l2_g_std
In MVC:mxc_v4l_ioctl
In MVC: mxc_v4l_do_ioctl 40085618
case VIDIOC_S_STD
In mxc_v4l2_s_std 0
ERROR: unrecognized std! 0 (PAL=ff, NTSC=b000
In MVC:mxc_v4l_ioctl
In MVC: mxc_v4l_do_ioctl c0cc5604
case VIDIOC_G_FMT
In MVC: mxc_v4l2_g_fmt type=1
type is V4L2_BUF_TYPE_VIDEO_CAPTURE
End of mxc_v4l2_g_fmt: v2f pix widthxheight 288 x 352
End of mxc_v4l2_g_fmt: crop_bounds widthxheight 720 x 625
End of mxc_v4l2_g_fmt: crop_defrect widthxheight 1920 x 1080
End of mxc_v4l2_g_fmt: crop_current widthxheight 720 x 576
In MVC:mxc_v4l_ioctl
In MVC: mxc_v4l_do_ioctl c02c564a
In MVC:mxc_v4l_ioctl
In MVC: mxc_v4l_do_ioctl c0045627
case VIDIOC_S_INPUT
In MVC:mxc_streamoff
In MVC:mxc_v4l_ioctl
In MVC: mxc_v4l_do_ioctl c0cc5616
case VIDIOC_S_PARM
In mxc_v4l2_s_param
Current capabilities are 1001
Current capturemode is 0 change to 0
Current framerate is 25 change to 30
type is V4L2_BUF_TYPE_VIDEO_CAPTURE
ERROR: hdtv: ioctl_s_parm: This camera does not allow frame rate changes.
ioctl_s_parm hdtv_OUTPUT_CONTROL_CHIP_ENABLE
clock_curr=mclk=80208000
clock_curr=mclk=80208000
g_fmt_cap returns widthxheight of input as 1920 x 1080
In MVC:mxc_v4l_ioctl
In MVC: mxc_v4l_do_ioctl c0cc5605
case VIDIOC_S_FMT
In MVC: mxc_v4l2_s_fmt
type=V4L2_BUF_TYPE_VIDEO_CAPTURE
End of mxc_v4l2_s_fmt: v2f pix widthxheight 1920 x 1080
End of mxc_v4l2_s_fmt: crop_bounds widthxheight 1920 x 1080
End of mxc_v4l2_s_fmt: crop_defrect widthxheight 1920 x 1080
End of mxc_v4l2_s_fmt: crop_current widthxheight 1920 x 1080
In MVC:mxc_v4l_ioctl
In MVC: mxc_v4l_do_ioctl c0cc5604
case VIDIOC_G_FMT
In MVC: mxc_v4l2_g_fmt type=1
type is V4L2_BUF_TYPE_VIDEO_CAPTURE
End of mxc_v4l2_g_fmt: v2f pix widthxheight 1920 x 1080
End of mxc_v4l2_g_fmt: crop_bounds widthxheight 1920 x 1080
End of mxc_v4l2_g_fmt: crop_defrect widthxheight 1920 x 1080
End of mxc_v4l2_g_fmt: crop_current widthxheight 1920 x 1080
In MVC:mxc_v4l_ioctl
In MVC: mxc_v4l_do_ioctl c008561c
case VIDIOC_S_CTRL
In MVC:mxc_v4l2_s_ctrl
default case
In MVC:mxc_v4l_ioctl
In MVC: mxc_v4l_do_ioctl c008561c
case VIDIOC_S_CTRL
In MVC:mxc_v4l2_s_ctrl
default case
In MVC:mxc_v4l_ioctl
In MVC: mxc_v4l_do_ioctl c008561b
case VIDIOC_G_CTRL
In MVC:mxc_v4l2_g_ctrl
ERROR: v4l2 capture: unsupported ioctrl!
In MVC:mxc_v4l_ioctl
In MVC: mxc_v4l_do_ioctl c008561c
case VIDIOC_S_CTRL
In MVC:mxc_v4l2_s_ctrl
default case
Pipeline is live and does not neeIn MVC:mxc_v4l_ioctl
d PREROLL ...
In MVC: mxc_v4l_do_ioctl c0cc5604
Setting pipeline to PLAYING ...
case VIDIOC_G_FMT
New clock: GstSystemClock
In MVC: mxc_v4l2_g_fmt type=1
type is V4L2_BUF_TYPE_VIDEO_CAPTURE
End of mxc_v4l2_g_fmt: v2f pix widthxheight 1920 x 1080
End of mxc_v4l2_g_fmt: crop_bounds widthxheight 1920 x 1080
End of mxc_v4l2_g_fmt: crop_defrect widthxheight 1920 x 1080
End of mxc_v4l2_g_fmt: crop_current widthxheight 1920 x 1080
In MVC:mxc_v4l_ioctl
In MVC: mxc_v4l_do_ioctl c0cc5604
case VIDIOC_G_FMT
In MVC: mxc_v4l2_g_fmt type=1
type is V4L2_BUF_TYPE_VIDEO_CAPTURE
End of mxc_v4l2_g_fmt: v2f pix widthxheight 1920 x 1080
End of mxc_v4l2_g_fmt: crop_bounds widthxheight 1920 x 1080
End of mxc_v4l2_g_fmt: crop_defrect widthxheight 1920 x 1080
End of mxc_v4l2_g_fmt: crop_current widthxheight 1920 x 1080
In MVC:mxc_v4l_ioctl
In MVC: mxc_v4l_do_ioctl c0145608
case VIDIOC_REQBUFS
In MVC:mxc_streamoff
MVC: In mxc_free_frame_buf
In MVC:mxc_allocate_frame_buf - size=4147200
In MVC:mxc_v4l_ioctl
In MVC: mxc_v4l_do_ioctl c0445609
case VIDIOC_QUERYBUF
In MVC:mxc_v4l2_buffer_status
In MVC:mxc_mmap
pgoff=0x72b00, start=0x74e0b000, end=0x75200000
In MVC:mxc_v4l_ioctl
In MVC: mxc_v4l_do_ioctl c0445609
case VIDIOC_QUERYBUF
In MVC:mxc_v4l2_buffer_status
In MVC:mxc_v4l_ioctl
In MVC: mxc_v4l_do_ioctl 80685600
case VIDIOC_QUERYCAP
In MVC:mxc_v4l_ioctl
In MVC: mxc_v4l_do_ioctl c044560f
case VIDIOC_QBUF
In MVC:mxc_v4l_ioctl
In MVC: mxc_v4l_do_ioctl c0445609
case VIDIOC_QUERYBUF
In MVC:mxc_v4l2_buffer_status
In MVC:mxc_mmap
pgoff=0x73100, start=0x74a16000, end=0x74e0b000
In MVC:mxc_v4l_ioctl
In MVC: mxc_v4l_do_ioctl c0445609
case VIDIOC_QUERYBUF
In MVC:mxc_v4l2_buffer_status
In MVC:mxc_v4l_ioctl
In MVC: mxc_v4l_do_ioctl 80685600
case VIDIOC_QUERYCAP
In MVC:mxc_v4l_ioctl
In MVC: mxc_v4l_do_ioctl c044560f
case VIDIOC_QBUF
In MVC:mxc_v4l_ioctl
In MVC: mxc_v4l_do_ioctl c0445609
case VIDIOC_QUERYBUF
In MVC:mxc_v4l2_buffer_status
In MVC:mxc_mmap
pgoff=0x73500, start=0x74621000, end=0x74a16000
In MVC:mxc_v4l_ioctl
In MVC: mxc_v4l_do_ioctl c0445609
case VIDIOC_QUERYBUF
In MVC:mxc_v4l2_buffer_status
In MVC:mxc_v4l_ioctl
In MVC: mxc_v4l_do_ioctl 80685600
case VIDIOC_QUERYCAP
In MVC:mxc_v4l_ioctl
In MVC: mxc_v4l_do_ioctl c044560f
case VIDIOC_QBUF
In MVC:mxc_v4l_ioctl
In MVC: mxc_v4l_do_ioctl c0445609
case VIDIOC_QUERYBUF
In MVC:mxc_v4l2_buffer_status
In MVC:mxc_mmap
pgoff=0x73900, start=0x7422c000, end=0x74621000
In MVC:mxc_v4l_ioctl
In MVC: mxc_v4l_do_ioctl c0445609
case VIDIOC_QUERYBUF
In MVC:mxc_v4l2_buffer_status
In MVC:mxc_v4l_ioctl
In MVC: mxc_v4l_do_ioctl 80685600
case VIDIOC_QUERYCAP
In MVC:mxc_v4l_ioctl
In MVC: mxc_v4l_do_ioctl c044560f
case VIDIOC_QBUF
In MVC:mxc_v4l_ioctl
In MVC: mxc_v4l_do_ioctl c0445609
case VIDIOC_QUERYBUF
In MVC:mxc_v4l2_buffer_status
In MVC:mxc_mmap
pgoff=0x73d00, start=0x73e37000, end=0x7422c000
In MVC:mxc_v4l_ioctl
In MVC: mxc_v4l_do_ioctl c0445609
case VIDIOC_QUERYBUF
In MVC:mxc_v4l2_buffer_status
In MVC:mxc_v4l_ioctl
In MVC: mxc_v4l_do_ioctl 80685600
case VIDIOC_QUERYCAP
In MVC:mxc_v4l_ioctl
In MVC: mxc_v4l_do_ioctl c044560f
case VIDIOC_QBUF
In MVC:mxc_v4l_ioctl
In MVC: mxc_v4l_do_ioctl c0445609
case VIDIOC_QUERYBUF
In MVC:mxc_v4l2_buffer_status
In MVC:mxc_mmap
pgoff=0x74100, start=0x73a42000, end=0x73e37000
In MVC:mxc_v4l_ioctl
In MVC: mxc_v4l_do_ioctl c0445609
case VIDIOC_QUERYBUF
In MVC:mxc_v4l2_buffer_status
In MVC:mxc_v4l_ioctl
In MVC: mxc_v4l_do_ioctl 80685600
case VIDIOC_QUERYCAP
In MVC:mxc_v4l_ioctl
In MVC: mxc_v4l_do_ioctl c044560f
case VIDIOC_QBUF
In MVC:mxc_v4l_ioctl
In MVC: mxc_v4l_do_ioctl 40045612
case VIDIOC_STREAMON
In MVC:mxc_streamon
IPU:In csi_enc_enabling_tasks
In csi_enc_setup
MEM INTERLACED: 0
PIX FMT: 1498831189
eba 72b00000
eba 73100000
In MVC:mxc_v4l_ioctl
In MVC: mxc_v4l_do_ioctl c0445611
case VIDIOC_DQBUF
In MVC:mxc_v4l_dqueue
ERROR: v4l2 capture: mxc_v4l_dqueue timeout enc_counter 0
ERROR: from element /GstPipeline:In MVC:mxc_v4l_ioctl
In MVC: mxc_v4l_do_ioctl c008561c
case VIDIOC_S_CTRL
In MVC:mxc_v4l2_s_ctrl
default case
pipeline0/GstImxV4l2VideoSrc:imxvIn MVC:mxc_v4l_ioctl
In MVC: mxc_v4l_do_ioctl c008561c
case VIDIOC_S_CTRL
In MVC:mxc_v4l2_s_ctrl
default case
4l2videosrc0: Internal data streaIn MVC:mxc_v4l_ioctl
In MVC: mxc_v4l_do_ioctl c008561b
case VIDIOC_G_CTRL
In MVC:mxc_v4l2_g_ctrl
ERROR: v4l2 capture: unsupported ioctrl!
m error.
In MVC:mxc_v4l_ioctlo:
gstbasesrc.c(3055): gst_base_srcIn MVC: mxc_v4l_do_ioctl 40045613
case VIDIOC_STREAMOFF
In MVC:mxc_streamoff
CSI REQUEST IRQ: 0
_loop (): /GstPipeline:pipeline0/GstImxV4l2VideoSrc:imxv4l2videosrc0:
streaming stopped, reason error (-5)
Execution ended after 0:00:10.487356001
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
In MVC:mxc_free_frames
In MVC:mxc_v4l_close
mxc_v4l_close: release resource
MVC: In mxc_free_frame_buf
In MVC:mxc_free_frames
Setting pipeline to NULL ...
Freeing pipeline ...
#