Hi,
I am trying to stream two mt9m021 CSI cameras on a TX2(NVIDIA L4T 32.2.1). The command I am using is:
v4l2-ctl -d /dev/video0 --set-fmt-video=width=1280,height=720 --set-ctrl bypass_mode=0 --stream-mmap
and
gst-launch-1.0 nvarguscamerasrc sensor-id=0 ! “video/x-raw(memory:NVMM),width=(int)1280,height=(int)720,format=(string)I420,framerate=(fraction)60/1” ! fakesink sync=false
The output of v4l2-ctl command is blank and gst-launch is:
Setting pipeline to PAUSED …
Pipeline is live and does not need PREROLL …
Setting pipeline to PLAYING …
New clock: GstSystemClock
GST_ARGUS: Creating output stream
CONSUMER: Waiting until producer is connected…
GST_ARGUS: Available Sensor modes :
GST_ARGUS: 1280 x 720 FR = 59.999999 fps Duration = 16666667 ; Analog Gain range min 1.000000, max 180.000000; Exposure Range min 16000, max 165770000;
GST_ARGUS: Running with following settings:
Camera index = 0
Camera mode = 0
Output Stream W = 1280 H = 720
seconds to Run = 0
Frame Rate = 59.999999
GST_ARGUS: PowerService: requested_clock_Hz=24192000
GST_ARGUS: Setup Complete, Starting captures for 0 seconds
GST_ARGUS: Starting repeat capture requests.
CONSUMER: Producer has connected; continuing.
The camera seems to be connected but is not producing an image stream.
With commands the dmesg log looks like this:
956.472536] mt9m021 2-0010: mt9m021_write: 0x0020 to 0x3032
[ 956.472759] mt9m021 2-0010: mt9m021_write: 0x0078 to 0x3002
[ 956.473119] mt9m021 2-0010: mt9m021_write: 0x0001 to 0x3004
[ 956.473374] mt9m021 2-0010: mt9m021_write: 0x0347 to 0x3006
[ 956.473619] mt9m021 2-0010: mt9m021_write: 0x0500 to 0x3008
[ 956.473910] mt9m021 2-0010: mt9m021_write: 0x0672 to 0x300c
[ 956.474163] mt9m021 2-0010: mt9m021_write: 0x0001 to 0x30a2
[ 956.474439] mt9m021 2-0010: mt9m021_write: 0x0001 to 0x30a6
[ 956.474681] mt9m021 2-0010: Starting stream
[ 956.474699] mt9m021 2-0010: mt9m021_write: 0x10dc to 0x301a
Both cameras work using L4T 28.2.
The page being referred to for porting is:
https://docs.nvidia.com/jetson/l4t/index.html#page/Tegra%20Linux%20Driver%20Package%20Development%20Guide/camera_sensor_prog.html
The output of v4l2 --all is:
Driver Info (not using libv4l2):
Driver name : tegra-video
Card type : vi-output, mt9m021 2-0010
Bus info : platform:15700000.vi:0
Driver version: 4.9.140
Capabilities : 0x84200001
Video Capture
Streaming
Extended Pix Format
Device Capabilities
Device Caps : 0x04200001
Video Capture
Streaming
Extended Pix Format
Priority: 2
Video input : 0 (Camera 0: ok)
Format Video Capture:
Width/Height : 1280/720
Pixel Format : ‘RG12’
Field : None
Bytes per Line : 2560
Size Image : 1843200
Colorspace : sRGB
Transfer Function : Default (maps to sRGB)
YCbCr/HSV Encoding: Default (maps to ITU-R 601)
Quantization : Default (maps to Full Range)
Flags :
User Controls
horizontal_flip 0x00980914 (int) : min=0 max=1 step=1 default=0 value=0
vertical_flip 0x00980915 (int) : min=0 max=1 step=1 default=0 value=0
gain_red 0x00981901 (int) : min=4 max=6476 step=1 default=100 value=100
gain_green_r 0x00981902 (int) : min=4 max=6476 step=1 default=100 value=100
gain_green_b 0x00981903 (int) : min=4 max=6476 step=1 default=100 value=100
gain_blue 0x00981904 (int) : min=4 max=6476 step=1 default=100 value=100
gain_column 0x00981905 (int) : min=0 max=3 step=1 default=0 value=0
Camera Controls
auto_exposure 0x009a0901 (int) : min=1 max=2 step=1 default=1 value=1
frame_length 0x009a2000 (int) : min=39 max=757 step=1 default=757 value=757 flags=slider
coarse_time 0x009a2001 (int) : min=1 max=672 step=1 default=450 value=450 flags=slider
coarse_time_short 0x009a2002 (int) : min=1 max=672 step=1 default=450 value=450 flags=slider
group_hold 0x009a2003 (intmenu): min=0 max=1 default=0 value=0
hdr_enable 0x009a2004 (int) : min=0 max=1 step=1 default=0 value=0
gain 0x009a2009 (int) : min=4 max=6476 step=1 default=100 value=100 flags=slider
bypass_mode 0x009a2064 (intmenu): min=0 max=1 default=0 value=0
override_enable 0x009a2065 (intmenu): min=0 max=1 default=0 value=0
height_align 0x009a2066 (int) : min=1 max=16 step=1 default=1 value=1
size_align 0x009a2067 (intmenu): min=0 max=2 default=0 value=0
write_isp_format 0x009a2068 (int) : min=1 max=1 step=1 default=1 value=1
sensor_signal_properties 0x009a2069 (u32) : min=0 max=0 step=0 default=0 flags=read-only, has-payload
sensor_image_properties 0x009a206a (u32) : min=0 max=0 step=0 default=0 flags=read-only, has-payload
sensor_control_properties 0x009a206b (u32) : min=0 max=0 step=0 default=0 flags=read-only, has-payload
sensor_dv_timings 0x009a206c (u32) : min=0 max=0 step=0 default=0 flags=read-only, has-payload
low_latency_mode 0x009a206d (bool) : default=0 value=0
sensor_modes 0x009a2082 (int) : min=0 max=30 step=1 default=30 value=1 flags=read-only
Flash Controls
flash 0x009c0901 (int) : min=0 max=1 step=1 default=1 value=1
Image Processing Controls
test_pattern 0x009f0903 (menu) : min=0 max=4 default=0 value=0