From 255b62e892f91fcb756bcb0ed83c9d3e3dcdf71a Mon Sep 17 00:00:00 2001 From: Michael Graham Date: Thu, 9 Nov 2023 17:18:36 -0600 Subject: [PATCH] d/wmr: Add Dell Visor support to WMR driver --- src/xrt/drivers/wmr/wmr_common.h | 4 ++++ src/xrt/drivers/wmr/wmr_hmd.c | 1 + src/xrt/drivers/wmr/wmr_prober.c | 8 ++++++++ 3 files changed, 13 insertions(+) diff --git a/src/xrt/drivers/wmr/wmr_common.h b/src/xrt/drivers/wmr/wmr_common.h index b01e73671..4586cb844 100644 --- a/src/xrt/drivers/wmr/wmr_common.h +++ b/src/xrt/drivers/wmr/wmr_common.h @@ -35,6 +35,7 @@ enum wmr_headset_type WMR_HEADSET_SAMSUNG_800ZAA, WMR_HEADSET_LENOVO_EXPLORER, WMR_HEADSET_MEDION_ERAZER_X1000, + WMR_HEADSET_DELL_VISOR, }; /*! @@ -62,6 +63,9 @@ enum wmr_headset_type #define LENOVO_VID 0x17ef #define EXPLORER_PID 0xb801 +#define DELL_VID 0x413c +#define VISOR_PID 0xb0d5 + #define SAMSUNG_VID 0x04e8 #define ODYSSEY_PID 0x7310 #define ODYSSEY_PLUS_PID 0x7312 diff --git a/src/xrt/drivers/wmr/wmr_hmd.c b/src/xrt/drivers/wmr/wmr_hmd.c index d88228a58..a9d37d3da 100644 --- a/src/xrt/drivers/wmr/wmr_hmd.c +++ b/src/xrt/drivers/wmr/wmr_hmd.c @@ -115,6 +115,7 @@ const struct wmr_headset_descriptor headset_map[] = { wmr_hmd_activate_odyssey_plus, wmr_hmd_deactivate_odyssey_plus, wmr_hmd_screen_enable_odyssey_plus}, {WMR_HEADSET_LENOVO_EXPLORER, "Lenovo VR-2511N", "Lenovo Explorer", NULL, NULL, NULL}, {WMR_HEADSET_MEDION_ERAZER_X1000, "Medion Erazer X1000", "Medion Erazer", NULL, NULL, NULL}, + {WMR_HEADSET_DELL_VISOR, "DELL VR118", "Dell Visor", NULL, NULL, NULL}, }; const int headset_map_n = sizeof(headset_map) / sizeof(headset_map[0]); diff --git a/src/xrt/drivers/wmr/wmr_prober.c b/src/xrt/drivers/wmr/wmr_prober.c index 45cb16536..6adc89d2f 100644 --- a/src/xrt/drivers/wmr/wmr_prober.c +++ b/src/xrt/drivers/wmr/wmr_prober.c @@ -117,6 +117,14 @@ check_and_get_interface(struct xrt_prober_device *device, default: U_LOG_IFL_T(log_level, "No matching PID!"); return false; } + case DELL_VID: + U_LOG_IFL_T(log_level, "DELL_VID"); + + switch (device->product_id) { + case VISOR_PID: *out_hmd_type = WMR_HEADSET_DELL_VISOR; return true; + default: U_LOG_IFL_T(log_level, "No matching PID!"); return false; + } + default: return false; } }