nvcamerasrc with yuv sensor

Please clarify whether I can use nvcamerasrc with a yuv sensor.

On TX2 I have used below command to stream video from the camera module (ov5693),
gst-launch-1.0 nvcamerasrc num-buffers=50 sensor-id=0 ! ‘video/x-raw(memory:NVMM),width=1920, height=1080, framerate=30/1, format=NV12’ ! omxh264enc ! qtmux ! filesink location=/tmp/myfile.mp4

I am planning to use the same with our custom hardware (SDI-CSI bridge) but at the moment nvcamerasrc not able to initialize our sensor/module.

With enableCamScfLogs=1 and enableCamPclLogs=1, I get below logs,

Thread 1 is waiting
Thread 2 getting next capture
Thread 2 is waiting
Thread 3 getting next capture
Thread 3 is waiting
Thread 4 getting next capture
Thread 5 getting next capture
Thread 5 is waiting
Thread 4 is waiting
Thread 6 getting next capture
Thread 6 is waiting
Thread 7 getting next capture
Thread 7 is waiting
Thread 8 getting next capture
Thread 8 is waiting
Thread 9 getting next capture
Thread 9 is waiting
Thread 10 getting next capture
Thread 10 is waiting
Thread 11 getting next capture
Thread 11 is waiting
Thread 12 getting next capture
Thread 12 is waiting
Starting services...
Worker thread IspHw statsComplete start
Worker thread IspHw frameComplete start
Worker thread CaptureScheduler checkFramePending start
Worker thread CaptureScheduler frameStart start
Worker thread V4L2CaptureScheduler checkCaptureComplete start
Worker thread V4L2CaptureScheduler issueCaptures start
Worker thread PS handleRequests start
getInstance: s_instance(0x7f94b92580)
getInstance: s_instance(0x7f94b92580)
subscribe: create SensorType(gyroscope) sensor(0x7f94b94700)
subscribe: create SensorType(accelerometer) sensor(0x7f94b99b60)
AC plugin not present: dlopen "acplugin.so", acplugin.so: cannot open shared object file: No such file or directory
Services are started
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: tc358840_front_TC01
NvPclHwPrintModuleDefinition -- Position: 0
NvPclHwPrintModuleDefinition -- CalibrationData Found: 1
NvPclHwPrintCameraSubModule -- HwCamSubModule[0].Name: v4l2_sensor
NvPclHwPrintCameraSubModule -- HwCamSubModule[0].DevName: tc358840 2-001f
NvPclHwGetModuleList: OFParserListModules Succeeded
NvPclModuleListInitialize: NvPclModule list[0]: tc358840_front_TC01 position0
NvPclHwScanExternalCameras -- adding video0 to discover list
NvPclHwScanExternalCameras -- adding video0 to discover list
initialize: /dev/video0
NvPclHwScanExternalCameras -- adding video0 to discover list
initialize: /dev/video0
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 @ 0x7f94bc3ce0
NvPclHwInitializeModule: allocate overrides pathname @ 0x7f94bc3d70
NvPclHwInitializeModule: allocate overrides pathname @ 0x7f94bc3e00
NvPclHwInitializeModule: allocate overrides pathname @ 0x7f94bc3e90
NvPclHwInitializeModule: allocate overrides pathname @ 0x7f94bc3f20
NvPclHwInitializeModule: allocate overrides pathname @ 0x7f94bc3fb0
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/tc358840_front_TC01.isp] 6/16CheckOverridesPermissions: cannot stat file [/data/nvcam/settings/tc358840_front_TC01.isp]
LoadOverridesFile: looking for override file [/opt/nvidia/nvcam/settings/tc358840_front_TC01.isp] 7/16CheckOverridesPermissions: cannot stat file [/opt/nvidia/nvcam/settings/tc358840_front_TC01.isp]
LoadOverridesFile: looking for override file [/var/nvidia/nvcam/settings/tc358840_front_TC01.isp] 8/16CheckOverridesPermissions: cannot stat file [/var/nvidia/nvcam/settings/tc358840_front_TC01.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/tc358840_front_TC01.bin] 2/16
Imager: looking for override file [/opt/nvidia/nvcam/settings/tc358840_front_TC01.bin] 3/16
Imager: looking for override file [/var/nvidia/nvcam/settings/tc358840_front_TC01.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: tc358840 2-001f
OFDPropertyGetString: could not read property [use_decibel_gain]
OFDPropertyGetString: could not read property [use_sensor_mode_id]
OFDPropertyGetString: could not read property [delayed_gain]
OFDPropertyCopyToLong: could not read property [has-eeprom]
Control Fuse ID not found
Control OTP Data not found
Control Group Hold not found
Control Gain not found
Control HDR enable not found
Control Frame Rate not found
Control Exposure not found
Control Frame Length not found
Control Coarse Time not found
Control Coarse Time Short not found
checkDriverVersion: Mixed or missing V4L2 controls!
checkDriverVersion: Make sure your kernel driver implements either
checkDriverVersion: V4L2_m_cidFrameLength + V4L2_m_cidCoarseTime(_SHORT)
checkDriverVersion:      or  
checkDriverVersion: V4L2_m_cidFrameRate + V4L2_m_cidExposure
(NvOdmDevice) Error BadParameter:  (in dvs/git/dirty/git-master_linux/camera-partner/imager/src/devices/V4L2SensorViCsi.cpp, function checkDriverVersion(), line 379)
(NvOdmDevice) Error BadParameter:  (propagating from dvs/git/dirty/git-master_linux/camera-partner/imager/src/devices/V4L2SensorViCsi.cpp, function findCustomCids(), line 309)
(NvOdmDevice) Error BadParameter:  (propagating from dvs/git/dirty/git-master_linux/camera-partner/imager/src/devices/V4L2SensorViCsi.cpp, function initializeV4L2Items(), line 232)
(NvOdmDevice) Error BadParameter:  (propagating from dvs/git/dirty/git-master_linux/camera-partner/imager/src/devices/V4L2SensorViCsi.cpp, function initialize(), line 107)
NvPclDriverInitializeData: Unable to initialize driver v4l2_sensor
NvPclInitializeDrivers: error: Failed to init camera sub module v4l2_sensor
NvPclStartPlatformDrivers: Failed to start module drivers
NvPclCloseModuleDrivers: deallocate/free overrides pathname @ 0x7f94bc3e90
NvPclCloseModuleDrivers: deallocate/free overrides pathname @ 0x7f94bc3f20
NvPclCloseModuleDrivers: deallocate/free overrides pathname @ 0x7f94bc3fb0
NvPclCloseModuleDrivers: deallocate/free overrides pathname @ 0x7f94bc3ce0
NvPclCloseModuleDrivers: deallocate/free overrides pathname @ 0x7f94bc3d70
NvPclCloseModuleDrivers: deallocate/free overrides pathname @ 0x7f94bc3e00
NvPclStateControllerOpen: Failed ImagerGUID 0. (error 0x4)
NvPclStateControllerClose: Module tc358840_front_TC01 closed
NvPclOpen: PCL Open Failed. Error: 0xf
NvPclClose: ++++++++++++++++++++++
NvPclClose: ----------------------
NvPclOpen: ----------------------
SCF: Error BadParameter: Sensor could not be opened. (in src/services/capture/CaptureServiceDeviceSensor.cpp, function getSourceFromGuid(), line 596)
SCF: Error BadParameter:  (propagating from src/services/capture/CaptureService.cpp, function addSourceByGuid(), line 781)
SCF: Error BadParameter:  (propagating from src/api/CameraDriver.cpp, function addSourceByIndex(), line 276)
SCF: Error BadParameter:  (propagating from src/api/CameraDriver.cpp, function getSource(), line 439)

As the logs indicate,
checkDriverVersion: Mixed or missing V4L2 controls!
checkDriverVersion: Make sure your kernel driver implements either
checkDriverVersion: V4L2_m_cidFrameLength + V4L2_m_cidCoarseTime(_SHORT)
checkDriverVersion: or
checkDriverVersion: V4L2_m_cidFrameRate + V4L2_m_cidExposure

These ioctls are not yet implemented in our driver. I can try to fix them but would like to know whether nvcamerasrc can be use to stream data from yuv sensor?

I tried using v4l2-ctl but seeing PIX_SOF timeout errors.
Using gstlaunch and nvcamerasrc I can stream from TX2 camera module so using the same as reference for our hardware.

@asiluvery
Sorry to tell nvcamerasrc not support non-bayer output yet. You should stick with v4l2-ctl first.
Check below link to enable the trace to know more information.
https://elinux.org/Jetson_TX2/28.1_Camera_BringUp

Thanks for the clarification Shane.