From e141aa2d556c05ecb27e8072c69707173138e7bf Mon Sep 17 00:00:00 2001 From: Nova Date: Sun, 24 Jul 2022 21:15:27 -0400 Subject: [PATCH] d/wmr: Add initial support for original Odyssey HMD --- src/xrt/drivers/wmr/wmr_common.h | 4 +++- src/xrt/drivers/wmr/wmr_hmd.c | 3 +++ src/xrt/drivers/wmr/wmr_hmd.h | 2 ++ src/xrt/drivers/wmr/wmr_prober.c | 8 ++++++-- 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/src/xrt/drivers/wmr/wmr_common.h b/src/xrt/drivers/wmr/wmr_common.h index 8f2417450..45e51806b 100644 --- a/src/xrt/drivers/wmr/wmr_common.h +++ b/src/xrt/drivers/wmr/wmr_common.h @@ -6,6 +6,7 @@ * @brief Defines and constants related to WMR driver code. * @author Nis Madsen * @author Jakob Bornecrantz + * @author Nova King * @ingroup drv_wmr */ @@ -42,7 +43,8 @@ extern "C" { #define EXPLORER_PID 0xb801 #define SAMSUNG_VID 0x04e8 -#define ODYSSEY_PID 0x7312 +#define ODYSSEY_PID 0x7310 +#define ODYSSEY_PLUS_PID 0x7312 #define ODYSSEY_CONTROLLER_PID 0x065d #define QUANTA_VID 0x0408 /* Medion? */ diff --git a/src/xrt/drivers/wmr/wmr_hmd.c b/src/xrt/drivers/wmr/wmr_hmd.c index fec6a2809..6d6755019 100644 --- a/src/xrt/drivers/wmr/wmr_hmd.c +++ b/src/xrt/drivers/wmr/wmr_hmd.c @@ -9,6 +9,7 @@ * @author nima01 * @author Jakob Bornecrantz * @author Mateo de Mayo + * @author Nova King * @ingroup drv_wmr */ @@ -91,6 +92,8 @@ const struct wmr_headset_descriptor headset_map[] = { wmr_hmd_deactivate_reverb, wmr_hmd_screen_enable_reverb}, {WMR_HEADSET_REVERB_G2, "HP Reverb Virtual Reality Headset G2", "HP Reverb G2", wmr_hmd_activate_reverb, wmr_hmd_deactivate_reverb, wmr_hmd_screen_enable_reverb}, + {WMR_HEADSET_SAMSUNG_XE700X3AI, "Samsung Windows Mixed Reality XE700X3AI", "Samsung Odyssey", + wmr_hmd_activate_odyssey_plus, wmr_hmd_deactivate_odyssey_plus, wmr_hmd_screen_enable_odyssey_plus}, {WMR_HEADSET_SAMSUNG_800ZAA, "Samsung Windows Mixed Reality 800ZAA", "Samsung Odyssey+", 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}, diff --git a/src/xrt/drivers/wmr/wmr_hmd.h b/src/xrt/drivers/wmr/wmr_hmd.h index 7a883aa0a..90d2ac434 100644 --- a/src/xrt/drivers/wmr/wmr_hmd.h +++ b/src/xrt/drivers/wmr/wmr_hmd.h @@ -8,6 +8,7 @@ * @author Philipp Zabel * @author nima01 * @author Jakob Bornecrantz + * @author Nova King * @ingroup drv_wmr */ @@ -35,6 +36,7 @@ enum wmr_headset_type WMR_HEADSET_GENERIC, WMR_HEADSET_REVERB_G1, WMR_HEADSET_REVERB_G2, + WMR_HEADSET_SAMSUNG_XE700X3AI, WMR_HEADSET_SAMSUNG_800ZAA, WMR_HEADSET_LENOVO_EXPLORER, WMR_HEADSET_MEDION_ERAZER_X1000, diff --git a/src/xrt/drivers/wmr/wmr_prober.c b/src/xrt/drivers/wmr/wmr_prober.c index 9655e3fb5..e88691c9f 100644 --- a/src/xrt/drivers/wmr/wmr_prober.c +++ b/src/xrt/drivers/wmr/wmr_prober.c @@ -6,6 +6,7 @@ * @brief WMR prober code. * @author Nis Madsen * @author Jakob Bornecrantz + * @author Nova King * @ingroup drv_wmr */ @@ -74,11 +75,14 @@ check_and_get_interface(struct xrt_prober_device *device, enum wmr_headset_type return true; case SAMSUNG_VID: - if (device->product_id != ODYSSEY_PID) { + if (device->product_id != ODYSSEY_PID && device->product_id != ODYSSEY_PLUS_PID) { return false; } - *out_hmd_type = WMR_HEADSET_SAMSUNG_800ZAA; + if (device->product_id == ODYSSEY_PID) + *out_hmd_type = WMR_HEADSET_SAMSUNG_XE700X3AI; + else + *out_hmd_type = WMR_HEADSET_SAMSUNG_800ZAA; *out_interface = 0; return true;