Hello,
we would like to use mt9d111 (or similar) sensor in our new project, so I'm trying to make it working with dm365evm development board. I have it connected and I hope that I configured CPLD correctly (at least CLKIN, and I2C are working).
Now I'm fighting with linux driver and gstreamer. I modified my recent driver, which worked on a never kernel on a freescale processor to be compatible with dvsdk4.02 (similar to provided one for mt9p031). It is successfully registered during the boot.
vpfe_init
vpfe-capture: vpss clock vpss_master enabled
vpfe-capture vpfe-capture: v4l2 device registered
vpfe-capture vpfe-capture: video device registered
EVM: switch to HD imager video input
mt9d111 1-005d: MT9D111 chip detected, register read 1519
mt9d111 1-005d: mt9d111 1-005d decoder driver registered !!
vpfe-capture vpfe-capture: v4l2 sub device mt9d111 registered
vpfe_register_ccdc_device: DM365 ISIF
DM365 ISIF is registered with vpfe.
Now I would like to capture raw stream to a file using gstreamer
gst-launch -v \
v4l2src num-buffers=10 \
! "video/x-raw-yuv, format=(fourcc)UYVY, width=(int)640, height=(int)480" \
! filesink location=sample.raw
Unfortunately this commands hangs with following output and has to be killed with ctrl+c
Setting pipeline to PAUSED ...
/GstPipeline:pipeline0/GstV4l2Src:v4l2src0: queue-size = 3
/GstPipeline:pipeline0/GstV4l2Src:v4l2src0.GstPad:src: caps = video/x-raw-yuv, format=(fourcc)UYVY, framerate=(fraction)30000/1001, width=(int)640, height=(int)480
Pipeline is live and does not need PREROLL ...
WARNING: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Failed to set input 2 on device /dev/video0.
Additional debug info:
v4l2_calls.c(975): gst_v4l2_set_input (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
system error: Invalid argument
WARNING: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Video input device did not accept new frame rate setting.
Additional debug info:
v4l2src_calls.c(342): gst_v4l2src_set_capture (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
system error: Invalid argument
Setting pipeline to PLAYING ...
New clock: GstSystemClock
and dmesg log is here ....
davinci_resizer davinci_resizer.2: RSZ_G_CONFIG:0:1:124
davinci_previewer davinci_previewer.2: ipipe_set_preview_config
mt9d111 1-005d: mt9d111_s_fmt fmt=59565955 left=28, top=60, width=640, height=480
mt9d111 1-005d: write reg.002 = 001c -> 0
mt9d111 1-005d: write reg.001 = 003c -> 0
mt9d111 1-005d: write reg.004 = 0280 -> 0
mt9d111 1-005d: write reg.003 = 01e0 -> 0
mt9d111 1-005d: read reg.004 -> 0280
width: 640
mt9d111 1-005d: read reg.0f2 -> 0000
context: 0x0000
mt9d111 1-005d: registry page set: 1
mt9d111 1-005d: read reg.097 -> 0000
mt9d111 1-005d: write reg.097 = 0000 -> 0
mt9d111 1-005d: write reg.009 = 0001 -> 0
mt9d111 1-005d: write reg.009 = 0000 -> 0
mt9d111 1-005d: registry page set: 0
mt9d111 1-005d: mt9d111_setup_pixfmt: 0mt9d111: mt9d111_set_pixfmt
mt9d111: mt9d111_s_fmt
mt9d111: mt9d111_try_fmt
vpfe-capture vpfe-capture: IPIPE Chained
vpfe-capture vpfe-capture: Resizer present
mt9d111 1-005d: control id -2147483648 not supported
vpfe-capture vpfe-capture: input information not found for the subdev
mt9d111 1-005d: control id 9963776 not supported
mt9d111 1-005d: control id 9963777 not supported
mt9d111 1-005d: control id 9963778 not supported
mt9d111 1-005d: control id 9963779 not supported
mt9d111 1-005d: control id 9963780 not supported
mt9d111 1-005d: control id 9963781 not supported
mt9d111 1-005d: control id 9963782 not supported
mt9d111 1-005d: control id 9963783 not supported
mt9d111 1-005d: control id 9963784 not supported
mt9d111 1-005d: control id 9963785 not supported
mt9d111 1-005d: control id 9963786 not supported
mt9d111 1-005d: control id 9963787 not supported
mt9d111 1-005d: control id 9963788 not supported
mt9d111 1-005d: control id 9963789 not supported
mt9d111 1-005d: control id 9963790 not supported
mt9d111 1-005d: control id 9963791 not supported
mt9d111 1-005d: control id 9963792 not supported
mt9d111 1-005d: control id 9963794 not supported
mt9d111 1-005d: control id 9963798 not supported
mt9d111 1-005d: control id 9963799 not supported
mt9d111 1-005d: control id 9963800 not supported
mt9d111 1-005d: control id 9963801 not supported
mt9d111 1-005d: control id 9963802 not supported
mt9d111 1-005d: control id 9963803 not supported
mt9d111 1-005d: control id 9963804 not supported
mt9d111 1-005d: control id 9963805 not supported
mt9d111 1-005d: control id 9963806 not supported
mt9d111 1-005d: control id 9963807 not supported
mt9d111 1-005d: control id 9963808 not supported
mt9d111 1-005d: control id 9963809 not supportedmt9d111: mt9d111_g_fmt
vpfe-capture vpfe-capture: width = 1, height = 1, bpp = 2
vpfe-capture vpfe-capture: adjusted width = 16, height = 2, bpp = 2, bytesperline = 32, sizeimage = 64
vpfe-capture vpfe-capture: width = 32768, height = 32768, bpp = 2
vpfe-capture vpfe-capture: adjusted width = 2176, height = 1536, bpp = 2, bytesperline = 4352, sizeimage = 6684672
vpfe-capture vpfe-capture: width = 1, height = 1, bpp = 1
vpfe-capture vpfe-capture: adjusted width = 32, height = 2, bpp = 1, bytesperline = 32, sizeimage = 96
vpfe-capture vpfe-capture: width = 32768, height = 32768, bpp = 1
vpfe-capture vpfe-capture: adjusted width = 2176, height = 1536, bpp = 1, bytesperline = 2176, sizeimage = 5013504
vpfe-capture vpfe-capture: width = 1, height = 1, bpp = 2
vpfe-capture vpfe-capture: adjusted width = 16, height = 2, bpp = 2, bytesperline = 32, sizeimage = 64
vpfe-capture vpfe-capture: width = 8, height = 2, bpp = 2
vpfe-capture vpfe-capture: adjusted width = 16, height = 2, bpp = 2, bytesperline = 32, sizeimage = 64
vpfe-capture vpfe-capture: width = 32768, height = 32768, bpp = 2
vpfe-capture vpfe-capture: adjusted width = 2176, height = 1536, bpp = 2, bytesperline = 4352, sizeimage = 6684672
vpfe-capture vpfe-capture: width = 32775, height = 32769, bpp = 2
vpfe-capture vpfe-capture: adjusted width = 2176, height = 1536, bpp = 2, bytesperline = 4352, sizeimage = 6684672
vpfe-capture vpfe-capture: width = 1, height = 1, bpp = 2
vpfe-capture vpfe-capture: adjusted width = 16, height = 2, bpp = 2, bytesperline = 32, sizeimage = 64
vpfe-capture vpfe-capture: width = 8, height = 2, bpp = 2
vpfe-capture vpfe-capture: adjusted width = 16, height = 2, bpp = 2, bytesperline = 32, sizeimage = 64
vpfe-capture vpfe-capture: width = 32768, height = 32768, bpp = 2
vpfe-capture vpfe-capture: adjusted width = 2176, height = 1536, bpp = 2, bytesperline = 4352, sizeimage = 6684672
vpfe-capture vpfe-capture: width = 32775, height = 32769, bpp = 2
vpfe-capture vpfe-capture: adjusted width = 2176, height = 1536, bpp = 2, bytesperline = 4352, sizeimage = 6684672
vpfe-capture vpfe-capture: width = 1, height = 1, bpp = 2
vpfe-capture vpfe-capture: adjusted width = 16, height = 2, bpp = 2, bytesperline = 32, sizeimage = 64
vpfe-capture vpfe-capture: width = 8, height = 2, bpp = 2
vpfe-capture vpfe-capture: adjusted width = 16, height = 2, bpp = 2, bytesperline = 32, sizeimage = 64
vpfe-capture vpfe-capture: width = 32768, height = 32768, bpp = 2
vpfe-capture vpfe-capture: adjusted width = 2176, height = 1536, bpp = 2, bytesperline = 4352, sizeimage = 6684672
vpfe-capture vpfe-capture: width = 32775, height = 32769, bpp = 2
vpfe-capture vpfe-capture: adjusted width = 2176, height = 1536, bpp = 2, bytesperline = 4352, sizeimage = 6684672
vpfe-capture vpfe-capture: width = 1, height = 1, bpp = 2
vpfe-capture vpfe-capture: adjusted width = 16, height = 2, bpp = 2, bytesperline = 32, sizeimage = 64
vpfe-capture vpfe-capture: width = 8, height = 2, bpp = 2
vpfe-capture vpfe-capture: adjusted width = 16, height = 2, bpp = 2, bytesperline = 32, sizeimage = 64
vpfe-capture vpfe-capture: width = 32768, height = 32768, bpp = 2
vpfe-capture vpfe-capture: adjusted width = 2176, height = 1536, bpp = 2, bytesperline = 4352, sizeimage = 6684672
vpfe-capture vpfe-capture: width = 32775, height = 32769, bpp = 2
vpfe-capture vpfe-capture: adjusted width = 2176, height = 1536, bpp = 2, bytesperline = 4352, sizeimage = 6684672
ipipe_set_resizer, resizer - A enabled
rsz_set_output_address 0
On oscilloscope I see that VSYNC and HSYNC signals are changing
Could anyone help me with described issue, please?
regards
Jan