One lane and dual capture with nvcamerasrc TX2

Hi all,

I am developing a camera driver for TX2 on L4T 28.1. I was able to get one camera working (V4L and nvcamerasrc) connected to the csi-0, now I am expanding the DTB to get 2 cameras working.

  1. I am using One lane for each camera
  2. csi-0 for first camera and csi-1 for second camera.
  3. Second camera is not working with nvcamerasrc but it works with V4L
  4. Modes on the device are configured as same way for both cameras.
  5. Same driver for both cameras.

Do you know what could be the issue? Is the TX2 able to capture (nvcamerasrc) with two cameras one lane each one?

-Adrian

What’s the logs from nvcamerasrc?

To enable trace for more information
https://elinux.org/Jetson_TX2/28.1_Camera_BringUp

Hi, we compared both logs (device that is working and device is not working) and both logs have some issues in common.

setControlValMultiple: Gain Control class inconsistent
(NvOdmDevice) Error BadParameter: Invalid control list (in dvs/git/dirty/git-master_linux/camera-partner/imager/src/V4L2Device.cpp, function setControlValMultiple(), line 761)
(NvOdmDevice) Error BadParameter:  (propagating from dvs/git/dirty/git-master_linux/camera-partner/imager/src/devices/V4L2SensorViCsi.cpp, function setDeviceControls(), line 1558)
updateOutputSettings: Set Control failed. Use cached values
(NvOdmDevice) Error InsufficientMemory: Cannot allocate control string (in dvs/git/dirty/git-master_linux/camera-partner/imager/src/V4L2Device.cpp, function getControlValMultiple(), line 541)

The main difference we saw between logs is that the framerate on the device that is not working with nvcamerasrc is set “OUTPUT frameRate:0.000000”

Below yo can find both logs.

Device not working with nvcamerasrc:

nvidia@tegra-ubuntu:~$ gst-launch-1.0 nvcamerasrc sensor-id=0 ! nvvidconv flip-method=6 ! 'video/x-raw(memory:NVMM), width=(int)1280, height=(int)720, format=(string)I420,framerate=(fraction)60/1' ! perf ! fakesink #omxh264enc control-rate=2 bitrate=1200000 ! 'video/x-h264, stream-format=(string)byte-stream' ! h264parse ! mpegtsmux ! udpsink host=192.168.0.127 port=5000 sync=false async=false
Setting pipeline to PAUSED ...
NvPclSetHotplugCallback: ++++++++++++++++++++++
---- Imager: Calibration blob file handling supported in this build ----
NvPclHwGetModuleList: OFParserListModules Succeeded
NvPclHwGetModuleList: WARNING: Could not map module to ISP config string
NvPclHwGetModuleList: No module data found
NvPclHwPrintModuleDefinition -- Name: mt9m021_slave
NvPclHwPrintModuleDefinition -- Position: 0
NvPclHwPrintModuleDefinition -- CalibrationData Found: 1
NvPclHwPrintCameraSubModule -- HwCamSubModule[0].Name: v4l2_sensor
NvPclHwPrintCameraSubModule -- HwCamSubModule[0].DevName: mt9m021 1-0010
NvPclHwGetModuleList: WARNING: Could not map module to ISP config string
NvPclHwGetModuleList: No module data found
NvPclHwPrintModuleDefinition -- Name: mt9m021_master
NvPclHwPrintModuleDefinition -- Position: 1
NvPclHwPrintModuleDefinition -- CalibrationData Found: 1
NvPclHwPrintCameraSubModule -- HwCamSubModule[0].Name: v4l2_sensor
NvPclHwPrintCameraSubModule -- HwCamSubModule[0].DevName: mt9m021 2-0010
NvPclHwGetModuleList: OFParserListModules Succeeded
NvPclModuleListInitialize: NvPclModule list[0]: mt9m021_slave position0
NvPclModuleListInitialize: NvPclModule list[1]: mt9m021_master position1
NvPclHwScanExternalCameras -- adding video1 to discover list
NvPclHwScanExternalCameras -- adding video0 to discover list
NvPclHwScanExternalCameras -- adding video1 to discover list
NvPclHwScanExternalCameras -- adding video0 to discover list
initialize: /dev/video0
initialize: /dev/video1
NvPclHwScanExternalCameras -- adding video1 to discover list
NvPclHwScanExternalCameras -- adding video0 to discover list
initialize: /dev/video0
initialize: /dev/video1
getHotplugMonitor: Getting hotplug monitor instance
 initializeHotplug++
 hotPlugfunc ++ 
 addWatch: Watch added wd='1'
CheckProcDTExists: INFO: accessing /proc/device-tree/tegra-virtual-camera-platform/modules; No such file or directory
PCLHW_DTParser
setHotplugCallback: Registered new callback client
NvPclSetHotplugCallback: ----------------------
NvPclOpen: ++++++++++++++++++++++
NvPclStateControllerOpen: Found GUID 0 match at index[0]
NvPclHwInitializeModule: allocate overrides pathname @ 0x7fa196ac80
NvPclHwInitializeModule: allocate overrides pathname @ 0x7fa196ad10
NvPclHwInitializeModule: allocate overrides pathname @ 0x7fa197a760
NvPclHwInitializeModule: allocate overrides pathname @ 0x7fa197a7f0
NvPclHwInitializeModule: allocate overrides pathname @ 0x7fa197a880
NvPclHwInitializeModule: allocate overrides pathname @ 0x7fa197a910
LoadOverridesFile: looking for override file [/Calib/camera_override.isp] 1/16CheckOverridesPermissions: cannot stat file [/Calib/camera_override.isp]
LoadOverridesFile: looking for override file [/data/nvcam/settings/camera_overrides.isp] 2/16CheckOverridesPermissions: cannot stat file [/data/nvcam/settings/camera_overrides.isp]
LoadOverridesFile: looking for override file [/opt/nvidia/nvcam/settings/camera_overrides.isp] 3/16CheckOverridesPermissions: cannot stat file [/opt/nvidia/nvcam/settings/camera_overrides.isp]
LoadOverridesFile: looking for override file [/var/nvidia/nvcam/settings/camera_overrides.isp] 4/16CheckOverridesPermissions: cannot stat file [/var/nvidia/nvcam/settings/camera_overrides.isp]
LoadOverridesFile: looking for override file [/data/nvcam/camera_overrides.isp] 5/16CheckOverridesPermissions: cannot stat file [/data/nvcam/camera_overrides.isp]
LoadOverridesFile: looking for override file [/data/nvcam/settings/mt9m021_slave.isp] 6/16CheckOverridesPermissions: cannot stat file [/data/nvcam/settings/mt9m021_slave.isp]
LoadOverridesFile: looking for override file [/opt/nvidia/nvcam/settings/mt9m021_slave.isp] 7/16CheckOverridesPermissions: cannot stat file [/opt/nvidia/nvcam/settings/mt9m021_slave.isp]
LoadOverridesFile: looking for override file [/var/nvidia/nvcam/settings/mt9m021_slave.isp] 8/16CheckOverridesPermissions: cannot stat file [/var/nvidia/nvcam/settings/mt9m021_slave.isp]
---- imager: No override file found. ----
Imager: looking for override file [/mnt/factory/camera/factory.bin] 1/16
Imager: looking for override file [/Calib/factory.bin] 2/16
Imager: looking for override file [/Calib/calibration.bin] 3/16
Imager: looking for override file [(null)] 4/16
Imager: looking for override file [(null)] 5/16
Imager: looking for override file [(null)] 6/16
Imager: looking for override file [(null)] 7/16
Imager: looking for override file [(null)] 8/16
Imager: looking for override file [(null)] 9/16
Imager: looking for override file [(null)] 10/16
Imager: looking for override file [(null)] 11/16
Imager: looking for override file [(null)] 12/16
Imager: looking for override file [(null)] 13/16
Imager: looking for override file [(null)] 14/16
Imager: looking for override file [(null)] 15/16
Imager: looking for override file [(null)] 16/16
Imager: looking for override file [/data/nvcam/settings/factory.bin] 1/16
Imager: looking for override file [/data/nvcam/settings/mt9m021_slave.bin] 2/16
Imager: looking for override file [/opt/nvidia/nvcam/settings/mt9m021_slave.bin] 3/16
Imager: looking for override file [/var/nvidia/nvcam/settings/mt9m021_slave.bin] 4/16
Imager: looking for override file [(null)] 5/16
Imager: looking for override file [(null)] 6/16
Imager: looking for override file [(null)] 7/16
Imager: looking for override file [(null)] 8/16
Imager: looking for override file [(null)] 9/16
Imager: looking for override file [(null)] 10/16
Imager: looking for override file [(null)] 11/16
Imager: looking for override file [(null)] 12/16
Imager: looking for override file [(null)] 13/16
Imager: looking for override file [(null)] 14/16
Imager: looking for override file [(null)] 15/16
Imager: looking for override file [(null)] 16/16
NvPclCreateDriver: Found NvPcl Driver Hal dev_name match (v4l2_sensor)
NvPclCreateDriver: Found a Driver name match (v4l2_sensor)
NvPclConnectDrivers: hImager was NULL, creating new imager
NvPclInitializeDrivers: v4l2_sensor ++++++++++++++++++
OFDPropertyGetString: could not read property [devnode-bus]
initialize: mt9m021 1-0010
Control Fuse ID not found
Control OTP Data not found
Control Group Hold not found
Control Sensor Mode not found
Control Frame Rate not found
Control Exposure not found
Control Coarse Time Short not found
Control Coarse Time Short not found
findCustomCids: calculated MaxCoarseDiff 307
OFDPropertyGetString: could not read property [type]
loadSubType: Sensor type missing in DT, 180
OFDPropertyGetString: could not read property [mode0.mode_type]
mode 0: Failed to load mode type
OFDPropertyGetString: could not read property [mode0.pixel_phase]
mode 0: Failed to load pixel phase
OFDPropertyCopyToLong: could not read property [mode0.embedded_metadata_height]
OFDPropertyGetString: could not read property [mode0.x_start]
OFDPropertyGetString: could not read property [mode0.y_start]
OFDPropertyGetString: could not read property [mode0.x_end]
OFDPropertyGetString: could not read property [mode0.y_end]
OFDPropertyGetString: could not read property [mode0.h_scaling]
OFDPropertyGetString: could not read property [mode0.v_scaling]
initialize: Loaded Driver: 1 Modes Available--------------
NvPclInitializeDrivers: v4l2_sensor ------------------
NvPclOpen: ----------------------
LSC: LSC surface is not based on full res!
NvPclOpen: ++++++++++++++++++++++
NvPclStateControllerOpen: Found GUID 1 match at index[1]
NvPclHwInitializeModule: allocate overrides pathname @ 0x7fa1972380
NvPclHwInitializeModule: allocate overrides pathname @ 0x7fa1972410
NvPclHwInitializeModule: allocate overrides pathname @ 0x7fa19724a0
NvPclHwInitializeModule: allocate overrides pathname @ 0x7fa1972530
NvPclHwInitializeModule: allocate overrides pathname @ 0x7fa19725c0
NvPclHwInitializeModule: allocate overrides pathname @ 0x7fa1972650
LoadOverridesFile: looking for override file [/Calib/camera_override.isp] 1/16CheckOverridesPermissions: cannot stat file [/Calib/camera_override.isp]
LoadOverridesFile: looking for override file [/data/nvcam/settings/camera_overrides.isp] 2/16CheckOverridesPermissions: cannot stat file [/data/nvcam/settings/camera_overrides.isp]
LoadOverridesFile: looking for override file [/opt/nvidia/nvcam/settings/camera_overrides.isp] 3/16CheckOverridesPermissions: cannot stat file [/opt/nvidia/nvcam/settings/camera_overrides.isp]
LoadOverridesFile: looking for override file [/var/nvidia/nvcam/settings/camera_overrides.isp] 4/16CheckOverridesPermissions: cannot stat file [/var/nvidia/nvcam/settings/camera_overrides.isp]
LoadOverridesFile: looking for override file [/data/nvcam/camera_overrides.isp] 5/16CheckOverridesPermissions: cannot stat file [/data/nvcam/camera_overrides.isp]
LoadOverridesFile: looking for override file [/data/nvcam/settings/mt9m021_master.isp] 6/16CheckOverridesPermissions: cannot stat file [/data/nvcam/settings/mt9m021_master.isp]
LoadOverridesFile: looking for override file [/opt/nvidia/nvcam/settings/mt9m021_master.isp] 7/16CheckOverridesPermissions: cannot stat file [/opt/nvidia/nvcam/settings/mt9m021_master.isp]
LoadOverridesFile: looking for override file [/var/nvidia/nvcam/settings/mt9m021_master.isp] 8/16CheckOverridesPermissions: cannot stat file [/var/nvidia/nvcam/settings/mt9m021_master.isp]
---- imager: No override file found. ----
Imager: looking for override file [/mnt/factory/camera/factory.bin] 1/16
Imager: looking for override file [/Calib/factory.bin] 2/16
Imager: looking for override file [/Calib/calibration.bin] 3/16
Imager: looking for override file [(null)] 4/16
Imager: looking for override file [(null)] 5/16
Imager: looking for override file [(null)] 6/16
Imager: looking for override file [(null)] 7/16
Imager: looking for override file [(null)] 8/16
Imager: looking for override file [(null)] 9/16
Imager: looking for override file [(null)] 10/16
Imager: looking for override file [(null)] 11/16
Imager: looking for override file [(null)] 12/16
Imager: looking for override file [(null)] 13/16
Imager: looking for override file [(null)] 14/16
Imager: looking for override file [(null)] 15/16
Imager: looking for override file [(null)] 16/16
Imager: looking for override file [/data/nvcam/settings/factory.bin] 1/16
Imager: looking for override file [/data/nvcam/settings/mt9m021_master.bin] 2/16
Imager: looking for override file [/opt/nvidia/nvcam/settings/mt9m021_master.bin] 3/16
Imager: looking for override file [/var/nvidia/nvcam/settings/mt9m021_master.bin] 4/16
Imager: looking for override file [(null)] 5/16
Imager: looking for override file [(null)] 6/16
Imager: looking for override file [(null)] 7/16
Imager: looking for override file [(null)] 8/16
Imager: looking for override file [(null)] 9/16
Imager: looking for override file [(null)] 10/16
Imager: looking for override file [(null)] 11/16
Imager: looking for override file [(null)] 12/16
Imager: looking for override file [(null)] 13/16
Imager: looking for override file [(null)] 14/16
Imager: looking for override file [(null)] 15/16
Imager: looking for override file [(null)] 16/16
NvPclCreateDriver: Found NvPcl Driver Hal dev_name match (v4l2_sensor)
NvPclCreateDriver: Found a Driver name match (v4l2_sensor)
NvPclConnectDrivers: hImager was NULL, creating new imager
NvPclInitializeDrivers: v4l2_sensor ++++++++++++++++++
OFDPropertyGetString: could not read property [devnode-bus]
initialize: mt9m021 2-0010
OFDPropertyGetString: could not read property [use_decibel_gain]
OFDPropertyGetString: could not read property [use_sensor_mode_id]
Control Fuse ID not found
Control OTP Data not found
Control Group Hold not found
Control Frame Rate not found
Control Exposure not found
Control Coarse Time Short not found
Control Coarse Time Short not found
findCustomCids: calculated MaxCoarseDiff 307
OFDPropertyGetString: could not read property [type]
loadSubType: Sensor type missing in DT, 180
OFDPropertyCopyToLong: could not read property [mode0.csi_pixel_bit_depth]
OFDPropertyGetString: could not read property [mode0.mode_type]
mode 0: Failed to load mode type
OFDPropertyGetString: could not read property [mode0.pixel_phase]
mode 0: Failed to load pixel phase
OFDPropertyCopyToLong: could not read property [mode0.embedded_metadata_height]
OFDPropertyGetString: could not read property [mode0.x_start]
OFDPropertyGetString: could not read property [mode0.y_start]
OFDPropertyGetString: could not read property [mode0.x_end]
OFDPropertyGetString: could not read property [mode0.y_end]
OFDPropertyGetString: could not read property [mode0.h_scaling]
OFDPropertyGetString: could not read property [mode0.v_scaling]
OFDPropertyGetString: could not read property [sensor_model]
initialize: Loaded Driver: 1 Modes Available--------------
NvPclInitializeDrivers: v4l2_sensor ------------------
NvPclOpen: ----------------------
LSC: LSC surface is not based on full res!
NvPclPowerOn: +++++++++++
NvPclPowerOn: -----------
LSC: LSC surface is not based on full res!

Available Sensor modes : 
1280 x 720 FR=60.000000 CF=0x1009208a10 SensorModeType=4 CSIPixelBitDepth=12 DynPixelBitDepth=12
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...

NvCameraSrc: Trying To Set Default Camera Resolution. Selected sensorModeIndex = 0 WxH = 1280x720 FrameRate = 60.000000 ...

New clock: GstSystemClock
NvPclSettingsUpdate: Sending Updated Settings through PCL
NvPclSettingsApply: Applying last settings through PCL
apply:+++++++++++++++++++++++
writeMode: Target mode Id(0): Resolution 1280x720
setActiveBufferMemory: 2
INPUT: Width 1280 Height 720 pixelformat RG12
writeFrameRate:	INPUT frameLength:7636, frameRate:60.000000
writeGain:	INPUT gainCtrl:4 analogGain:1.000000
writeExposure:	INPUT coarseTime:7329, expTime:0.015996
setControlValMultiple: Frame Length Control class inconsistent
setControlValMultiple: Gain Control class inconsistent
(NvOdmDevice) Error BadParameter: Invalid control list (in dvs/git/dirty/git-master_linux/camera-partner/imager/src/V4L2Device.cpp, function setControlValMultiple(), line 761)
(NvOdmDevice) Error BadParameter:  (propagating from dvs/git/dirty/git-master_linux/camera-partner/imager/src/devices/V4L2SensorViCsi.cpp, function setDeviceControls(), line 1558)
updateOutputSettings: Set Control failed. Use cached values
(NvOdmDevice) Error InsufficientMemory: Cannot allocate control string (in dvs/git/dirty/git-master_linux/camera-partner/imager/src/V4L2Device.cpp, function getControlValMultiple(), line 541)
updateOutputSettings:	OUTPUT frameRate:130048.000000
updateOutputSettings:	OUTPUT frameLength:7636, frameRate:60.002857
updateOutputSettings:	OUTPUT analogGain:1.000000
updateOutputSettings:	OUTPUT coarseTime:7329, expTime:0.015996
updateOutputSettings:	OUTPUT frameRate:0.000000
apply:-----------------------
NvPclSettingsApply: Reading PCL settings
NvPclSettingsUpdate: Sending Updated Settings through PCL
NvPclSettingsApply: Applying last settings through PCL
apply:+++++++++++++++++++++++
apply:-----------------------
NvPclSettingsApply: Reading PCL settings
NvPclSettingsUpdate: Sending Updated Settings through PCL
NvPclSettingsApply: Applying last settings through PCL
apply:+++++++++++++++++++++++
writeGain:	INPUT gainCtrl:7 analogGain:1.999999
setControlValMultiple: Gain Control class inconsistent
(NvOdmDevice) Error BadParameter: Invalid control list (in dvs/git/dirty/git-master_linux/camera-partner/imager/src/V4L2Device.cpp, function setControlValMultiple(), line 761)
(NvOdmDevice) Error BadParameter:  (propagating from dvs/git/dirty/git-master_linux/camera-partner/imager/src/devices/V4L2SensorViCsi.cpp, function setDeviceControls(), line 1558)
updateOutputSettings: Set Control failed. Use cached values
(NvOdmDevice) Error InsufficientMemory: Cannot allocate control string (in dvs/git/dirty/git-master_linux/camera-partner/imager/src/V4L2Device.cpp, function getControlValMultiple(), line 541)
updateOutputSettings:	OUTPUT frameRate:130048.000000
updateOutputSettings:	OUTPUT analogGain:1.750000
updateOutputSettings:	OUTPUT frameRate:0.000000
apply:-----------------------
NvPclSettingsApply: Reading PCL settings
PowerServiceCore:handleRequests: timePassed = 1906
NvPclSettingsUpdate: Sending Updated Settings through PCL
NvPclSettingsApply: Applying last settings through PCL
apply:+++++++++++++++++++++++
updateOutputSettings:	OUTPUT frameRate:0.000000
updateOutputSettings:	OUTPUT frameRate:0.000000
apply:-----------------------
NvPclSettingsApply: Reading PCL settings
NvPclSettingsUpdate: Sending Updated Settings through PCL
NvPclSettingsApply: Applying last settings through PCL
apply:+++++++++++++++++++++++
updateOutputSettings:	OUTPUT frameRate:0.000000
updateOutputSettings:	OUTPUT frameRate:0.000000
apply:-----------------------
NvPclSettingsApply: Reading PCL settings
SCF: Error InvalidState:  NonFatal ISO BW requested not set. Requested = 4989600 Set = 3916800 (in src/services/power/PowerServiceCore.cpp, function setCameraBw(), line 474)
SCF: Error Timeout:  (propagating from src/services/capture/CaptureServiceEvent.cpp, function wait(), line 59)
Error: Camera HwEvents wait, this may indicate a hardware timeout occured,abort current/incoming cc
launchCC abort cc 104 session 0
SCF: Error Timeout:  (propagating from src/api/Session.cpp, function capture(), line 830)
launchCC abort cc 105 session 0
SCF: Error Timeout:  (propagating from src/api/Session.cpp, function capture(), line 830)
launchCC abort cc 106 session 0
SCF: Error Timeout:  (propagating from src/api/Session.cpp, function capture(), line 830)
SCF: Error Timeout: ISP port 0 timed out! (in src/services/capture/CaptureServiceDeviceIsp.cpp, function waitIspFrameEnd(), line 702)
launchCC abort cc 107 session 0

Device working with nvcamerasrc:

nvidia@tegra-ubuntu:~$ gst-launch-1.0 nvcamerasrc sensor-id=1 ! nvvidconv flip-method=6 ! 'video/x-raw(memory:NVMM), width=(int)1280, height=(int)720, format=(string)I420,framerate=(fraction)60/1' ! perf ! fakesink #omxh264enc control-rate=2 bitrate=1200000 ! 'video/x-h264, stream-format=(string)byte-stream' ! h264parse ! mpegtsmux ! udpsink host=192.168.0.127 port=5000 sync=false async=false
Setting pipeline to PAUSED ...
NvPclSetHotplugCallback: ++++++++++++++++++++++
---- Imager: Calibration blob file handling supported in this build ----
NvPclHwGetModuleList: OFParserListModules Succeeded
NvPclHwGetModuleList: WARNING: Could not map module to ISP config string
NvPclHwGetModuleList: No module data found
NvPclHwPrintModuleDefinition -- Name: mt9m021_slave
NvPclHwPrintModuleDefinition -- Position: 0
NvPclHwPrintModuleDefinition -- CalibrationData Found: 1
NvPclHwPrintCameraSubModule -- HwCamSubModule[0].Name: v4l2_sensor
NvPclHwPrintCameraSubModule -- HwCamSubModule[0].DevName: mt9m021 1-0010
NvPclHwGetModuleList: WARNING: Could not map module to ISP config string
NvPclHwGetModuleList: No module data found
NvPclHwPrintModuleDefinition -- Name: mt9m021_master
NvPclHwPrintModuleDefinition -- Position: 1
NvPclHwPrintModuleDefinition -- CalibrationData Found: 1
NvPclHwPrintCameraSubModule -- HwCamSubModule[0].Name: v4l2_sensor
NvPclHwPrintCameraSubModule -- HwCamSubModule[0].DevName: mt9m021 2-0010
NvPclHwGetModuleList: OFParserListModules Succeeded
NvPclModuleListInitialize: NvPclModule list[0]: mt9m021_slave position0
NvPclModuleListInitialize: NvPclModule list[1]: mt9m021_master position1
NvPclHwScanExternalCameras -- adding video1 to discover list
NvPclHwScanExternalCameras -- adding video0 to discover list
NvPclHwScanExternalCameras -- adding video1 to discover list
NvPclHwScanExternalCameras -- adding video0 to discover list
initialize: /dev/video0
initialize: /dev/video1
NvPclHwScanExternalCameras -- adding video1 to discover list
NvPclHwScanExternalCameras -- adding video0 to discover list
initialize: /dev/video0
initialize: /dev/video1
getHotplugMonitor: Getting hotplug monitor instance
 initializeHotplug++
 hotPlugfunc ++ 
 addWatch: Watch added wd='1'
CheckProcDTExists: INFO: accessing /proc/device-tree/tegra-virtual-camera-platform/modules; No such file or directory
PCLHW_DTParser
setHotplugCallback: Registered new callback client
NvPclSetHotplugCallback: ----------------------
NvPclOpen: ++++++++++++++++++++++
NvPclStateControllerOpen: Found GUID 0 match at index[0]
NvPclHwInitializeModule: allocate overrides pathname @ 0x7fa196ada0
NvPclHwInitializeModule: allocate overrides pathname @ 0x7fa196ae30
NvPclHwInitializeModule: allocate overrides pathname @ 0x7fa197a880
NvPclHwInitializeModule: allocate overrides pathname @ 0x7fa197a910
NvPclHwInitializeModule: allocate overrides pathname @ 0x7fa197a9a0
NvPclHwInitializeModule: allocate overrides pathname @ 0x7fa197aa30
LoadOverridesFile: looking for override file [/Calib/camera_override.isp] 1/16CheckOverridesPermissions: cannot stat file [/Calib/camera_override.isp]
LoadOverridesFile: looking for override file [/data/nvcam/settings/camera_overrides.isp] 2/16CheckOverridesPermissions: cannot stat file [/data/nvcam/settings/camera_overrides.isp]
LoadOverridesFile: looking for override file [/opt/nvidia/nvcam/settings/camera_overrides.isp] 3/16CheckOverridesPermissions: cannot stat file [/opt/nvidia/nvcam/settings/camera_overrides.isp]
LoadOverridesFile: looking for override file [/var/nvidia/nvcam/settings/camera_overrides.isp] 4/16CheckOverridesPermissions: cannot stat file [/var/nvidia/nvcam/settings/camera_overrides.isp]
LoadOverridesFile: looking for override file [/data/nvcam/camera_overrides.isp] 5/16CheckOverridesPermissions: cannot stat file [/data/nvcam/camera_overrides.isp]
LoadOverridesFile: looking for override file [/data/nvcam/settings/mt9m021_slave.isp] 6/16CheckOverridesPermissions: cannot stat file [/data/nvcam/settings/mt9m021_slave.isp]
LoadOverridesFile: looking for override file [/opt/nvidia/nvcam/settings/mt9m021_slave.isp] 7/16CheckOverridesPermissions: cannot stat file [/opt/nvidia/nvcam/settings/mt9m021_slave.isp]
LoadOverridesFile: looking for override file [/var/nvidia/nvcam/settings/mt9m021_slave.isp] 8/16CheckOverridesPermissions: cannot stat file [/var/nvidia/nvcam/settings/mt9m021_slave.isp]
---- imager: No override file found. ----
Imager: looking for override file [/mnt/factory/camera/factory.bin] 1/16
Imager: looking for override file [/Calib/factory.bin] 2/16
Imager: looking for override file [/Calib/calibration.bin] 3/16
Imager: looking for override file [(null)] 4/16
Imager: looking for override file [(null)] 5/16
Imager: looking for override file [(null)] 6/16
Imager: looking for override file [(null)] 7/16
Imager: looking for override file [(null)] 8/16
Imager: looking for override file [(null)] 9/16
Imager: looking for override file [(null)] 10/16
Imager: looking for override file [(null)] 11/16
Imager: looking for override file [(null)] 12/16
Imager: looking for override file [(null)] 13/16
Imager: looking for override file [(null)] 14/16
Imager: looking for override file [(null)] 15/16
Imager: looking for override file [(null)] 16/16
Imager: looking for override file [/data/nvcam/settings/factory.bin] 1/16
Imager: looking for override file [/data/nvcam/settings/mt9m021_slave.bin] 2/16
Imager: looking for override file [/opt/nvidia/nvcam/settings/mt9m021_slave.bin] 3/16
Imager: looking for override file [/var/nvidia/nvcam/settings/mt9m021_slave.bin] 4/16
Imager: looking for override file [(null)] 5/16
Imager: looking for override file [(null)] 6/16
Imager: looking for override file [(null)] 7/16
Imager: looking for override file [(null)] 8/16
Imager: looking for override file [(null)] 9/16
Imager: looking for override file [(null)] 10/16
Imager: looking for override file [(null)] 11/16
Imager: looking for override file [(null)] 12/16
Imager: looking for override file [(null)] 13/16
Imager: looking for override file [(null)] 14/16
Imager: looking for override file [(null)] 15/16
Imager: looking for override file [(null)] 16/16
NvPclCreateDriver: Found NvPcl Driver Hal dev_name match (v4l2_sensor)
NvPclCreateDriver: Found a Driver name match (v4l2_sensor)
NvPclConnectDrivers: hImager was NULL, creating new imager
NvPclInitializeDrivers: v4l2_sensor ++++++++++++++++++
OFDPropertyGetString: could not read property [devnode-bus]
initialize: mt9m021 1-0010
Control Fuse ID not found
Control OTP Data not found
Control Group Hold not found
Control Sensor Mode not found
Control Frame Rate not found
Control Exposure not found
Control Coarse Time Short not found
Control Coarse Time Short not found
findCustomCids: calculated MaxCoarseDiff 307
OFDPropertyGetString: could not read property [type]
loadSubType: Sensor type missing in DT, 180
OFDPropertyGetString: could not read property [mode0.mode_type]
mode 0: Failed to load mode type
OFDPropertyGetString: could not read property [mode0.pixel_phase]
mode 0: Failed to load pixel phase
OFDPropertyCopyToLong: could not read property [mode0.embedded_metadata_height]
OFDPropertyGetString: could not read property [mode0.x_start]
OFDPropertyGetString: could not read property [mode0.y_start]
OFDPropertyGetString: could not read property [mode0.x_end]
OFDPropertyGetString: could not read property [mode0.y_end]
OFDPropertyGetString: could not read property [mode0.h_scaling]
OFDPropertyGetString: could not read property [mode0.v_scaling]
initialize: Loaded Driver: 1 Modes Available--------------
NvPclInitializeDrivers: v4l2_sensor ------------------
NvPclOpen: ----------------------
LSC: LSC surface is not based on full res!
NvPclOpen: ++++++++++++++++++++++
NvPclStateControllerOpen: Found GUID 1 match at index[1]
NvPclHwInitializeModule: allocate overrides pathname @ 0x7fa19724a0
NvPclHwInitializeModule: allocate overrides pathname @ 0x7fa1972530
NvPclHwInitializeModule: allocate overrides pathname @ 0x7fa19725c0
NvPclHwInitializeModule: allocate overrides pathname @ 0x7fa1972650
NvPclHwInitializeModule: allocate overrides pathname @ 0x7fa19726e0
NvPclHwInitializeModule: allocate overrides pathname @ 0x7fa1972770
LoadOverridesFile: looking for override file [/Calib/camera_override.isp] 1/16CheckOverridesPermissions: cannot stat file [/Calib/camera_override.isp]
LoadOverridesFile: looking for override file [/data/nvcam/settings/camera_overrides.isp] 2/16CheckOverridesPermissions: cannot stat file [/data/nvcam/settings/camera_overrides.isp]
LoadOverridesFile: looking for override file [/opt/nvidia/nvcam/settings/camera_overrides.isp] 3/16CheckOverridesPermissions: cannot stat file [/opt/nvidia/nvcam/settings/camera_overrides.isp]
LoadOverridesFile: looking for override file [/var/nvidia/nvcam/settings/camera_overrides.isp] 4/16CheckOverridesPermissions: cannot stat file [/var/nvidia/nvcam/settings/camera_overrides.isp]
LoadOverridesFile: looking for override file [/data/nvcam/camera_overrides.isp] 5/16CheckOverridesPermissions: cannot stat file [/data/nvcam/camera_overrides.isp]
LoadOverridesFile: looking for override file [/data/nvcam/settings/mt9m021_master.isp] 6/16CheckOverridesPermissions: cannot stat file [/data/nvcam/settings/mt9m021_master.isp]
LoadOverridesFile: looking for override file [/opt/nvidia/nvcam/settings/mt9m021_master.isp] 7/16CheckOverridesPermissions: cannot stat file [/opt/nvidia/nvcam/settings/mt9m021_master.isp]
LoadOverridesFile: looking for override file [/var/nvidia/nvcam/settings/mt9m021_master.isp] 8/16CheckOverridesPermissions: cannot stat file [/var/nvidia/nvcam/settings/mt9m021_master.isp]
---- imager: No override file found. ----
Imager: looking for override file [/mnt/factory/camera/factory.bin] 1/16
Imager: looking for override file [/Calib/factory.bin] 2/16
Imager: looking for override file [/Calib/calibration.bin] 3/16
Imager: looking for override file [(null)] 4/16
Imager: looking for override file [(null)] 5/16
Imager: looking for override file [(null)] 6/16
Imager: looking for override file [(null)] 7/16
Imager: looking for override file [(null)] 8/16
Imager: looking for override file [(null)] 9/16
Imager: looking for override file [(null)] 10/16
Imager: looking for override file [(null)] 11/16
Imager: looking for override file [(null)] 12/16
Imager: looking for override file [(null)] 13/16
Imager: looking for override file [(null)] 14/16
Imager: looking for override file [(null)] 15/16
Imager: looking for override file [(null)] 16/16
Imager: looking for override file [/data/nvcam/settings/factory.bin] 1/16
Imager: looking for override file [/data/nvcam/settings/mt9m021_master.bin] 2/16
Imager: looking for override file [/opt/nvidia/nvcam/settings/mt9m021_master.bin] 3/16
Imager: looking for override file [/var/nvidia/nvcam/settings/mt9m021_master.bin] 4/16
Imager: looking for override file [(null)] 5/16
Imager: looking for override file [(null)] 6/16
Imager: looking for override file [(null)] 7/16
Imager: looking for override file [(null)] 8/16
Imager: looking for override file [(null)] 9/16
Imager: looking for override file [(null)] 10/16
Imager: looking for override file [(null)] 11/16
Imager: looking for override file [(null)] 12/16
Imager: looking for override file [(null)] 13/16
Imager: looking for override file [(null)] 14/16
Imager: looking for override file [(null)] 15/16
Imager: looking for override file [(null)] 16/16
NvPclCreateDriver: Found NvPcl Driver Hal dev_name match (v4l2_sensor)
NvPclCreateDriver: Found a Driver name match (v4l2_sensor)
NvPclConnectDrivers: hImager was NULL, creating new imager
NvPclInitializeDrivers: v4l2_sensor ++++++++++++++++++
OFDPropertyGetString: could not read property [devnode-bus]
initialize: mt9m021 2-0010
OFDPropertyGetString: could not read property [use_decibel_gain]
OFDPropertyGetString: could not read property [use_sensor_mode_id]
Control Fuse ID not found
Control OTP Data not found
Control Group Hold not found
Control Frame Rate not found
Control Exposure not found
Control Coarse Time Short not found
Control Coarse Time Short not found
findCustomCids: calculated MaxCoarseDiff 307
OFDPropertyGetString: could not read property [type]
loadSubType: Sensor type missing in DT, 180
OFDPropertyCopyToLong: could not read property [mode0.csi_pixel_bit_depth]
OFDPropertyGetString: could not read property [mode0.mode_type]
mode 0: Failed to load mode type
OFDPropertyGetString: could not read property [mode0.pixel_phase]
mode 0: Failed to load pixel phase
OFDPropertyCopyToLong: could not read property [mode0.embedded_metadata_height]
OFDPropertyGetString: could not read property [mode0.x_start]
OFDPropertyGetString: could not read property [mode0.y_start]
OFDPropertyGetString: could not read property [mode0.x_end]
OFDPropertyGetString: could not read property [mode0.y_end]
OFDPropertyGetString: could not read property [mode0.h_scaling]
OFDPropertyGetString: could not read property [mode0.v_scaling]
OFDPropertyGetString: could not read property [sensor_model]
initialize: Loaded Driver: 1 Modes Available--------------
NvPclInitializeDrivers: v4l2_sensor ------------------
NvPclOpen: ----------------------
LSC: LSC surface is not based on full res!
NvPclPowerOn: +++++++++++
NvPclPowerOn: -----------
LSC: LSC surface is not based on full res!

Available Sensor modes : 
1280 x 720 FR=60.000000 CF=0x1009208a10 SensorModeType=4 CSIPixelBitDepth=12 DynPixelBitDepth=12
Pipeline is live and does not need PREROLL ...

NvCameraSrc: Trying To Set Default Camera Resolution. Selected sensorModeIndex = 0 WxH = 1280x720 FrameRate = 60.000000 ...

Setting pipeline to PLAYING ...
New clock: GstSystemClock
NvPclSettingsUpdate: Sending Updated Settings through PCL
NvPclSettingsApply: Applying last settings through PCL
apply:+++++++++++++++++++++++
writeMode: Target mode Id(0): Resolution 1280x720
setActiveBufferMemory: 2
INPUT: Width 1280 Height 720 pixelformat RG12
writeFrameRate:	INPUT frameLength:7636, frameRate:60.000000
writeGain:	INPUT gainCtrl:4 analogGain:1.000000
writeExposure:	INPUT coarseTime:7329, expTime:0.015996
setControlValMultiple: Frame Length Control class inconsistent
setControlValMultiple: Gain Control class inconsistent
(NvOdmDevice) Error BadParameter: Invalid control list (in dvs/git/dirty/git-master_linux/camera-partner/imager/src/V4L2Device.cpp, function setControlValMultiple(), line 761)
(NvOdmDevice) Error BadParameter:  (propagating from dvs/git/dirty/git-master_linux/camera-partner/imager/src/devices/V4L2SensorViCsi.cpp, function setDeviceControls(), line 1558)
updateOutputSettings: Set Control failed. Use cached values
(NvOdmDevice) Error InsufficientMemory: Cannot allocate control string (in dvs/git/dirty/git-master_linux/camera-partner/imager/src/V4L2Device.cpp, function getControlValMultiple(), line 541)
updateOutputSettings:	OUTPUT frameRate:130048.000000
updateOutputSettings:	OUTPUT frameLength:7636, frameRate:60.002857
updateOutputSettings:	OUTPUT analogGain:1.000000
updateOutputSettings:	OUTPUT coarseTime:7329, expTime:0.015996
updateOutputSettings:	OUTPUT frameRate:0.000000
apply:-----------------------
NvPclSettingsApply: Reading PCL settings
NvPclSettingsUpdate: Sending Updated Settings through PCL
NvPclSettingsApply: Applying last settings through PCL
apply:+++++++++++++++++++++++
apply:-----------------------
NvPclSettingsApply: Reading PCL settings
NvPclSettingsUpdate: Sending Updated Settings through PCL
NvPclSettingsApply: Applying last settings through PCL
apply:+++++++++++++++++++++++
updateOutputSettings:	OUTPUT frameRate:130048.000000
updateOutputSettings:	OUTPUT frameRate:0.000000
apply:-----------------------
NvPclSettingsApply: Reading PCL settings
PowerServiceCore:handleRequests: timePassed = 1903
NvPclSettingsUpdate: Sending Updated Settings through PCL
NvPclSettingsApply: Applying last settings through PCL
apply:+++++++++++++++++++++++
writeGain:	INPUT gainCtrl:7 analogGain:1.999999
setControlValMultiple: Gain Control class inconsistent
(NvOdmDevice) Error BadParameter: Invalid control list (in dvs/git/dirty/git-master_linux/camera-partner/imager/src/V4L2Device.cpp, function setControlValMultiple(), line 761)
(NvOdmDevice) Error BadParameter:  (propagating from dvs/git/dirty/git-master_linux/camera-partner/imager/src/devices/V4L2SensorViCsi.cpp, function setDeviceControls(), line 1558)
updateOutputSettings: Set Control failed. Use cached values
(NvOdmDevice) Error InsufficientMemory: Cannot allocate control string (in dvs/git/dirty/git-master_linux/camera-partner/imager/src/V4L2Device.cpp, function getControlValMultiple(), line 541)
updateOutputSettings:	OUTPUT frameRate:0.000000
updateOutputSettings:	OUTPUT analogGain:1.750000
updateOutputSettings:	OUTPUT frameRate:0.000000
apply:-----------------------
NvPclSettingsApply: Reading PCL settings
NvPclSettingsUpdate: Sending Updated Settings through PCL
NvPclSettingsApply: Applying last settings through PCL
apply:+++++++++++++++++++++++
updateOutputSettings:	OUTPUT frameRate:0.000000
updateOutputSettings:	OUTPUT frameRate:0.000000
apply:-----------------------
NvPclSettingsApply: Reading PCL settings
SCF: Error InvalidState:  NonFatal ISO BW requested not set. Requested = 4989600 Set = 3916800 (in src/services/power/PowerServiceCore.cpp, function setCameraBw(), line 474)
NvPclSettingsUpdate: Sending Updated Settings through PCL
NvPclSettingsApply: Applying last settings through PCL
apply:+++++++++++++++++++++++
updateOutputSettings:	OUTPUT frameRate:130048.000000
updateOutputSettings:	OUTPUT frameRate:0.000000

Let us know if you need more information about the issue. Thanks

-Adrian

How about change the sensor-id=1 in gstreamer command.

Hi ShaneCCC,

On the information above you can find the output for the sensor-id=1, One interesting thing, we notice for the camera that is working, it calls the function set_power (s_power) at the beginning but the second camera that is not working does not call that function and only starts with “s_stream”. Do you know why that camera is not calling the s_power? both cameras are using same driver.

The s_power will call the camera_common_s_power() to enable the CSI clock, and it only need enable by the first sensor.

Hi ShaneCCC,

For our case both logs for the first camera and second camera are the same, both cameras calls same functions. attached you can find the logs for both cameras (dmesg_device_1 working and dmesg_device_0 not working).

We noticed something weird, if we restart nvcamera-daemon a couple of times, both cameras work, but the camera device-0 (that was not working at the first time without the daemon restart) not calls the s_stream function and just starts to capture. Is that something related to the daemon? Attached you also can find the log for that case (dmesg_device_0_working). We are using these commands to restart the nvcamera-daemon:

service nvcamera-daemon stop
export enableCamPclLogs=1
/usr/sbin/nvcamera-daemon&

We also notice, when the camera device-0 works, if we finish the pipeline, it never calls stream off function, and seems like the stream is always on.

Thanks,
-Adrian

dmesg_device_0_working.txt (2.44 KB)
dmesg_device_0.txt (91.8 KB)
dmesg_device_1.txt (18.1 KB)

Could you try set the discontinuous_clk in DT to try.

Hi ShaneCCC,

We changed discontinuous_clk from “no” to “yes”, but the behavior is the same for the second camera, is still failing.

Could you swap content of the module0 and module1 to verify if HW or software issue.

modules {
 			module0 {
 				badge = "e3333_bottomleft_P5V27C";
 				position = "bottomleft";
 				orientation = "1";
 				drivernode0 {
 					pcl_id = "v4l2_sensor";
 					devname = "ov5693 30-0036";
 					proc-device-tree = "/proc/device-tree/i2c@3180000/tca9548@77/i2c@0/ov5693_a@36";
 				};
 				drivernode1 {
 					pcl_id = "v4l2_lens";
 					proc-device-tree = "/proc/device-tree/e3333_lens_ov5693@P5V27C/";
 				};
 			};
 			module1 {
 				badge = "e3333_centerleft_P5V27C";
 				position = "centerleft";
 				orientation = "1";
 				drivernode0 {
 					pcl_id = "v4l2_sensor";
 					devname = "ov5693 31-0036";
 					proc-device-tree = "/proc/device-tree/i2c@3180000/tca9548@77/i2c@1/ov5693_b@36";
 				};
 				drivernode1 {
 					pcl_id = "v4l2_lens";
 					proc-device-tree = "/proc/device-tree/e3333_lens_ov5693@P5V27C/";
 				};
 			};

Hi ACervantes,

Have you tried our suggestion to swap content of the module0 and module1 to verify if HW or software issue?
Any result can be shared?

Thanks

Hi kayccc,

We were able to get both cameras capturing with nvcamerasrc, we did the test swapping the modules but it did not work. We moved to Jetpack 3.2.1 without any significant change (just the changes required to port the driver) and now the cameras are working.

Thanks.

-Adrian