Skip to content

Commit

Permalink
support meta data on linux
Browse files Browse the repository at this point in the history
  • Loading branch information
gwen2018 committed May 2, 2024
1 parent a014fbf commit be13970
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 39 deletions.
30 changes: 11 additions & 19 deletions scripts/realsense-metadata-focal-hwe-5.15.patch
Original file line number Diff line number Diff line change
@@ -1,22 +1,8 @@
From 152daea37c2e6e3be4f2ae9d70441e2d381a0705 Mon Sep 17 00:00:00 2001
From: Dmitry Perchanov <[email protected]>
Date: Sun, 22 Jan 2023 13:46:16 +0200
Subject: [PATCH] Enabling UVC Metadata attributes with Ubuntu 20.04. Kernel
5.15

Co-developed-by: Yu MENG <[email protected]>
Co-developed-by: Evgeni Raikhel <[email protected]>
Signed-off-by: Dmitry Perchanov <[email protected]>
---
drivers/media/usb/uvc/uvc_driver.c | 279 +++++++++++++++++++++++++++++
drivers/media/usb/uvc/uvcvideo.h | 2 +-
2 files changed, 280 insertions(+), 1 deletion(-)

diff --git a/drivers/media/usb/uvc/uvc_driver.c b/drivers/media/usb/uvc/uvc_driver.c
index 72fff7264..4d46d06f7 100644
index 9a791d8ef..7af99def2 100644
--- a/drivers/media/usb/uvc/uvc_driver.c
+++ b/drivers/media/usb/uvc/uvc_driver.c
@@ -3164,6 +3164,285 @@ static const struct usb_device_id uvc_ids[] = {
@@ -3164,6 +3164,294 @@ static const struct usb_device_id uvc_ids[] = {
.bInterfaceSubClass = 1,
.bInterfaceProtocol = 0,
.driver_info = UVC_INFO_META(V4L2_META_FMT_D4XX) },
Expand Down Expand Up @@ -298,6 +284,15 @@ index 72fff7264..4d46d06f7 100644
+ .bInterfaceClass = USB_CLASS_VIDEO,
+ .bInterfaceSubClass = 1,
+ .bInterfaceProtocol = UVC_PC_PROTOCOL_15,
+ .driver_info = UVC_INFO_META(V4L2_META_FMT_D4XX) },
+ /* Intel D438 depth camera */
+ { .match_flags = USB_DEVICE_ID_MATCH_DEVICE
+ | USB_DEVICE_ID_MATCH_INT_INFO,
+ .idVendor = 0x8086,
+ .idProduct = 0x0b4f,
+ .bInterfaceClass = USB_CLASS_VIDEO,
+ .bInterfaceSubClass = 1,
+ .bInterfaceProtocol = 0,
+ .driver_info = UVC_INFO_META(V4L2_META_FMT_D4XX) },
/* Generic USB Video Class */
{ USB_INTERFACE_INFO(USB_CLASS_VIDEO, 1, UVC_PC_PROTOCOL_UNDEFINED) },
Expand All @@ -315,6 +310,3 @@ index c3ea6a538..99f9041f8 100644

#define UVC_CTRL_CONTROL_TIMEOUT 5000
#define UVC_CTRL_STREAMING_TIMEOUT 5000
--
2.34.1

20 changes: 20 additions & 0 deletions scripts/realsense-metadata-jammy-hwe-6.5.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
diff --git a/drivers/media/usb/uvc/uvc_driver.c b/drivers/media/usb/uvc/uvc_driver.c
index 08fcd2ffa..86881a0ec 100644
--- a/drivers/media/usb/uvc/uvc_driver.c
+++ b/drivers/media/usb/uvc/uvc_driver.c
@@ -3102,6 +3102,15 @@ static const struct usb_device_id uvc_ids[] = {
.bInterfaceSubClass = 1,
.bInterfaceProtocol = 0,
.driver_info = UVC_INFO_META(V4L2_META_FMT_D4XX) },
+ /* Intel D438 depth camera */
+ { .match_flags = USB_DEVICE_ID_MATCH_DEVICE
+ | USB_DEVICE_ID_MATCH_INT_INFO,
+ .idVendor = 0x8086,
+ .idProduct = 0x0b4f,
+ .bInterfaceClass = USB_CLASS_VIDEO,
+ .bInterfaceSubClass = 1,
+ .bInterfaceProtocol = 0,
+ .driver_info = UVC_INFO_META(V4L2_META_FMT_D4XX) },
/* Generic USB Video Class */
{ USB_INTERFACE_INFO(USB_CLASS_VIDEO, 1, UVC_PC_PROTOCOL_UNDEFINED) },
{ USB_INTERFACE_INFO(USB_CLASS_VIDEO, 1, UVC_PC_PROTOCOL_15) },
32 changes: 12 additions & 20 deletions scripts/realsense-metadata-jammy-master.patch
Original file line number Diff line number Diff line change
@@ -1,22 +1,8 @@
From 68ebc4e3fb3729f2b6804ea4d72d5dfda356512f Mon Sep 17 00:00:00 2001
From: Dmitry Perchanov <[email protected]>
Date: Sun, 22 Jan 2023 12:58:19 +0200
Subject: [PATCH] Enabling UVC Metadata attributes with Ubuntu 22.04. Kernel
5.15

Co-developed-by: Yu MENG <[email protected]>
Co-developed-by: Evgeni Raikhel <[email protected]>
Signed-off-by: Dmitry Perchanov <[email protected]>
---
drivers/media/usb/uvc/uvc_driver.c | 279 +++++++++++++++++++++++++++++
drivers/media/usb/uvc/uvcvideo.h | 2 +-
2 files changed, 280 insertions(+), 1 deletion(-)

diff --git a/drivers/media/usb/uvc/uvc_driver.c b/drivers/media/usb/uvc/uvc_driver.c
index 2e7df1de0..848417912 100644
index 9a791d8ef..7af99def2 100644
--- a/drivers/media/usb/uvc/uvc_driver.c
+++ b/drivers/media/usb/uvc/uvc_driver.c
@@ -3152,6 +3152,285 @@ static const struct usb_device_id uvc_ids[] = {
@@ -3164,6 +3164,294 @@ static const struct usb_device_id uvc_ids[] = {
.bInterfaceSubClass = 1,
.bInterfaceProtocol = 0,
.driver_info = UVC_INFO_META(V4L2_META_FMT_D4XX) },
Expand Down Expand Up @@ -298,12 +284,21 @@ index 2e7df1de0..848417912 100644
+ .bInterfaceClass = USB_CLASS_VIDEO,
+ .bInterfaceSubClass = 1,
+ .bInterfaceProtocol = UVC_PC_PROTOCOL_15,
+ .driver_info = UVC_INFO_META(V4L2_META_FMT_D4XX) },
+ /* Intel D438 depth camera */
+ { .match_flags = USB_DEVICE_ID_MATCH_DEVICE
+ | USB_DEVICE_ID_MATCH_INT_INFO,
+ .idVendor = 0x8086,
+ .idProduct = 0x0b4f,
+ .bInterfaceClass = USB_CLASS_VIDEO,
+ .bInterfaceSubClass = 1,
+ .bInterfaceProtocol = 0,
+ .driver_info = UVC_INFO_META(V4L2_META_FMT_D4XX) },
/* Generic USB Video Class */
{ USB_INTERFACE_INFO(USB_CLASS_VIDEO, 1, UVC_PC_PROTOCOL_UNDEFINED) },
{ USB_INTERFACE_INFO(USB_CLASS_VIDEO, 1, UVC_PC_PROTOCOL_15) },
diff --git a/drivers/media/usb/uvc/uvcvideo.h b/drivers/media/usb/uvc/uvcvideo.h
index 1aa2cc985..2772a4640 100644
index c3ea6a538..99f9041f8 100644
--- a/drivers/media/usb/uvc/uvcvideo.h
+++ b/drivers/media/usb/uvc/uvcvideo.h
@@ -187,7 +187,7 @@
Expand All @@ -315,6 +310,3 @@ index 1aa2cc985..2772a4640 100644

#define UVC_CTRL_CONTROL_TIMEOUT 5000
#define UVC_CTRL_STREAMING_TIMEOUT 5000
--
2.34.1

0 comments on commit be13970

Please sign in to comment.