- hardware: Orion NX 16 GB
- Carrier board: Super devkit https://www.waveshare.com/jetson-orin-nx-16g-dev-kit.htm?sku=24223
- L4T R36.4.3
- JP 6.3
Problem:
I’m trying to capture video from AR0234 camera. It works when it’s connected to CAM1, but not when it is connected to CAM0.
For both cameras I’m able to receive frames with v4l2-ctl (see below). But with nvargus pipeline it works only with CAM1, CAM0 fails to create CaptureSeasion.
In DT difference between cameras are, tegra_sinterface and line polarity.
I configured both cameras in 2 lane mode (B and C).
I tested same structure with IMX camera and it worked. But when I switch to AR0234, with change in I2C node and tegra-camera-platform it failed with CAM0.
With error in nvargus-deamon Invalid mapping for NVCSI port to stream id [port, streamId]: 1 1 ...
(see below for full log).
Configuration of failed camera:
- port_index = 1
- bus_width = 2
- tegra_sinterface = “serial_b”
Could please help me how to solve this issue?
==========================================================================================
Device tree:
tegra234-p3767-camera-p3768-ar0234-dual copy.dts.txt (13.4 KB)
v4l2-compilance output (LGTM):
v4l2-compliance 1.22.1, 64 bits, 64-bit time_t
Compliance test for tegra-video device /dev/video0:
Driver Info:
Driver name : tegra-video
Card type : vi-output, ar0234 9-0010
Bus info : platform:tegra-capture-vi:1
Driver version : 5.15.148
Capabilities : 0x84200001
Video Capture
Streaming
Extended Pix Format
Device Capabilities
Device Caps : 0x04200001
Video Capture
Streaming
Extended Pix Format
Media Driver Info:
Driver name : tegra-camrtc-ca
Model : NVIDIA Tegra Video Input Device
Serial :
Bus info :
Media version : 5.15.148
Hardware revision: 0x00000003 (3)
Driver version : 5.15.148
Interface Info:
ID : 0x03000008
Type : V4L Video
Entity Info:
ID : 0x00000006 (6)
Name : vi-output, ar0234 9-0010
Function : V4L2 I/O
Pad 0x01000007 : 0: Sink
Link 0x0200000c: from remote pad 0x1000003 of entity '13e00000.host1x:nvcsi@15a00000-' (Unknown sub-device (0002000a)): Data, Enabled
Required ioctls:
test MC information (see 'Media Driver Info' above): OK
test VIDIOC_QUERYCAP: OK
test invalid ioctls: OK
Allow for multiple opens:
test second /dev/video0 open: OK
test VIDIOC_QUERYCAP: OK
test VIDIOC_G/S_PRIORITY: OK
test for unlimited opens: OK
Debug ioctls:
test VIDIOC_DBG_G/S_REGISTER: OK (Not Supported)
test VIDIOC_LOG_STATUS: OK
Input ioctls:
test VIDIOC_G/S_TUNER/ENUM_FREQ_BANDS: OK (Not Supported)
test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
test VIDIOC_S_HW_FREQ_SEEK: OK (Not Supported)
test VIDIOC_ENUMAUDIO: OK (Not Supported)
test VIDIOC_G/S/ENUMINPUT: OK
test VIDIOC_G/S_AUDIO: OK (Not Supported)
Inputs: 1 Audio Inputs: 0 Tuners: 0
Output ioctls:
test VIDIOC_G/S_MODULATOR: OK (Not Supported)
test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
test VIDIOC_ENUMAUDOUT: OK (Not Supported)
test VIDIOC_G/S/ENUMOUTPUT: OK (Not Supported)
test VIDIOC_G/S_AUDOUT: OK (Not Supported)
Outputs: 0 Audio Outputs: 0 Modulators: 0
Input/Output configuration ioctls:
test VIDIOC_ENUM/G/S/QUERY_STD: OK (Not Supported)
test VIDIOC_ENUM/G/S/QUERY_DV_TIMINGS: OK (Not Supported)
test VIDIOC_DV_TIMINGS_CAP: OK (Not Supported)
test VIDIOC_G/S_EDID: OK (Not Supported)
Control ioctls (Input 0):
test VIDIOC_QUERY_EXT_CTRL/QUERYMENU: OK
test VIDIOC_QUERYCTRL: OK
test VIDIOC_G/S_CTRL: OK
test VIDIOC_G/S/TRY_EXT_CTRLS: OK
test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: OK
test VIDIOC_G/S_JPEGCOMP: OK (Not Supported)
Standard Controls: 1 Private Controls: 17
Standard Compound Controls: 0 Private Compound Controls: 9
Format ioctls (Input 0):
test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: OK
test VIDIOC_G/S_PARM: OK
test VIDIOC_G_FBUF: OK (Not Supported)
test VIDIOC_G_FMT: OK
test VIDIOC_TRY_FMT: OK
test VIDIOC_S_FMT: OK
test VIDIOC_G_SLICED_VBI_CAP: OK (Not Supported)
test Cropping: OK (Not Supported)
test Composing: OK (Not Supported)
test Scaling: OK (Not Supported)
Codec ioctls (Input 0):
test VIDIOC_(TRY_)ENCODER_CMD: OK (Not Supported)
test VIDIOC_G_ENC_INDEX: OK (Not Supported)
test VIDIOC_(TRY_)DECODER_CMD: OK (Not Supported)
Buffer ioctls (Input 0):
test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: OK
test VIDIOC_EXPBUF: OK
test Requests: OK (Not Supported)
v4l2-ctl
output (LGTM):
v4l2-ctl --set-fmt-video=width=1920,height=1200,pixelformat=BA10 --stream-mmap --stream-count=25 -d /dev/video0 -c sensor_mode=1
<<<<<<<<<<<<<<<<<< 16.96 fps
<<<<<<<
root@orinn:/home/nano# v4l2-ctl --list-devices
NVIDIA Tegra Video Input Device (platform:tegra-camrtc-ca):
/dev/media0
vi-output, ar0234 9-0010 (platform:tegra-capture-vi:1):
/dev/video0
root@orin:/home/nano# v4l2-ctl --device=/dev/video0 --list-formats-ext
ioctl: VIDIOC_ENUM_FMT
Type: Video Capture
[0]: 'BA10' (10-bit Bayer GRGR/BGBG)
Size: Discrete 1920x1080
Interval: Discrete 0.017s (60.000 fps)
Size: Discrete 1920x1200
Interval: Discrete 0.033s (30.000 fps)
Size: Discrete 1920x1200
Interval: Discrete 0.033s (30.000 fps)
gst-launch-1.0
on CAM1 output (Provides correct mp4) :
$ gst-launch-1.0 nvarguscamerasrc sensor-id=1 sensor-mode=1 num-buffers=200 ! 'video/x-raw(memory:NVMM),' ! nvvidconv ! nvv4l2h264enc ! h264parse ! qtmux ! filesink location=ar.mp4 -e
Setting pipeline to PAUSED ...
Opening in BLOCKING MODE
Pipeline is live and does not need PREROLL ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Redistribute latency...
NvMMLiteOpen : Block : BlockType = 4
===== NvVideo: NVENC =====
NvMMLiteBlockCreate : Block : BlockType = 4
GST_ARGUS: Creating output stream
CONSUMER: Waiting until producer is connected...
GST_ARGUS: Available Sensor modes :
GST_ARGUS: 1920 x 1200 FR = 29.999999 fps Duration = 33333334 ; Analog Gain range min 1.000000, max 16.000000; Exposure Range min 28000, max 22000000;
GST_ARGUS: 1920 x 1200 FR = 29.999999 fps Duration = 33333334 ; Analog Gain range min 1.000000, max 16.000000; Exposure Range min 28000, max 22000000;
GST_ARGUS: Running with following settings:
Camera index = 1
Camera mode = 1
Output Stream W = 1920 H = 1200
seconds to Run = 0
Frame Rate = 29.999999
GST_ARGUS: Setup Complete, Starting captures for 0 seconds
GST_ARGUS: Starting repeat capture requests.
CONSUMER: Producer has connected; continuing.
H264: Profile = 66 Level = 0
NVMEDIA: Need to set EMC bandwidth : 846000
Redistribute latency...
Got EOS from element "pipeline0".
EOS received - stopping pipeline...
Execution ended after 0:00:08.922900576
Setting pipeline to NULL ...
GST_ARGUS: Cleaning up
CONSUMER: Done Success
GST_ARGUS: Done Success
Freeing pipeline ...
gst-launch-1.0
on CAM0 output (Failed to create CaptureSession) :
$ gst-launch-1.0 nvarguscamerasrc sensor-mode=1 num-buffers=200 ! 'video/x-raw(memory:NVMM),' ! nvvidconv ! nvv4l2h264enc ! h264parse ! qtmux ! filesink location=ar.mp4 -e
Setting pipeline to PAUSED ...
Opening in BLOCKING MODE
Pipeline is live and does not need PREROLL ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Redistribute latency...
NvMMLiteOpen : Block : BlockType = 4
===== NvVideo: NVENC =====
NvMMLiteBlockCreate : Block : BlockType = 4
Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, execute:805 Failed to create CaptureSession
Redistribute latency...
Got EOS from element "pipeline0".
EOS received - stopping pipeline...
Execution ended after 0:00:00.021012256
Setting pipeline to NULL ...
Freeing pipeline ...
nvargus-daemon
output (Invalid mapping for NVCSI port to stream id [port, streamId]: 1 1):
Jan 01 00:33:20 orin systemd[1]: Started Argus daemon.
Jan 01 00:33:56 orin nvargus-daemon[592]: === NVIDIA Libargus Camera Service (0.99.33)=== Listening for connections...=== gst-launch-1.0[1257]: Connection established (FFFF9572B840)OFParserListModules: module lis
t: /proc/device-tree/tegra-camera-platform/modules/module0
Jan 01 00:33:56 orin nvargus-daemon[592]: NvPclHwGetModuleList: WARNING: Could not map module to ISP config string
Jan 01 00:33:56 orin nvargus-daemon[592]: NvPclHwGetModuleList: No module data found
Jan 01 00:33:56 orin nvargus-daemon[592]: OFParserGetVirtualDevice: NVIDIA Camera virtual enumerator not found in proc device-tree
Jan 01 00:33:56 orin nvargus-daemon[592]: ---- imager: No override file found. ----
Jan 01 00:33:56 orin nvargus-daemon[592]: LSC: LSC surface is not based on full res!
Jan 01 00:33:56 orin nvargus-daemon[592]: Module_id 30 Severity 2 : Invalid mapping for NVCSI port to stream id [port, streamId]: 1 1
Jan 01 00:33:56 orin nvargus-daemon[592]: Module_id 30 Severity 2 : (fusa) Error: BadParameter Invalid mapping for NVCSI port to stream id in:/capture/src/fusaCsiStreamHandler.cpp
109
Jan 01 00:33:56 orin nvargus-daemon[592]: Module_id 30 Severity 2 : (fusa) Error: BadParameter propagating from:/capture/src/fusaCsiStreamHandler.cpp 213
Jan 01 00:33:56 orin nvargus-daemon[592]: Module_id 30 Severity 2 : (fusa) Error: BadParameter propagating from:/capture/src/fusaViHandler.cpp 350
Jan 01 00:33:56 orin nvargus-daemon[592]: Module_id 30 Severity 2 : (fusa) Error: BadParameter propagating from:/capture/src/fusaViHandler.cpp 143
Jan 01 00:33:56 orin nvargus-daemon[592]: Module_id 30 Severity 2 : (fusa) Error: BadParameter propagating from:/capture/src/core.cpp 76
Jan 01 00:33:56 orin nvargus-daemon[592]: === gst-launch-1.0[1257]: CameraProvider initialized (0xffff90aadae0)SCF: Error BadParameter: (propagating from src/services/capture/FusaCaptureViCsiHw.cpp, function ope
nViCsi(), line 395)
Jan 01 00:33:56 orin nvargus-daemon[592]: SCF: Error BadParameter: (propagating from src/services/capture/CaptureServiceDeviceViCsi.cpp, function open(), line 336)
Jan 01 00:33:56 orin nvargus-daemon[592]: SCF: Error BadParameter: (propagating from src/services/capture/CaptureServiceDevice.cpp, function openSource(), line 398)
Jan 01 00:33:56 orin nvargus-daemon[592]: SCF: Error BadParameter: (propagating from src/services/capture/CaptureService.cpp, function openSource(), line 503)
Jan 01 00:33:56 orin nvargus-daemon[592]: SCF: Error BadParameter: (propagating from src/api/Session.cpp, function initialize(), line 294)
Jan 01 00:33:56 orin nvargus-daemon[592]: SCF: Error BadParameter: (propagating from src/api/CameraDriver.cpp, function createSession(), line 680)
Trace log of CAM0 nvargus pipeline:
# TASK-PID CPU# ||||||| TIMESTAMP FUNCTION
# | | | ||||||| | |
<idle>-0 [000] d..h1.. 998.642445: capture_ivc_notify: ivc:"bc00000.rtcpu:i"
<idle>-0 [000] d..h1.. 998.642454: capture_ivc_notify: ivc:"bc00000.rtcpu:i"
nvargus-daemon-1531 [005] ....... 998.642952: capture_ivc_send: ivc:"bc00000.rtcpu:i" msg:0x20 ch:0x60
<idle>-0 [000] d..h1.. 998.643692: capture_ivc_notify: ivc:"bc00000.rtcpu:i"
<idle>-0 [000] d..h1.. 998.643695: capture_ivc_notify: ivc:"bc00000.rtcpu:i"
capture-control-258 [006] ....... 998.643705: capture_ivc_recv: ivc:"bc00000.rtcpu:i" msg:0x21 ch:0x60
nvargus-daemon-1531 [005] ....... 998.710012: tegra_channel_open: vi-output, ar0234 9-0010
nvargus-daemon-1531 [005] ....... 998.710087: tegra_channel_close: vi-output, ar0234 9-0010
nvargus-daemon-1531 [005] ....... 998.710103: tegra_channel_open: vi-output, ar0234 10-0010
nvargus-daemon-1531 [005] ....... 998.710147: tegra_channel_close: vi-output, ar0234 10-0010
nvargus-daemon-1531 [005] ....... 998.711068: tegra_channel_open: vi-output, ar0234 9-0010
nvargus-daemon-1531 [005] ....... 998.711123: tegra_channel_close: vi-output, ar0234 9-0010
nvargus-daemon-1531 [005] ....... 998.711134: tegra_channel_open: vi-output, ar0234 10-0010
nvargus-daemon-1531 [005] ....... 998.711173: tegra_channel_close: vi-output, ar0234 10-0010
nvargus-daemon-1531 [005] ....... 998.728717: tegra_channel_open: vi-output, ar0234 10-0010
nvargus-daemon-1531 [005] ....... 998.728730: tegra_channel_close: vi-output, ar0234 10-0010
nvargus-daemon-1531 [005] ....... 998.728742: tegra_channel_open: vi-output, ar0234 10-0010
nvargus-daemon-1531 [005] ....... 998.728794: tegra_channel_close: vi-output, ar0234 10-0010
nvargus-daemon-1531 [005] ....... 998.728810: tegra_channel_open: vi-output, ar0234 10-0010
nvargus-daemon-1531 [005] ....... 998.728874: tegra_channel_close: vi-output, ar0234 10-0010
nvargus-daemon-1531 [005] ....... 998.752948: tegra_channel_open: vi-output, ar0234 10-0010
nvargus-daemon-1531 [005] ....... 998.752970: tegra_channel_close: vi-output, ar0234 10-0010
nvargus-daemon-1531 [005] ....... 998.752987: tegra_channel_open: vi-output, ar0234 9-0010
nvargus-daemon-1531 [005] ....... 998.752994: tegra_channel_close: vi-output, ar0234 9-0010
nvargus-daemon-1531 [005] ....... 998.753004: tegra_channel_open: vi-output, ar0234 9-0010
nvargus-daemon-1531 [005] ....... 998.753060: tegra_channel_close: vi-output, ar0234 9-0010
nvargus-daemon-1531 [005] ....... 998.753076: tegra_channel_open: vi-output, ar0234 9-0010
nvargus-daemon-1531 [005] ....... 998.753144: tegra_channel_close: vi-output, ar0234 9-0010
nvargus-daemon-1531 [005] ....... 998.809690: capture_ivc_send: ivc:"bc00000.rtcpu:i" msg:0x1e ch:0x61
<idle>-0 [000] d..h1.. 998.810671: capture_ivc_notify: ivc:"bc00000.rtcpu:i"
<idle>-0 [000] d..h1.. 998.810678: capture_ivc_notify: ivc:"bc00000.rtcpu:i"
capture-control-258 [006] ....... 998.810693: capture_ivc_recv: ivc:"bc00000.rtcpu:i" msg:0x11 ch:0x61
nvargus-daemon-1531 [005] ....... 998.810818: capture_ivc_send: ivc:"bc00000.rtcpu:i" msg:0x03 ch:0x01
nvargus-daemon-1531 [005] ....... 998.810822: capture_ivc_send: ivc:"bc00000.rtcpu:i" msg:0x12 ch:0x01
<idle>-0 [000] d..h1.. 998.810879: capture_ivc_notify: ivc:"bc00000.rtcpu:i"
<idle>-0 [000] d..h1.. 998.810881: capture_ivc_notify: ivc:"bc00000.rtcpu:i"
capture-control-258 [006] ....... 998.810897: capture_ivc_recv: ivc:"bc00000.rtcpu:i" msg:0x13 ch:0x01
nvargus-daemon-1531 [005] ....... 998.810912: capture_ivc_send: ivc:"bc00000.rtcpu:i" msg:0x03 ch:0x01
nvargus-daemon-1531 [005] ....... 998.810914: capture_ivc_send: ivc:"bc00000.rtcpu:i" msg:0x12 ch:0x01
<idle>-0 [000] d..h1.. 998.811503: capture_ivc_notify: ivc:"bc00000.rtcpu:i"
<idle>-0 [000] d..h1.. 998.811505: capture_ivc_notify: ivc:"bc00000.rtcpu:i"
capture-control-258 [006] ....... 998.811518: capture_ivc_recv: ivc:"bc00000.rtcpu:i" msg:0x13 ch:0x01
nvargus-daemon-1531 [005] ....... 998.811528: capture_ivc_send: ivc:"bc00000.rtcpu:i" msg:0x48 ch:0x01
<idle>-0 [000] d..h1.. 998.811558: capture_ivc_notify: ivc:"bc00000.rtcpu:i"
<idle>-0 [000] d..h1.. 998.811561: capture_ivc_notify: ivc:"bc00000.rtcpu:i"
capture-control-258 [006] ....... 998.811571: capture_ivc_recv: ivc:"bc00000.rtcpu:i" msg:0x49 ch:0x01
nvargus-daemon-1531 [005] ....... 998.811579: capture_ivc_send: ivc:"bc00000.rtcpu:i" msg:0x14 ch:0x01
<idle>-0 [000] d..h1.. 998.812501: capture_ivc_notify: ivc:"bc00000.rtcpu:i"
<idle>-0 [000] d..h1.. 998.812503: capture_ivc_notify: ivc:"bc00000.rtcpu:i"
capture-control-258 [006] ....... 998.812511: capture_ivc_recv: ivc:"bc00000.rtcpu:i" msg:0x15 ch:0x01
nvargus-daemon-1531 [005] ....... 998.820696: capture_ivc_send: ivc:"bc00000.rtcpu:i" msg:0x24 ch:0x00
<idle>-0 [000] d..h1.. 998.820735: capture_ivc_notify: ivc:"bc00000.rtcpu:i"
<idle>-0 [000] d..h1.. 998.820743: capture_ivc_notify: ivc:"bc00000.rtcpu:i"
capture-control-258 [006] ....... 998.820765: capture_ivc_recv: ivc:"bc00000.rtcpu:i" msg:0x25 ch:0x00
media-ctl -p (LGTM)
$ media-ctl -p
Media controller API version 5.15.148
Media device information
------------------------
driver tegra-camrtc-ca
model NVIDIA Tegra Video Input Device
serial
bus info
hw revision 0x3
driver version 5.15.148
Device topology
- entity 1: 13e00000.host1x:nvcsi@15a00000- (2 pads, 2 links)
type V4L2 subdev subtype Unknown flags 0
device node name /dev/v4l-subdev0
pad0: Sink
<- "ar0234 10-0010":0 [ENABLED]
pad1: Source
-> "vi-output, ar0234 10-0010":0 [ENABLED]
- entity 4: 13e00000.host1x:nvcsi@15a00000- (2 pads, 2 links)
type V4L2 subdev subtype Unknown flags 0
device node name /dev/v4l-subdev1
pad0: Sink
<- "ar0234 9-0010":0 [ENABLED]
pad1: Source
-> "vi-output, ar0234 9-0010":0 [ENABLED]
- entity 7: ar0234 9-0010 (1 pad, 1 link)
type V4L2 subdev subtype Sensor flags 0
device node name /dev/v4l-subdev2
pad0: Source
[fmt:SGRBG10_1X10/1920x1200@1/30 field:none colorspace:srgb]
-> "13e00000.host1x:nvcsi@15a00000-":0 [ENABLED]
- entity 9: vi-output, ar0234 9-0010 (1 pad, 1 link)
type Node subtype V4L flags 0
device node name /dev/video0
pad0: Sink
<- "13e00000.host1x:nvcsi@15a00000-":1 [ENABLED]
- entity 23: ar0234 10-0010 (1 pad, 1 link)
type V4L2 subdev subtype Sensor flags 0
device node name /dev/v4l-subdev3
pad0: Source
[fmt:SGRBG10_1X10/1920x1200@1/30 field:none colorspace:srgb]
-> "13e00000.host1x:nvcsi@15a00000-":0 [ENABLED]
- entity 25: vi-output, ar0234 10-0010 (1 pad, 1 link)
type Node subtype V4L flags 0
device node name /dev/video1
pad0: Sink
<- "13e00000.host1x:nvcsi@15a00000-":1 [ENABLED]