Skip to content

Commit cf17d20

Browse files
committed
adding d401_gmsl device is SDK and linux backend
1 parent 827d8b4 commit cf17d20

File tree

4 files changed

+41
-0
lines changed

4 files changed

+41
-0
lines changed

src/ds/d400/d400-factory.cpp

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,32 @@ namespace librealsense
7878
};
7979
};
8080

81+
class rs401_gmsl_device : public d400_nonmonochrome,
82+
public d400_mipi_device,
83+
public firmware_logger_device
84+
{
85+
public:
86+
rs401_gmsl_device( std::shared_ptr< const d400_info > const & dev_info, bool register_device_notifications )
87+
: device( dev_info, register_device_notifications )
88+
, backend_device( dev_info, register_device_notifications )
89+
, d400_device( dev_info )
90+
, d400_nonmonochrome( dev_info )
91+
, d400_mipi_device()
92+
, firmware_logger_device( dev_info, d400_device::_hw_monitor, get_firmware_logs_command(), get_flash_logs_command() )
93+
{
94+
}
95+
96+
std::shared_ptr<matcher> create_matcher(const frame_holder& frame) const override;
97+
98+
std::vector<tagged_profile> get_profiles_tags() const override
99+
{
100+
std::vector<tagged_profile> tags;
101+
102+
tags.push_back({ RS2_STREAM_DEPTH, -1, 640, 480, RS2_FORMAT_Z16, 30, profile_tag::PROFILE_TAG_SUPERSET | profile_tag::PROFILE_TAG_DEFAULT });
103+
return tags;
104+
};
105+
};
106+
81107
// Not used, should be removed with EOL devices clean up
82108
class rs405u_device : public ds5u_device,
83109
public ds_advanced_mode_base,
@@ -1096,6 +1122,8 @@ namespace librealsense
10961122
return std::make_shared< rs430_gmsl_device >( dev_info, register_device_notifications );
10971123
case RS415_GMSL_PID:
10981124
return std::make_shared< rs415_gmsl_device >(dev_info, register_device_notifications);
1125+
case RS401_GMSL_PID:
1126+
return std::make_shared< rs401_gmsl_device >( dev_info, register_device_notifications );
10991127
default:
11001128
throw std::runtime_error( rsutils::string::from() << "Unsupported RS400 model! 0x" << std::hex
11011129
<< std::setw( 4 ) << std::setfill( '0' ) << (int)pid );
@@ -1168,6 +1196,12 @@ namespace librealsense
11681196
return matcher_factory::create(RS2_MATCHER_DEFAULT, streams);
11691197
}
11701198

1199+
std::shared_ptr<matcher> rs401_gmsl_device::create_matcher(const frame_holder& frame) const
1200+
{
1201+
std::vector<stream_interface*> streams = { _depth_stream.get() , _left_ir_stream.get() , _right_ir_stream.get() };
1202+
return matcher_factory::create(RS2_MATCHER_DEFAULT, streams);
1203+
}
1204+
11711205
std::shared_ptr<matcher> rs405u_device::create_matcher(const frame_holder& frame) const
11721206
{
11731207
std::vector<stream_interface*> streams = { _depth_stream.get() , _left_ir_stream.get() , _right_ir_stream.get()};

src/ds/d400/d400-private.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ namespace librealsense
4242
const uint16_t RS400_MIPI_RECOVERY_PID = 0xbbcd; // D4XX MIPI DFU Recovery
4343
const uint16_t RS430_GMSL_PID = 0xabce; // D430 GMSL
4444
const uint16_t RS415_GMSL_PID = 0xabcf; // D415 GMSL
45+
const uint16_t RS401_GMSL_PID = 0xabcc; // D401 GMSL
4546

4647
// d400 Devices supported by the current version
4748
static const std::set<std::uint16_t> rs400_sku_pid = {

src/linux/backend-v4l2.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -944,6 +944,7 @@ namespace librealsense
944944
const uint8_t GVD_PID_OFFSET = 4;
945945

946946
const uint8_t GVD_PID_D457 = 0x12;
947+
const uint8_t GVD_PID_D401_GMSL = 0x13;
947948
const uint8_t GVD_PID_D430_GMSL = 0x0F;
948949
const uint8_t GVD_PID_D415_GMSL = 0x06;
949950

@@ -1001,6 +1002,10 @@ namespace librealsense
10011002
device_pid = D415_GMSL_PID;
10021003
break;
10031004

1005+
case(GVD_PID_D401_GMSL):
1006+
device_pid = D401_GMSL_PID;
1007+
break;
1008+
10041009
default:
10051010
LOG_WARNING("Unidentified MIPI device product id: 0x" << std::hex << (int) product_pid << "remaining retries = " << retries);
10061011
device_pid = 0x0000;

src/linux/backend-v4l2.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -500,6 +500,7 @@ namespace librealsense
500500
const uint16_t D457_PID = 0xABCD;
501501
const uint16_t D430_GMSL_PID = 0xABCE;
502502
const uint16_t D415_GMSL_PID = 0xABCF;
503+
const uint16_t D401_GMSL_PID = 0xABCC;
503504

504505
// D457 Development. To be merged into underlying class
505506
class v4l_mipi_device : public v4l_uvc_meta_device

0 commit comments

Comments
 (0)