Some problems when using the gstreamer plugin nvcamerasrc


system info : tx1 kernel version 3.10.96.
I use six cameras handling on the i2c switch pca9548. I can get the six node in /dev ,which are /dev/video0~5.
Then I run the following command:

gst-launch-1.0 nvcamerasrc sensor-id=0 ! 'video/x-raw(memory:NVMM),width=1920, height=1080, framerate=30/1, format=NV12' ! nvoverlaysink -ev

I can get the preview correctly. but when I change the sensor-id to 1,2,3,4 and 5. I get some error.
In the kernel source kernel_source/drivers/i2c/muxes/i2c-mux-pca954x.c, I add printk in the function :

pca954x_select_chan(struct i2c_adapter *adap, void *client ,u32 chan)
 {printk(KERN_ERR "the chan value :%d",chan);}

Then I find everytime I use gst-launch-1.0 command ,whatever sensor-id I set to, the chan value is always 0.
I also try v4l2-ctl:

v4l2-ctl -d /dev/video0 --set-fmt-video=width=1920,height=1080,pixelformat=RG10 --stream-mmap --stream-count=1 --stream-to=imx219.raw

when I set the -d to /dev/video0~5, the chan value from printk changes :

/dev/video#		              chan value
   /dev/video0		              	   0
   /dev/video1 			           1
   /dev/video2 		      	           2
   /dev/video3 			           3
   /dev/video4 			           4
   /dev/video5 			           5

Using v4l2-ctl I can get the bayer image from six camera correctly.Maybe it’s not the matter of my dtb and driver source.
So I wonder if it’s the problem of nvcamerasrc .Does NVIDIA engineer have clues to that?
I wanna know which function in the tx1 kernel source code the command “nvcamerasrc sensor-id=x” will call firstly and pass the value of sensor-id to the kernel code .I just need pass the value of sensor-id to the chan. Could NVIDIA engineer help me with it ?

Follow below link
To enable logs from user-space for more details

hello BradleyY,

please also check the ‘position’ property in your sensor devices tree.
device registered the video nodes from bottom to top, you could also check our reference multiple-camera sensor drivers.


Thanks for your reply.
I find an error on my dts file .my devname in the module node should be imx219 30-0010. After modifing it. my problem is solved.