Skip to content

Commit

Permalink
Enable Multile D457 Support
Browse files Browse the repository at this point in the history
  • Loading branch information
hsuys committed Nov 3, 2022
1 parent 06fe68c commit 086ab62
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/linux/backend-v4l2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -761,11 +761,12 @@ 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;
if (ind == first_video_index || ind == first_video_index + 2 || ind == first_video_index + 4)
ind = (ind - first_video_index) % 6; // yhsu - offset from first mipi video node and assume 6 nodes per mipi camera
if (ind == 0 || ind == 2 || ind == 4)
mi = 0;
else if (ind == first_video_index + 1 | ind == first_video_index + 3)
else if (ind == 1 | ind == 3)
mi = 3;
else if (ind == first_video_index + 5)
else if (ind == 5)
mi = 4;
else
{
Expand All @@ -785,6 +786,7 @@ namespace librealsense
// 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 = busnum + "-" + devpath + "-" + devnum;
info.unique_id = bus_info + "-" + std::to_string(ind/6); // yhsu - use bus info and first video node of each mipi camera
info.conn_spec = usb_specification;
info.uvc_capabilities = get_dev_capabilities(dev_name);

Expand Down

0 comments on commit 086ab62

Please sign in to comment.