I’ve been working on getting Leopard LI-M021C-MIPI camera working with the TX1. Communication works and I can take pictures using yavta
yavta /dev/video0 -c1 -n1 -s1280x960 -fSGRBG12 -Fdata.raw
Device /dev/video0 opened.
Device `vi-output-0, daxc02 6-0010' on `platform:vi:0' (driver 'tegra-video') is a video capture (without mplanes) device.
Video format set: SGRBG12 (32314142) 1280x720 (stride 2560) field none buffer size 1843200
Video format: SGRBG12 (32314142) 1280x720 (stride 2560) field none buffer size 1843200
3 buffers requested.
length: 1843200 offset: 0 timestamp type/source: mono/EoF
Buffer 0/0 mapped at address 0x7fb6dc6000.
length: 1843200 offset: 1843200 timestamp type/source: mono/EoF
Buffer 1/0 mapped at address 0x7fb6c04000.
length: 1843200 offset: 3686400 timestamp type/source: mono/EoF
Buffer 2/0 mapped at address 0x7fb6a42000.
0 (0) [E] none 0 1843200 B 141.972970 142.006559 1.233 fps ts mono/EoF
Captured 1 frames in 0.844493 seconds (1.184141 fps, 2182608.904751 B/s).
3 buffers released.
Pictures are well formed and I can debayer them to get the correct colors.
bayer2rgb --input=data.raw --output=data.tiff --width=1280 --height=720 --bpp=16 --first=GRBG --method=BILINEAR --tiff --swap
I’m having trouble figuring out where I need to go to get video streaming working. I followed the Ridgerun guide to recompile gstreamer on the TX1. Only change is I added the RAW12 formats instead of the RAW10 formats.
However when I run the test stream…
DISPLAY=:0 gst-launch-1.0 -vvv v4l2src num-buffers=10 ! 'video/x-bayer, width=(int)1280, height=(int)720, format=(string)grbg, framerate=(fraction)30/1' ! fakesink silent=false
I just get errors
(gst-plugin-scanner:1681): GStreamer-WARNING **: Failed to load plugin '/home/ubuntu/gst_1.11.1/out/lib/gstreamer-1.0/libgstkmssink.so': /home/ubuntu/gst_1.11.1/out/lib/gstreamer-1.0/libgstkmssink.so: undefined symbol: drmModeGetFB
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
/GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = event ******* (fakesink0:sink) E (type: stream-start (10254), GstEventStreamStart, stream-id=(string)2b7f5679e9f0cee0776e7c9d96ffc3b4682b26f7b8931798b4254fc99bdbde9b, flags=(GstStreamFlags)GST_STREAM_FLAG_NONE, group-id=(uint)0;) 0x49c9d0
Setting pipeline to PLAYING ...
/GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = event ******* (fakesink0:sink) E (type: eos (28174), ) 0x49ca40
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data stream error.
Additional debug info:
gstbasesrc.c(2951): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
streaming stopped, reason not-negotiated (-4)
Execution ended after 0:00:00.000844635
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
dmesg is strange. It calls set_format over and over again before it finally gives up and fails.
[ 39.138088] (NULL device *): camera_common_dpd_disable: csi 0
[ 39.138101] daxc02 6-0010: camera_common_mclk_enable: enable MCLK with 74250000 Hz
[ 39.138121] daxc02 6-0010: daxc02_power_on
[ 39.356193] (NULL device *): camera_common_dpd_enable: csi 0
[ 39.356331] daxc02 6-0010: daxc02_power_off
[ 39.359007] daxc02 6-0010: camera_common_mclk_disable: disable MCLK
[ 39.801014] (NULL device *): camera_common_dpd_disable: csi 0
[ 39.801026] daxc02 6-0010: camera_common_mclk_enable: enable MCLK with 74250000 Hz
[ 39.801046] daxc02 6-0010: daxc02_power_on
[ 40.013488] (NULL device *): camera_common_dpd_enable: csi 0
[ 40.013624] daxc02 6-0010: daxc02_power_off
[ 40.016379] daxc02 6-0010: camera_common_mclk_disable: disable MCLK
[ 40.053439] (NULL device *): camera_common_dpd_disable: csi 0
[ 40.053483] daxc02 6-0010: camera_common_mclk_enable: enable MCLK with 74250000 Hz
[ 40.053546] daxc02 6-0010: daxc02_power_on
[ 40.462446] daxc02 6-0010: mt9m021_get_format
[ 40.462503] daxc02 6-0010: daxc02_g_input_status
[ 40.462867] daxc02 6-0010: daxc02_g_input_status
[ 40.464619] daxc02 6-0010: mt9m021_set_format
[ 40.464659] daxc02 6-0010: mt9m021_set_format
[ 40.464671] daxc02 6-0010: mt9m021_set_format
[ 40.464680] daxc02 6-0010: mt9m021_set_format
[ 40.464689] daxc02 6-0010: mt9m021_set_format
[ 40.464698] daxc02 6-0010: mt9m021_set_format
[ 40.464707] daxc02 6-0010: mt9m021_set_format
[ 40.464716] daxc02 6-0010: mt9m021_set_format
[ 40.464732] daxc02 6-0010: mt9m021_set_format
[ 40.464741] daxc02 6-0010: mt9m021_set_format
[ 40.464750] daxc02 6-0010: mt9m021_set_format
[ 40.464794] daxc02 6-0010: mt9m021_set_format
[ 40.464806] daxc02 6-0010: mt9m021_set_format
[ 40.464828] daxc02 6-0010: mt9m021_set_format
[ 40.464842] daxc02 6-0010: mt9m021_set_format
[ 40.464861] daxc02 6-0010: mt9m021_set_format
[ 40.464876] daxc02 6-0010: mt9m021_set_format
[ 40.464885] daxc02 6-0010: mt9m021_set_format
[ 40.464893] daxc02 6-0010: mt9m021_set_format
[ 40.464902] daxc02 6-0010: mt9m021_set_format
[ 40.464910] daxc02 6-0010: mt9m021_set_format
[ 40.464919] daxc02 6-0010: mt9m021_set_format
[ 40.464928] daxc02 6-0010: mt9m021_set_format
[ 40.464941] daxc02 6-0010: mt9m021_set_format
[ 40.464950] daxc02 6-0010: mt9m021_set_format
[ 40.464959] daxc02 6-0010: mt9m021_set_format
[ 40.464980] daxc02 6-0010: mt9m021_set_format
[ 40.464990] daxc02 6-0010: mt9m021_set_format
[ 40.465009] daxc02 6-0010: mt9m021_set_format
[ 40.465021] daxc02 6-0010: mt9m021_set_format
[ 40.465038] daxc02 6-0010: mt9m021_set_format
[ 40.465053] daxc02 6-0010: mt9m021_set_format
[ 40.465062] daxc02 6-0010: mt9m021_set_format
[ 40.465071] daxc02 6-0010: mt9m021_set_format
[ 40.465080] daxc02 6-0010: mt9m021_set_format
[ 40.465089] daxc02 6-0010: mt9m021_set_format
[ 40.465097] daxc02 6-0010: mt9m021_set_format
[ 40.465106] daxc02 6-0010: mt9m021_set_format
[ 40.465119] daxc02 6-0010: mt9m021_set_format
[ 40.465128] daxc02 6-0010: mt9m021_set_format
[ 40.465137] daxc02 6-0010: mt9m021_set_format
[ 40.465158] daxc02 6-0010: mt9m021_set_format
[ 40.465167] daxc02 6-0010: mt9m021_set_format
[ 40.465185] daxc02 6-0010: mt9m021_set_format
[ 40.465197] daxc02 6-0010: mt9m021_set_format
[ 40.465215] daxc02 6-0010: mt9m021_set_format
[ 40.465229] daxc02 6-0010: mt9m021_set_format
[ 40.465238] daxc02 6-0010: mt9m021_set_format
[ 40.465246] daxc02 6-0010: mt9m021_set_format
[ 40.465255] daxc02 6-0010: mt9m021_set_format
[ 40.465263] daxc02 6-0010: mt9m021_set_format
[ 40.465272] daxc02 6-0010: mt9m021_set_format
[ 40.465280] daxc02 6-0010: mt9m021_set_format
[ 40.465294] daxc02 6-0010: mt9m021_set_format
[ 40.465302] daxc02 6-0010: mt9m021_set_format
[ 40.465311] daxc02 6-0010: mt9m021_set_format
[ 40.465333] daxc02 6-0010: mt9m021_set_format
[ 40.465343] daxc02 6-0010: mt9m021_set_format
[ 40.465361] daxc02 6-0010: mt9m021_set_format
[ 40.465373] daxc02 6-0010: mt9m021_set_format
[ 40.465389] daxc02 6-0010: mt9m021_set_format
[ 40.465404] daxc02 6-0010: mt9m021_set_format
[ 40.465413] daxc02 6-0010: mt9m021_set_format
[ 40.465422] daxc02 6-0010: mt9m021_set_format
[ 40.465431] daxc02 6-0010: mt9m021_set_format
[ 40.465439] daxc02 6-0010: mt9m021_set_format
[ 40.465448] daxc02 6-0010: mt9m021_set_format
[ 40.465456] daxc02 6-0010: mt9m021_set_format
[ 40.465470] daxc02 6-0010: mt9m021_set_format
[ 40.465478] daxc02 6-0010: mt9m021_set_format
[ 40.465487] daxc02 6-0010: mt9m021_set_format
[ 40.468087] (NULL device *): camera_common_dpd_enable: csi 0
[ 40.468111] daxc02 6-0010: daxc02_power_off
[ 40.470978] daxc02 6-0010: camera_common_mclk_disable: disable MCLK
(END)
Any thoughts? Is my set_format function not returning, or setting, something?