From 097cc3997ee08d50441cd3436dca26a529467eb5 Mon Sep 17 00:00:00 2001 From: Dmitry Perchanov Date: Wed, 1 Feb 2023 17:09:48 +0200 Subject: [PATCH] D457 MIPI enable multiple cameras for single DES. Following DSO-18585 PR #11070 For use with jp5-2d457-1-des Signed-off-by: Dmitry Perchanov --- src/linux/backend-v4l2.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/linux/backend-v4l2.cpp b/src/linux/backend-v4l2.cpp index 779ff2ef95..96aa65cb21 100644 --- a/src/linux/backend-v4l2.cpp +++ b/src/linux/backend-v4l2.cpp @@ -762,6 +762,7 @@ namespace librealsense // next several lines permit to use D457 even if a usb device has already "taken" the video0,1,2 (for example) // further development is needed to permit use of several mipi devices static int first_video_index = ind; + int cam_id = ind / 6; ind = (ind - first_video_index) % 6; // offset from first mipi video node and assume 6 nodes per mipi camera if (ind == 0 || ind == 2 || ind == 4) mi = 0; @@ -786,7 +787,7 @@ namespace librealsense // are not available via mipi // TODO - find a way to assign unique id for mipi // maybe using bus_info and card params (see above in this method) - info.unique_id = bus_info; // use bus_info as per camera unique id for mipi + info.unique_id = bus_info + "-" + std::to_string(cam_id); // use bus_info as per camera unique id for mipi info.conn_spec = usb_specification; info.uvc_capabilities = get_dev_capabilities(dev_name);