Skip to content

Commit

Permalink
PR IntelRealSense#12120 from dmipx: scripts: patches: metadata: appen…
Browse files Browse the repository at this point in the history
…d D555e SKU
  • Loading branch information
Nir-Az authored Aug 28, 2023
2 parents 231b40a + bc11813 commit 5fa263f
Show file tree
Hide file tree
Showing 7 changed files with 106 additions and 42 deletions.
11 changes: 10 additions & 1 deletion config/99-realsense-libusb.rules
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,13 @@ SUBSYSTEMS=="usb", ATTRS{idVendor}=="8086", ATTRS{idProduct}=="0b49", MODE:="066
SUBSYSTEMS=="usb", ATTRS{idVendor}=="8086", ATTRS{idProduct}=="0b4b", MODE:="0666", GROUP:="plugdev"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="8086", ATTRS{idProduct}=="0b4d", MODE:="0666", GROUP:="plugdev"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="8086", ATTRS{idProduct}=="0b52", MODE:="0666", GROUP:="plugdev"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="8086", ATTRS{idProduct}=="0b56", MODE:="0666", GROUP:="plugdev"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="8086", ATTRS{idProduct}=="0b5b", MODE:="0666", GROUP:="plugdev"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="8086", ATTRS{idProduct}=="0b5c", MODE:="0666", GROUP:="plugdev"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="8086", ATTRS{idProduct}=="0b64", MODE:="0666", GROUP:="plugdev"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="8086", ATTRS{idProduct}=="0b68", MODE:="0666", GROUP:="plugdev"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="8086", ATTRS{idProduct}=="0b6a", MODE:="0666", GROUP:="plugdev"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="8086", ATTRS{idProduct}=="0b6b", MODE:="0666", GROUP:="plugdev"

# Intel RealSense recovery devices (DFU)
SUBSYSTEMS=="usb", ATTRS{idVendor}=="8086", ATTRS{idProduct}=="0ab3", MODE:="0666", GROUP:="plugdev"
Expand Down Expand Up @@ -68,6 +71,8 @@ KERNEL=="iio*", ATTRS{idVendor}=="8086", ATTRS{idProduct}=="0b4b", MODE:="0777",
DRIVER=="hid_sensor*", ATTRS{idVendor}=="8086", ATTRS{idProduct}=="0b4b", RUN+="/bin/sh -c ' chmod -R 0777 /sys/%p && chmod 0777 /dev/%k'"
KERNEL=="iio*", ATTRS{idVendor}=="8086", ATTRS{idProduct}=="0b4d", MODE:="0777", GROUP:="plugdev", RUN+="/bin/sh -c 'chmod -R 0777 /sys/%p'"
DRIVER=="hid_sensor*", ATTRS{idVendor}=="8086", ATTRS{idProduct}=="0b4d", RUN+="/bin/sh -c ' chmod -R 0777 /sys/%p && chmod 0777 /dev/%k'"
KERNEL=="iio*", ATTRS{idVendor}=="8086", ATTRS{idProduct}=="0b56", MODE:="0777", GROUP:="plugdev", RUN+="/bin/sh -c 'chmod -R 0777 /sys/%p'"
DRIVER=="hid_sensor*", ATTRS{idVendor}=="8086", ATTRS{idProduct}=="0b56", RUN+="/bin/sh -c ' chmod -R 0777 /sys/%p && chmod 0777 /dev/%k'"
KERNEL=="iio*", ATTRS{idVendor}=="8086", ATTRS{idProduct}=="0b5b", MODE:="0777", GROUP:="plugdev", RUN+="/bin/sh -c 'chmod -R 0777 /sys/%p'"
DRIVER=="hid_sensor*", ATTRS{idVendor}=="8086", ATTRS{idProduct}=="0b5b", RUN+="/bin/sh -c ' chmod -R 0777 /sys/%p && chmod 0777 /dev/%k'"
KERNEL=="iio*", ATTRS{idVendor}=="8086", ATTRS{idProduct}=="0b5c", MODE:="0777", GROUP:="plugdev", RUN+="/bin/sh -c 'chmod -R 0777 /sys/%p'"
Expand All @@ -76,6 +81,10 @@ KERNEL=="iio*", ATTRS{idVendor}=="8086", ATTRS{idProduct}=="0b64", MODE:="0777",
DRIVER=="hid_sensor*", ATTRS{idVendor}=="8086", ATTRS{idProduct}=="0b64", RUN+="/bin/sh -c ' chmod -R 0777 /sys/%p && chmod 0777 /dev/%k'"
KERNEL=="iio*", ATTRS{idVendor}=="8086", ATTRS{idProduct}=="0b68", MODE:="0777", GROUP:="plugdev", RUN+="/bin/sh -c 'chmod -R 0777 /sys/%p'"
DRIVER=="hid_sensor*", ATTRS{idVendor}=="8086", ATTRS{idProduct}=="0b68", RUN+="/bin/sh -c ' chmod -R 0777 /sys/%p && chmod 0777 /dev/%k'"
KERNEL=="iio*", ATTRS{idVendor}=="8086", ATTRS{idProduct}=="0b6a", MODE:="0777", GROUP:="plugdev", RUN+="/bin/sh -c 'chmod -R 0777 /sys/%p'"
DRIVER=="hid_sensor*", ATTRS{idVendor}=="8086", ATTRS{idProduct}=="0b6a", RUN+="/bin/sh -c ' chmod -R 0777 /sys/%p && chmod 0777 /dev/%k'"
KERNEL=="iio*", ATTRS{idVendor}=="8086", ATTRS{idProduct}=="0b6b", MODE:="0777", GROUP:="plugdev", RUN+="/bin/sh -c 'chmod -R 0777 /sys/%p'"
DRIVER=="hid_sensor*", ATTRS{idVendor}=="8086", ATTRS{idProduct}=="0b6b", RUN+="/bin/sh -c ' chmod -R 0777 /sys/%p && chmod 0777 /dev/%k'"

# For products with motion_module, if (kernels is 4.15 and up) and (device name is "accel_3d") wait, in another process, until (enable flag is set to 1 or 200 mSec passed) and then set it to 0.
KERNEL=="iio*", ATTRS{idVendor}=="8086", ATTRS{idProduct}=="0ad5|0afe|0aff|0b00|0b01|0b3a|0b3d|0b64|0b68", RUN+="/bin/sh -c '(major=`uname -r | cut -d \".\" -f1` && minor=`uname -r | cut -d \".\" -f2` && (([ $major -eq 4 ] && [ $minor -ge 15 ]) || [ $major -ge 5 ])) && (enamefile=/sys/%p/name && [ `cat $enamefile` = \"accel_3d\" ]) && enfile=/sys/%p/buffer/enable && echo \"COUNTER=0; while [ \$COUNTER -lt 20 ] && grep -q 0 $enfile; do sleep 0.01; COUNTER=\$((COUNTER+1)); done && echo 0 > $enfile\" | at now'"
KERNEL=="iio*", ATTRS{idVendor}=="8086", ATTRS{idProduct}=="0ad5|0afe|0aff|0b00|0b01|0b3a|0b3d|0b56|0b5c|0b64|0b68|0b6a|0b6b", RUN+="/bin/sh -c '(major=`uname -r | cut -d \".\" -f1` && minor=`uname -r | cut -d \".\" -f2` && (([ $major -eq 4 ] && [ $minor -ge 15 ]) || [ $major -ge 5 ])) && (enamefile=/sys/%p/name && [ `cat $enamefile` = \"accel_3d\" ]) && enfile=/sys/%p/buffer/enable && echo \"COUNTER=0; while [ \$COUNTER -lt 20 ] && grep -q 0 $enfile; do sleep 0.01; COUNTER=\$((COUNTER+1)); done && echo 0 > $enfile\" | at now'"
26 changes: 18 additions & 8 deletions scripts/patch-realsense-ubuntu-lts-hwe.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ retpoline_retrofit=0
skip_hid_patch=0
apply_hid_gyro_patch=0
skip_plf_patch=0
build_only=0

#Parse input
while test $# -gt 0; do
case "$1" in
Expand Down Expand Up @@ -47,6 +49,10 @@ while test $# -gt 0; do
rebuild_ko=1; shift ;;
uvc_dbg)
debug_uvc=1; shift ;;
ubuntu)
shift; ubuntu_codename=$1; build_only=1; shift;;
kernel)
shift; LINUX_BRANCH=$1; build_only=1; shift;;
*)
echo -e "\e[36mUnrecognized flag: $1\e[0m"; shift;;
esac
Expand All @@ -61,16 +67,16 @@ fi

#Include usability functions
source ./scripts/patch-utils-hwe.sh
LINUX_BRANCH=${LINUX_BRANCH:-$(uname -r)}

# Get the required tools and headers to build the kernel
sudo apt-get install linux-headers-generic build-essential git bc -y
sudo apt-get install linux-headers-generic linux-headers-$LINUX_BRANCH build-essential git bc -y
#Packages to build the patched modules
require_package libusb-1.0-0-dev
require_package libssl-dev

#sudo apt-get build-dep linux-image-unsigned-$(uname -r)

LINUX_BRANCH=$(uname -r)
#Get kernel major.minor
IFS='.' read -a kernel_version <<< ${LINUX_BRANCH}
k_maj_min=$((${kernel_version[0]}*100 + ${kernel_version[1]}))
Expand All @@ -89,7 +95,7 @@ k_tick=$(echo ${kernel_version[2]} | awk -F'-' '{print $2}')

# Construct branch name from distribution codename {xenial,bionic,..} and kernel version
# ubuntu_codename=`. /etc/os-release; echo ${UBUNTU_CODENAME/*, /}`
ubuntu_codename=$(lsb_release -c|cut -f2)
ubuntu_codename=${ubuntu_codename:-$(lsb_release -c|cut -f2)}
if [ -z "${ubuntu_codename}" ];
then
# Trusty Tahr shall use xenial code base
Expand Down Expand Up @@ -216,8 +222,8 @@ then
fi

#Copy configuration
cp /usr/src/linux-headers-$(uname -r)/.config .
cp /usr/src/linux-headers-$(uname -r)/Module.symvers .
cp /usr/src/linux-headers-$LINUX_BRANCH/.config .
cp /usr/src/linux-headers-$LINUX_BRANCH/Module.symvers .

# Basic build for kernel modules
echo -e "\e[32mPrepare kernel modules configuration\e[0m"
Expand Down Expand Up @@ -245,8 +251,10 @@ then
if [[ ( $xhci_patch -eq 1 ) && ( $build_usbcore_modules -eq 0 ) ]]; then
make -j$(($(nproc)-1))
make modules -j$(($(nproc)-1))
sudo make modules_install -j$(($(nproc)-1))
sudo make install
if [ "$build_only" -eq 0 ]; then
sudo make modules_install -j$(($(nproc)-1))
sudo make install
fi
echo -e "\e[92m\n\e[1m`sudo make kernelrelease` Kernel has been successfully installed."
echo -e "\e[92m\n\e[1mScript has completed. Please reboot and load the newly installed Kernel from GRUB list.\n\e[0m"
exit 0
Expand Down Expand Up @@ -300,7 +308,9 @@ if [ $build_usbcore_modules -eq 1 ]; then
fi

echo -e "\e[32mPatched kernels modules were created successfully\n\e[0m"

if [ "$build_only" -eq 1 ]; then
exit 0
fi
# Load the newly-built modules
# As a precausion start with unloading the core uvcvideo:
try_unload_module uvcvideo
Expand Down
21 changes: 15 additions & 6 deletions scripts/realsense-metadata-focal-hwe-5.13.patch
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From b20156512d813fcc8404fffaa37f49b1862d1300 Mon Sep 17 00:00:00 2001
From 7f1476ad8a599649a1067576d1efc4b28bb27e11 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
Expand All @@ -8,15 +8,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 | 270 +++++++++++++++++++++++++++++
drivers/media/usb/uvc/uvc_driver.c | 279 +++++++++++++++++++++++++++++
drivers/media/usb/uvc/uvcvideo.h | 2 +-
2 files changed, 271 insertions(+), 1 deletion(-)
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 9a791d8ef..89e76e5da 100644
index 9a791d8ef..6d875181a 100644
--- a/drivers/media/usb/uvc/uvc_driver.c
+++ b/drivers/media/usb/uvc/uvc_driver.c
@@ -3164,6 +3164,276 @@ static const struct usb_device_id uvc_ids[] = {
@@ -3164,6 +3164,285 @@ 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 @@ -236,6 +236,15 @@ index 9a791d8ef..89e76e5da 100644
+ .bInterfaceSubClass = 1,
+ .bInterfaceProtocol = 0,
+ .driver_info = UVC_INFO_META(V4L2_META_FMT_D4XX) },
+ /* Intel D555e Depth Camera */
+ { .match_flags = USB_DEVICE_ID_MATCH_DEVICE
+ | USB_DEVICE_ID_MATCH_INT_INFO,
+ .idVendor = 0x8086,
+ .idProduct = 0x0b56,
+ .bInterfaceClass = USB_CLASS_VIDEO,
+ .bInterfaceSubClass = 1,
+ .bInterfaceProtocol = 0,
+ .driver_info = UVC_INFO_META(V4L2_META_FMT_D4XX) },
+ /* Intel D405 */
+ { .match_flags = USB_DEVICE_ID_MATCH_DEVICE
+ | USB_DEVICE_ID_MATCH_INT_INFO,
Expand Down Expand Up @@ -281,7 +290,7 @@ index 9a791d8ef..89e76e5da 100644
+ .bInterfaceSubClass = 1,
+ .bInterfaceProtocol = UVC_PC_PROTOCOL_15,
+ .driver_info = UVC_INFO_META(V4L2_META_FMT_D4XX) },
+ /* Intel S585 Safety Camera */
+ /* Intel 585 Camera */
+ { .match_flags = USB_DEVICE_ID_MATCH_DEVICE
+ | USB_DEVICE_ID_MATCH_INT_INFO,
+ .idVendor = 0x8086,
Expand Down
21 changes: 15 additions & 6 deletions scripts/realsense-metadata-focal-hwe-5.15.patch
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From 476b6854131192d8545cf6ffa4a64daa24351033 Mon Sep 17 00:00:00 2001
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
Expand All @@ -8,15 +8,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 | 270 +++++++++++++++++++++++++++++
drivers/media/usb/uvc/uvc_driver.c | 279 +++++++++++++++++++++++++++++
drivers/media/usb/uvc/uvcvideo.h | 2 +-
2 files changed, 271 insertions(+), 1 deletion(-)
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 9a791d8ef..89e76e5da 100644
index 72fff7264..4d46d06f7 100644
--- a/drivers/media/usb/uvc/uvc_driver.c
+++ b/drivers/media/usb/uvc/uvc_driver.c
@@ -3164,6 +3164,276 @@ static const struct usb_device_id uvc_ids[] = {
@@ -3164,6 +3164,285 @@ 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 @@ -236,6 +236,15 @@ index 9a791d8ef..89e76e5da 100644
+ .bInterfaceSubClass = 1,
+ .bInterfaceProtocol = 0,
+ .driver_info = UVC_INFO_META(V4L2_META_FMT_D4XX) },
+ /* Intel D555e Depth Camera */
+ { .match_flags = USB_DEVICE_ID_MATCH_DEVICE
+ | USB_DEVICE_ID_MATCH_INT_INFO,
+ .idVendor = 0x8086,
+ .idProduct = 0x0b56,
+ .bInterfaceClass = USB_CLASS_VIDEO,
+ .bInterfaceSubClass = 1,
+ .bInterfaceProtocol = 0,
+ .driver_info = UVC_INFO_META(V4L2_META_FMT_D4XX) },
+ /* Intel D405 */
+ { .match_flags = USB_DEVICE_ID_MATCH_DEVICE
+ | USB_DEVICE_ID_MATCH_INT_INFO,
Expand Down Expand Up @@ -281,7 +290,7 @@ index 9a791d8ef..89e76e5da 100644
+ .bInterfaceSubClass = 1,
+ .bInterfaceProtocol = UVC_PC_PROTOCOL_15,
+ .driver_info = UVC_INFO_META(V4L2_META_FMT_D4XX) },
+ /* Intel S585 Safety Camera */
+ /* Intel 585 Camera */
+ { .match_flags = USB_DEVICE_ID_MATCH_DEVICE
+ | USB_DEVICE_ID_MATCH_INT_INFO,
+ .idVendor = 0x8086,
Expand Down
25 changes: 17 additions & 8 deletions scripts/realsense-metadata-focal-master.patch
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
From abc0560813209aaece6688d4660950cdff613618 Mon Sep 17 00:00:00 2001
From: ev-mp <ev_mp@yahoo.com>
Date: Fri, 19 Jun 2020 12:34:08 +0300
From e6e4fd91cdfdb0b9cbb439916ebd12d61f1ff1b4 Mon Sep 17 00:00:00 2001
From: Dmitry Perchanov <dmitry.perchanov@intel.com>
Date: Mon, 21 Aug 2023 15:10:57 +0300
Subject: [PATCH] Enabling UVC Metadata attributes with Ubuntu 20.04. Kernel
5.4

Co-developed-by: Evgeni Raikhel <[email protected]>
Signed-off-by: Dmitry Perchanov <[email protected]>
---
drivers/media/usb/uvc/uvc_driver.c | 270 +++++++++++++++++++++++++++++
drivers/media/usb/uvc/uvc_driver.c | 279 +++++++++++++++++++++++++++++
drivers/media/usb/uvc/uvcvideo.h | 2 +-
2 files changed, 271 insertions(+), 1 deletion(-)
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 ddb9eaa11..03a4b35a4 100644
index 3be9bc97f..386832678 100644
--- a/drivers/media/usb/uvc/uvc_driver.c
+++ b/drivers/media/usb/uvc/uvc_driver.c
@@ -2969,6 +2969,276 @@ static const struct usb_device_id uvc_ids[] = {
@@ -2916,6 +2916,285 @@ 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 @@ -235,6 +235,15 @@ index ddb9eaa11..03a4b35a4 100644
+ .bInterfaceSubClass = 1,
+ .bInterfaceProtocol = 0,
+ .driver_info = UVC_INFO_META(V4L2_META_FMT_D4XX) },
+ /* Intel D555e Depth Camera */
+ { .match_flags = USB_DEVICE_ID_MATCH_DEVICE
+ | USB_DEVICE_ID_MATCH_INT_INFO,
+ .idVendor = 0x8086,
+ .idProduct = 0x0b56,
+ .bInterfaceClass = USB_CLASS_VIDEO,
+ .bInterfaceSubClass = 1,
+ .bInterfaceProtocol = 0,
+ .driver_info = UVC_INFO_META(V4L2_META_FMT_D4XX) },
+ /* Intel D405 */
+ { .match_flags = USB_DEVICE_ID_MATCH_DEVICE
+ | USB_DEVICE_ID_MATCH_INT_INFO,
Expand Down Expand Up @@ -280,7 +289,7 @@ index ddb9eaa11..03a4b35a4 100644
+ .bInterfaceSubClass = 1,
+ .bInterfaceProtocol = UVC_PC_PROTOCOL_15,
+ .driver_info = UVC_INFO_META(V4L2_META_FMT_D4XX) },
+ /* Intel S585 Safety Camera */
+ /* Intel 585 Camera */
+ { .match_flags = USB_DEVICE_ID_MATCH_DEVICE
+ | USB_DEVICE_ID_MATCH_INT_INFO,
+ .idVendor = 0x8086,
Expand Down
21 changes: 15 additions & 6 deletions scripts/realsense-metadata-jammy-hwe-6.2.patch
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
From 1530931a74644f79205545b69feae3396d612c1d Mon Sep 17 00:00:00 2001
From 04128af65169760ec4c8fba681ef278fc22b7ec1 Mon Sep 17 00:00:00 2001
From: Dmitry Perchanov <[email protected]>
Date: Sun, 13 Aug 2023 12:13:21 +0300
Subject: [PATCH] Enabling UVC Metadata attributes, Ubuntu jammy 22.04. Kernel
6.2

Signed-off-by: Dmitry Perchanov <[email protected]>
---
drivers/media/usb/uvc/uvc_driver.c | 81 ++++++++++++++++++++++++++++++
drivers/media/usb/uvc/uvc_driver.c | 90 ++++++++++++++++++++++++++++++
drivers/media/usb/uvc/uvcvideo.h | 2 +-
2 files changed, 82 insertions(+), 1 deletion(-)
2 files changed, 91 insertions(+), 1 deletion(-)

diff --git a/drivers/media/usb/uvc/uvc_driver.c b/drivers/media/usb/uvc/uvc_driver.c
index 362df9dd3..933d3f884 100644
index 362df9dd3..8f65b969b 100644
--- a/drivers/media/usb/uvc/uvc_driver.c
+++ b/drivers/media/usb/uvc/uvc_driver.c
@@ -2963,6 +2963,33 @@ static const struct usb_device_id uvc_ids[] = {
Expand Down Expand Up @@ -48,7 +48,7 @@ index 362df9dd3..933d3f884 100644
/* Intel RealSense D4M */
{ .match_flags = USB_DEVICE_ID_MATCH_DEVICE
| USB_DEVICE_ID_MATCH_INT_INFO,
@@ -2972,6 +2999,60 @@ static const struct usb_device_id uvc_ids[] = {
@@ -2972,6 +2999,69 @@ static const struct usb_device_id uvc_ids[] = {
.bInterfaceSubClass = 1,
.bInterfaceProtocol = 0,
.driver_info = UVC_INFO_META(V4L2_META_FMT_D4XX) },
Expand All @@ -70,6 +70,15 @@ index 362df9dd3..933d3f884 100644
+ .bInterfaceSubClass = 1,
+ .bInterfaceProtocol = 0,
+ .driver_info = UVC_INFO_META(V4L2_META_FMT_D4XX) },
+ /* Intel D555e Depth Camera */
+ { .match_flags = USB_DEVICE_ID_MATCH_DEVICE
+ | USB_DEVICE_ID_MATCH_INT_INFO,
+ .idVendor = 0x8086,
+ .idProduct = 0x0b56,
+ .bInterfaceClass = USB_CLASS_VIDEO,
+ .bInterfaceSubClass = 1,
+ .bInterfaceProtocol = 0,
+ .driver_info = UVC_INFO_META(V4L2_META_FMT_D4XX) },
+ /* Intel D405 Depth Camera */
+ { .match_flags = USB_DEVICE_ID_MATCH_DEVICE
+ | USB_DEVICE_ID_MATCH_INT_INFO,
Expand Down Expand Up @@ -97,7 +106,7 @@ index 362df9dd3..933d3f884 100644
+ .bInterfaceSubClass = 1,
+ .bInterfaceProtocol = UVC_PC_PROTOCOL_15,
+ .driver_info = UVC_INFO_META(V4L2_META_FMT_D4XX) },
+ /* Intel S585 Safety Camera */
+ /* Intel 585 Camera */
+ { .match_flags = USB_DEVICE_ID_MATCH_DEVICE
+ | USB_DEVICE_ID_MATCH_INT_INFO,
+ .idVendor = 0x8086,
Expand Down
23 changes: 16 additions & 7 deletions scripts/realsense-metadata-jammy-master.patch
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From 8d8d95f0da472b47d40c2e765c49ca8859b66c25 Mon Sep 17 00:00:00 2001
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
Expand All @@ -8,15 +8,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 | 270 +++++++++++++++++++++++++++++
drivers/media/usb/uvc/uvc_driver.c | 279 +++++++++++++++++++++++++++++
drivers/media/usb/uvc/uvcvideo.h | 2 +-
2 files changed, 271 insertions(+), 1 deletion(-)
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 9a791d8ef..89e76e5da 100644
index 2e7df1de0..848417912 100644
--- a/drivers/media/usb/uvc/uvc_driver.c
+++ b/drivers/media/usb/uvc/uvc_driver.c
@@ -3164,6 +3164,276 @@ static const struct usb_device_id uvc_ids[] = {
@@ -3152,6 +3152,285 @@ 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 @@ -236,6 +236,15 @@ index 9a791d8ef..89e76e5da 100644
+ .bInterfaceSubClass = 1,
+ .bInterfaceProtocol = 0,
+ .driver_info = UVC_INFO_META(V4L2_META_FMT_D4XX) },
+ /* Intel D555e Depth Camera */
+ { .match_flags = USB_DEVICE_ID_MATCH_DEVICE
+ | USB_DEVICE_ID_MATCH_INT_INFO,
+ .idVendor = 0x8086,
+ .idProduct = 0x0b56,
+ .bInterfaceClass = USB_CLASS_VIDEO,
+ .bInterfaceSubClass = 1,
+ .bInterfaceProtocol = 0,
+ .driver_info = UVC_INFO_META(V4L2_META_FMT_D4XX) },
+ /* Intel D405 */
+ { .match_flags = USB_DEVICE_ID_MATCH_DEVICE
+ | USB_DEVICE_ID_MATCH_INT_INFO,
Expand Down Expand Up @@ -281,7 +290,7 @@ index 9a791d8ef..89e76e5da 100644
+ .bInterfaceSubClass = 1,
+ .bInterfaceProtocol = UVC_PC_PROTOCOL_15,
+ .driver_info = UVC_INFO_META(V4L2_META_FMT_D4XX) },
+ /* Intel S585 Safety Camera */
+ /* Intel 585 Camera */
+ { .match_flags = USB_DEVICE_ID_MATCH_DEVICE
+ | USB_DEVICE_ID_MATCH_INT_INFO,
+ .idVendor = 0x8086,
Expand All @@ -294,7 +303,7 @@ index 9a791d8ef..89e76e5da 100644
{ 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 c3ea6a538..99f9041f8 100644
index 1aa2cc985..2772a4640 100644
--- a/drivers/media/usb/uvc/uvcvideo.h
+++ b/drivers/media/usb/uvc/uvcvideo.h
@@ -187,7 +187,7 @@
Expand Down

0 comments on commit 5fa263f

Please sign in to comment.