Skip to content

Commit b088464

Browse files
committed
creating mipi device when getting d415_gmsl pid
1 parent c960e56 commit b088464

File tree

2 files changed

+13
-6
lines changed

2 files changed

+13
-6
lines changed

src/linux/backend-v4l2.cpp

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -868,9 +868,9 @@ namespace librealsense
868868
// GVD product ID
869869
const uint8_t GVD_PID_OFFSET = 4;
870870

871-
const uint8_t GVD_PID_D430_GMSL = 0x0F;
872-
const uint8_t GVD_PID_D415_GMSL = 0x00;
873871
const uint8_t GVD_PID_D457 = 0x12;
872+
const uint8_t GVD_PID_D430_GMSL = 0x0F;
873+
const uint8_t GVD_PID_D415_GMSL = 0x06;
874874

875875
// device PID
876876
uint16_t device_pid = 0;
@@ -915,15 +915,15 @@ namespace librealsense
915915
switch(product_pid)
916916
{
917917
case(GVD_PID_D457):
918-
device_pid = 0xABCD;
918+
device_pid = D457_PID;
919919
break;
920920

921921
case(GVD_PID_D430_GMSL):
922-
device_pid = 0xABCE;
922+
device_pid = D430_GMSL_PID;
923923
break;
924924

925925
case(GVD_PID_D415_GMSL):
926-
device_pid = 0xABCF;
926+
device_pid = D415_GMSL_PID;
927927
break;
928928

929929
default:
@@ -2993,7 +2993,9 @@ namespace librealsense
29932993

29942994
std::shared_ptr<uvc_device> v4l_backend::create_uvc_device(uvc_device_info info) const
29952995
{
2996-
bool mipi_device = (0xABCD == info.pid || 0xABCE == info.pid); // D457 development. Not for upstream
2996+
bool mipi_device = (D457_PID == info.pid ||
2997+
D430_GMSL_PID == info.pid ||
2998+
D415_GMSL_PID == info.pid);
29972999
auto v4l_uvc_dev = mipi_device ? std::make_shared<v4l_mipi_device>(info) :
29983000
((!info.has_metadata_node) ? std::make_shared<v4l_uvc_device>(info) :
29993001
std::make_shared<v4l_uvc_meta_device>(info));

src/linux/backend-v4l2.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -474,6 +474,11 @@ namespace librealsense
474474
std::vector<std::shared_ptr<buffer>> _md_buffers;
475475
};
476476

477+
478+
const uint16_t D457_PID = 0xABCD;
479+
const uint16_t D430_GMSL_PID = 0xABCE;
480+
const uint16_t D415_GMSL_PID = 0xABCF;
481+
477482
// D457 Development. To be merged into underlying class
478483
class v4l_mipi_device : public v4l_uvc_meta_device
479484
{

0 commit comments

Comments
 (0)