Jetson NX CSI-B and media0 topology

Hello,

I’m trying to connect Raspberry Pi V2.1 camera (IMX219) to Jetson NX CSI-B port on custom carrier board. It seems, camera is detected but can’t get video from it. When I try gst-launch I got:

Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, execute:557 No cameras available

May I ask to review my media0 topology? Device tree and dmesg attached for reference.

Media controller API version 0.1.0

Media device information
------------------------
driver          tegra194-vi5
model           NVIDIA Tegra Video Input Device
serial          
bus info        
hw revision     0x3
driver version  0.0.0

Device topology
- entity 1: imx219 1-0010 (1 pad, 1 link)
            type V4L2 subdev subtype Sensor flags 0
            device node name /dev/v4l-subdev0
        pad0: Source
                [fmt:SRGGB10_1X10/3264x2464 field:none colorspace:srgb]
                -> "15a00000.nvcsi--1":0 [ENABLED]

- entity 3: 15a00000.nvcsi--1 (2 pads, 2 links)
            type V4L2 subdev subtype Unknown flags 0
            device node name /dev/v4l-subdev1
        pad0: Sink
                <- "imx219 1-0010":0 [ENABLED]
        pad1: Source
                -> "vi-output, imx219 1-0010":0 [ENABLED]

- entity 6: vi-output, imx219 1-0010 (1 pad, 1 link)
            type Node subtype V4L flags 0
            device node name /dev/video0
        pad0: Sink
                <- "15a00000.nvcsi--1":1 [ENABLED]

dmesg.log (77.7 KB)
csi-b.dtsi (13.6 KB)

Thanks

Modify the devname = “imx219 10-0010” to devname = “imx219 1-0010” in tegra-camera-platform{} in your dtsi file.

Thank you for reply. I changed devname, but still got the same error. I test using this pipeline:

jetson@jetson:~$ gst-launch-1.0 -e nvarguscamerasrc ! 'video/x-raw(memory:NVMM), width=1920, height=1080, framerate=30/1' ! nvv4l2h264enc bitrate=8000000 insert-sps-pps=true ! h264parse ! mpegtsmux ! filesink location=test.vid
Setting pipeline to PAUSED ...
Opening in BLOCKING MODE 
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Redistribute latency...
NvMMLiteOpen : Block : BlockType = 4 
===== NVMEDIA: NVENC =====
NvMMLiteBlockCreate : Block : BlockType = 4 
Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, execute:557 No cameras available
Got EOS from element "pipeline0".
Execution ended after 0:00:00.119911869
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...

which worked on different carrier board, but there is camera on CSI0.
Could you take a look at vi->nvcsi->sensor ‘wiring’? Does it look correct for you? I paid attention to port-index and tegra-sinterface to set to CSI B. On my eye all looks good, but maybe I made a mistake with nvcsi or vi section?
Sensor settings I basically copied from DevKit DT.

The proc-device-tree = “/proc/device-tree/i2c@3180000/rbpcv2_imx219_b@10” was incorrect too
Modify it to rbpcv2_imx219_c

I fixed I2C addressing (except suffix, address was wrong too). It seems that the error has gone, but still can’t get video from the sensor.

jetson@jetson:~$ gst-launch-1.0 -v v4l2src device=/dev/video0 num-buffers=1 ! "video/x-bayer, format=rggb, width=3280, height=2464" ! filesink location=test_3280x2464.bayer
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data stream error.
Additional debug info:
gstbasesrc.c(3055): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
streaming stopped, reason not-negotiated (-4)
ERROR: pipeline doesn't want to preroll.
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...

Please, find updated DTSI:
csi-b.dtsi (13.6 KB)

Use v4l2-ctl or nvarguscamerasrc don’t use v4l2src for Bayer raw sensor.

I manage to record a video, using this command:

gst-launch-1.0 -e nvarguscamerasrc ! 'video/x-raw(memory:NVMM), width=1920, height=1080, framerate=30/1' ! nvv4l2h264enc bitrate=8000000 insert-sps-pps=true ! h264parse ! mpegtsmux ! filesink location=test.file.vid

Thank you for your support.

Does that means problem fixed?
Anything need support?

Yes, the problem is fixed.
No more support is need (at this time ;-))

Thanks!