Currently, I get the “badge” information under “/sys/firmware/devicetree/base/tegra-camera-platform/modules/”. For example, if I want to get the “badge” information for port 1, I will check “/sys/firmware/devicetree/base/tegra-camera-platform/modules/module0/badge”.
My questions are:
Is this path the same across all Jetson platforms, such as Orin, NX and etc.?
How potable is this path? Let’s say, you change the Linux kernel, will this path change?
Is there a better way to get the camera device based on the port which it connects to? I see examples using the index. Is the index corresponding to the port number? For example, for port [1, 6], the port 1 has the index 0 and the port 2 has the index 1?
may I know what’s the actual use-case?
please check developer guide, Module Properties as see-also.
there’s position property which is used to identifying the camera position in the system.
I am trying to get the camera device corresponding to the port number. Currently, I use the port number to get the badge string. Then I go over all camera devices which I got from the camera provider and compare the badge from the camera property. If they match, then I get the correct camera device.
For example, if I want to get the camera device which connects to port 1, the first port. Then I go to the path and find the badge file content under “module0” directory. From the camera provider, I get all camera devices and compare the badge from the camera property from each camera device with the badge file content which I find in that path. If they match, then I find the correct camera device.
From your answer of the 3rd question, do you mean I can use " getSensorPlacement()" function of the ICameraProperties? If I want to get the camera device connected to port 1, will this function return “1”?
so… you’re looking for an approach to maps the camera connections to your SW nodes.
normally, there’s also camera node definition rules it related to CSI port.
as you can see… it’s dual-cam definition with two IMX274, which using CSI-A (imx274_a) and CSI-C (imx274_c).
in the middle of badge property, it contains the position property naming…
for instance,
furthermore, getSensorPlacement() API it checks and return position property.
for example,
in a three-camera system: bottom , top , and center. camera sensor placement will shows 0, 1, 2 as a result.
So “position” cannot be used to identify a camera device. Then what can I use to identify a camera device?
Or is there a better way to identify the camera device other than parsing the badge?
Let’s say, I have two cameras. One is connected to CSI port 0 and the other is connected to CSI port 7. After I get the camera device vector from the camera provider, how can I identify which camera device is corresponding to which CSI port?