V4l device id match with argus camera devices

Hello,
I am looking for a way to match a video device number (/dev/video0, /dev/video1, etc) and camera devices returned by getCameraDevices() in Argus API.
What I can get from Argus API:

  • Module string
  • Model name
  • Module placement
  • Module UUID

However, I couldn’t find a way to match any of this numbers with a v4l device. Could you please help me with that.

There’s no any API to know the video node.
Maybe you can modify the sensor driver to register a fixed video node for your case.

I would have already done that if I had driver sources but unfortunately I don’t

We have public the kernel source for customized.

Thanks

I mean, cameras have been provided by our supplier and they don’t want to provide us with source code. Yep, I have kernel sources but I don’t see any ways how it might help me.

The video node generate by below function. You can assign number instead of -1 for auto select from available.

../kernel/nvidia-oot/drivers/media/platform/tegra/camera/vi/graph.c:   
ret = video_register_device(chan->video, VFL_TYPE_VIDEO, -1);

But how can I match this with argus camera id?

The argus camera ID should be follow the module order in tegra-camera-platform{}

Yep, after a few experiments I can confirm that, however there is one tricky thing which was not so obvious for me.
Argus module ID is actually not a module order in tegra-camera-platform{} dts section, it is a module order in /sys/firmware/devicetree/base/tegra-camera-platform/modules/. For example my ls -la output looks like that:

nvidia@tegra-ubuntu:~$ ll /sys/firmware/devicetree/base/tegra-camera-platform/modules/
total 0
drwxr-xr-x 16 root root 0 May 19 07:14 ./
drwxr-xr-x  3 root root 0 May 19 07:14 ../
drwxr-xr-x  4 root root 0 May 19 07:14 module0/
drwxr-xr-x  4 root root 0 May 19 07:14 module1/
drwxr-xr-x  3 root root 0 May 19 07:14 module10/
drwxr-xr-x  3 root root 0 May 19 07:14 module11/
drwxr-xr-x  3 root root 0 May 19 07:14 module12/
drwxr-xr-x  3 root root 0 May 19 07:14 module13/
drwxr-xr-x  4 root root 0 May 19 07:14 module2/
drwxr-xr-x  4 root root 0 May 19 07:14 module3/
drwxr-xr-x  4 root root 0 May 19 07:14 module4/
drwxr-xr-x  4 root root 0 May 19 07:14 module5/
drwxr-xr-x  3 root root 0 May 19 07:14 module6/
drwxr-xr-x  3 root root 0 May 19 07:14 module7/
drwxr-xr-x  3 root root 0 May 19 07:14 module8/
drwxr-xr-x  3 root root 0 May 19 07:14 module9/
-r--r--r--  1 root root 8 May 19 08:26 name

What actually means that module0 has Argus ID 0, module1 has Argus ID 1, module10 has Argus ID 2 and so on.
Anyway, thank you for your help!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.