Skip to content

Commit

Permalink
Add D430i kernel metadata quirck and udev support
Browse files Browse the repository at this point in the history
Change-Id: I946995c6f863fcfd59b5bd7ae7028012013ecbb0
  • Loading branch information
ev-mp committed Mar 7, 2019
1 parent 4c87d80 commit 5010e44
Show file tree
Hide file tree
Showing 8 changed files with 80 additions and 14 deletions.
3 changes: 3 additions & 0 deletions config/99-realsense-libusb.rules
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ SUBSYSTEMS=="usb", ATTRS{idVendor}=="8086", ATTRS{idProduct}=="0b07", MODE:="066
SUBSYSTEMS=="usb", ATTRS{idVendor}=="8086", ATTRS{idProduct}=="0b0c", MODE:="0666", GROUP:="plugdev"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="8086", ATTRS{idProduct}=="0b0d", MODE:="0666", GROUP:="plugdev"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="8086", ATTRS{idProduct}=="0b3a", MODE:="0666", GROUP:="plugdev"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="8086", ATTRS{idProduct}=="0b4b", MODE:="0666", GROUP:="plugdev"
SUBSYSTEMS=="usb", ENV{DEVTYPE}=="usb_device", ATTRS{idVendor}=="8087", ATTRS{idProduct}=="0af3", MODE="0666", GROUP="plugdev"
SUBSYSTEMS=="usb", ENV{DEVTYPE}=="usb_device", ATTRS{idVendor}=="8087", ATTRS{idProduct}=="0b37", MODE="0666", GROUP="plugdev"
SUBSYSTEMS=="usb", ENV{DEVTYPE}=="usb_device", ATTRS{idVendor}=="03e7", ATTRS{idProduct}=="2150", MODE="0666", GROUP="plugdev"
Expand All @@ -40,3 +41,5 @@ KERNEL=="iio*", ATTRS{idVendor}=="8086", ATTRS{idProduct}=="0b01", MODE:="0777",
DRIVER=="hid_sensor_custom", ATTRS{idVendor}=="8086", ATTRS{idProduct}=="0b01", RUN+="/bin/sh -c 'chmod -R 0777 /sys/%p && chmod 0777 /dev/%k'"
KERNEL=="iio*", ATTRS{idVendor}=="8086", ATTRS{idProduct}=="0b3a", MODE:="0777", GROUP:="plugdev", RUN+="/bin/sh -c 'chmod -R 0777 /sys/%p'"
DRIVER=="hid_sensor*", ATTRS{idVendor}=="8086", ATTRS{idProduct}=="0b3a", RUN+="/bin/sh -c ' chmod -R 0777 /sys/%p && chmod 0777 /dev/%k'"
KERNEL=="iio*", ATTRS{idVendor}=="8086", ATTRS{idProduct}=="0b4b", MODE:="0777", GROUP:="plugdev", RUN+="/bin/sh -c 'chmod -R 0777 /sys/%p'"
DRIVER=="hid_sensor*", ATTRS{idVendor}=="8086", ATTRS{idProduct}=="0b4b", RUN+="/bin/sh -c ' chmod -R 0777 /sys/%p && chmod 0777 /dev/%k'"
13 changes: 11 additions & 2 deletions scripts/realsense-metadata-ubuntu-bionic-master.patch
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Subject: [PATCH] Enabling UVC Metadata attributes with Ubuntu 18.04
Signed-off-by: Evgeni Raikhel <evgeni.raikhel@intel.com>

---
drivers/media/usb/uvc/uvc_driver.c | 135 +++++++++++++++++++++++++++++
drivers/media/usb/uvc/uvc_driver.c | 144 +++++++++++++++++++++++++++++
drivers/media/usb/uvc/uvc_video.c | 18 +++-
drivers/media/usb/uvc/uvcvideo.h | 3 +-
3 files changed, 151 insertions(+), 5 deletions(-)
Expand All @@ -18,7 +18,7 @@ diff --git a/drivers/media/usb/uvc/uvc_driver.c b/drivers/media/usb/uvc/uvc_driv
index f50a2b148..534f49135 100644
--- a/drivers/media/usb/uvc/uvc_driver.c
+++ b/drivers/media/usb/uvc/uvc_driver.c
@@ -2771,6 +2771,159 @@ static const struct usb_device_id uvc_ids[] = {
@@ -2771,6 +2771,168 @@ static const struct usb_device_id uvc_ids[] = {
.bInterfaceSubClass = 1,
.bInterfaceProtocol = 0,
.driver_info = UVC_QUIRK_FORCE_Y8 },
Expand Down Expand Up @@ -174,6 +174,15 @@ index f50a2b148..534f49135 100644
+ .bInterfaceClass = USB_CLASS_VIDEO,
+ .bInterfaceSubClass = 1,
+ .bInterfaceProtocol = 0,
+ .driver_info = UVC_QUIRK_APPEND_UVC_HEADER },
+ /* Intel D430i depth camera */
+ { .match_flags = USB_DEVICE_ID_MATCH_DEVICE
+ | USB_DEVICE_ID_MATCH_INT_INFO,
+ .idVendor = 0x8086,
+ .idProduct = 0x0b4b,
+ .bInterfaceClass = USB_CLASS_VIDEO,
+ .bInterfaceSubClass = 1,
+ .bInterfaceProtocol = 0,
+ .driver_info = UVC_QUIRK_APPEND_UVC_HEADER },
/* Generic USB Video Class */
{ USB_INTERFACE_INFO(USB_CLASS_VIDEO, 1, UVC_PC_PROTOCOL_UNDEFINED) },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Subject: [PATCH] added support for uvc metadata

Signed-off-by: Evgeni Raikhel <evgeni.raikhel@intel.com>
---
drivers/media/usb/uvc/uvc_driver.c | 135 +++++++++++++++++++++++++++++++++++++
drivers/media/usb/uvc/uvc_driver.c | 144 +++++++++++++++++++++++++++++++++++++
drivers/media/usb/uvc/uvc_video.c | 18 +++--
drivers/media/usb/uvc/uvcvideo.h | 4 +-
3 files changed, 151 insertions(+), 6 deletions(-)
Expand All @@ -15,7 +15,7 @@ diff --git a/drivers/media/usb/uvc/uvc_driver.c b/drivers/media/usb/uvc/uvc_driv
index 70842c5..9cdc50a 100644
--- a/drivers/media/usb/uvc/uvc_driver.c
+++ b/drivers/media/usb/uvc/uvc_driver.c
@@ -2742,6 +2742,159 @@ static struct usb_device_id uvc_ids[] = {
@@ -2742,6 +2742,168 @@ static struct usb_device_id uvc_ids[] = {
.bInterfaceSubClass = 1,
.bInterfaceProtocol = 0,
.driver_info = UVC_QUIRK_FORCE_Y8 },
Expand Down Expand Up @@ -171,6 +171,15 @@ index 70842c5..9cdc50a 100644
+ .bInterfaceClass = USB_CLASS_VIDEO,
+ .bInterfaceSubClass = 1,
+ .bInterfaceProtocol = 0,
+ .driver_info = UVC_QUIRK_APPEND_UVC_HEADER },
+ /* Intel D430i depth camera */
+ { .match_flags = USB_DEVICE_ID_MATCH_DEVICE
+ | USB_DEVICE_ID_MATCH_INT_INFO,
+ .idVendor = 0x8086,
+ .idProduct = 0x0b4b,
+ .bInterfaceClass = USB_CLASS_VIDEO,
+ .bInterfaceSubClass = 1,
+ .bInterfaceProtocol = 0,
+ .driver_info = UVC_QUIRK_APPEND_UVC_HEADER },
/* Generic USB Video Class */
{ USB_INTERFACE_INFO(USB_CLASS_VIDEO, 1, UVC_PC_PROTOCOL_UNDEFINED) },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Subject: [PATCH] added support for uvc metadata

Signed-off-by: Evgeni Raikhel <evgeni.raikhel@intel.com>
---
drivers/media/usb/uvc/uvc_driver.c | 259 ++++++++++++++++++++++++++++++++
drivers/media/usb/uvc/uvc_driver.c | 268 ++++++++++++++++++++++++++++++++
drivers/media/usb/uvc/uvc_video.c | 20 ++-
drivers/media/usb/uvc/uvcvideo.h | 55 ++++++-
3 files changed, 142 insertions(+), 7 deletions(-)
Expand All @@ -16,7 +16,7 @@ diff --git a/drivers/media/usb/uvc/uvc_driver.c b/drivers/media/usb/uvc/uvc_driv
index 04bf350..5fd10f0 100644
--- a/drivers/media/usb/uvc/uvc_driver.c
+++ b/drivers/media/usb/uvc/uvc_driver.c
@@ -2699,6 +2699,186 @@ static struct usb_device_id uvc_ids[] = {
@@ -2699,6 +2699,195 @@ static struct usb_device_id uvc_ids[] = {
.bInterfaceSubClass = 1,
.bInterfaceProtocol = 0,
.driver_info = UVC_QUIRK_FORCE_Y8 },
Expand Down Expand Up @@ -199,6 +199,15 @@ index 04bf350..5fd10f0 100644
+ .bInterfaceClass = USB_CLASS_VIDEO,
+ .bInterfaceSubClass = 1,
+ .bInterfaceProtocol = 0,
+ .driver_info = UVC_QUIRK_APPEND_UVC_HEADER },
+ /* Intel D430i depth camera */
+ { .match_flags = USB_DEVICE_ID_MATCH_DEVICE
+ | USB_DEVICE_ID_MATCH_INT_INFO,
+ .idVendor = 0x8086,
+ .idProduct = 0x0b4b,
+ .bInterfaceClass = USB_CLASS_VIDEO,
+ .bInterfaceSubClass = 1,
+ .bInterfaceProtocol = 0,
+ .driver_info = UVC_QUIRK_APPEND_UVC_HEADER },
/* Generic USB Video Class */
{ USB_INTERFACE_INFO(USB_CLASS_VIDEO, 1, UVC_PC_PROTOCOL_UNDEFINED) },
Expand Down
13 changes: 11 additions & 2 deletions scripts/realsense-metadata-ubuntu-xenial-hwe-zesty.patch
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Subject: [PATCH] added support for uvc metadata

Signed-off-by: Evgeni Raikhel <evgeni.raikhel@intel.com>
---
drivers/media/usb/uvc/uvc_driver.c | 126 +++++++++++++++++++++++++++++++++++++
drivers/media/usb/uvc/uvc_driver.c | 135 +++++++++++++++++++++++++++++++++++++
drivers/media/usb/uvc/uvc_video.c | 19 ++++--
drivers/media/usb/uvc/uvcvideo.h | 4 +-
3 files changed, 142 insertions(+), 7 deletions(-)
Expand All @@ -15,7 +15,7 @@ diff --git a/drivers/media/usb/uvc/uvc_driver.c b/drivers/media/usb/uvc/uvc_driv
index 04bf350..5fd10f0 100644
--- a/drivers/media/usb/uvc/uvc_driver.c
+++ b/drivers/media/usb/uvc/uvc_driver.c
@@ -2699,6 +2699,159 @@ static struct usb_device_id uvc_ids[] = {
@@ -2699,6 +2699,168 @@ static struct usb_device_id uvc_ids[] = {
.bInterfaceSubClass = 1,
.bInterfaceProtocol = 0,
.driver_info = UVC_QUIRK_FORCE_Y8 },
Expand Down Expand Up @@ -171,6 +171,15 @@ index 04bf350..5fd10f0 100644
+ .bInterfaceClass = USB_CLASS_VIDEO,
+ .bInterfaceSubClass = 1,
+ .bInterfaceProtocol = 0,
+ .driver_info = UVC_QUIRK_APPEND_UVC_HEADER },
+ /* Intel D430i depth camera */
+ { .match_flags = USB_DEVICE_ID_MATCH_DEVICE
+ | USB_DEVICE_ID_MATCH_INT_INFO,
+ .idVendor = 0x8086,
+ .idProduct = 0x0b4b,
+ .bInterfaceClass = USB_CLASS_VIDEO,
+ .bInterfaceSubClass = 1,
+ .bInterfaceProtocol = 0,
+ .driver_info = UVC_QUIRK_APPEND_UVC_HEADER },
/* Generic USB Video Class */
{ USB_INTERFACE_INFO(USB_CLASS_VIDEO, 1, UVC_PC_PROTOCOL_UNDEFINED) },
Expand Down
13 changes: 11 additions & 2 deletions scripts/realsense-metadata-ubuntu-xenial-hwe.patch
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Subject: [PATCH] Enabling UVC Metadata attributes with Ubuntu 18.04
Signed-off-by: Evgeni Raikhel <evgeni.raikhel@intel.com>

---
drivers/media/usb/uvc/uvc_driver.c | 135 +++++++++++++++++++++++++++++
drivers/media/usb/uvc/uvc_driver.c | 144 +++++++++++++++++++++++++++++
drivers/media/usb/uvc/uvc_video.c | 18 +++-
drivers/media/usb/uvc/uvcvideo.h | 3 +-
3 files changed, 151 insertions(+), 5 deletions(-)
Expand All @@ -18,7 +18,7 @@ diff --git a/drivers/media/usb/uvc/uvc_driver.c b/drivers/media/usb/uvc/uvc_driv
index f50a2b148..534f49135 100644
--- a/drivers/media/usb/uvc/uvc_driver.c
+++ b/drivers/media/usb/uvc/uvc_driver.c
@@ -2771,6 +2771,159 @@ static const struct usb_device_id uvc_ids[] = {
@@ -2771,6 +2771,168 @@ static const struct usb_device_id uvc_ids[] = {
.bInterfaceSubClass = 1,
.bInterfaceProtocol = 0,
.driver_info = UVC_QUIRK_FORCE_Y8 },
Expand Down Expand Up @@ -174,6 +174,15 @@ index f50a2b148..534f49135 100644
+ .bInterfaceClass = USB_CLASS_VIDEO,
+ .bInterfaceSubClass = 1,
+ .bInterfaceProtocol = 0,
+ .driver_info = UVC_QUIRK_APPEND_UVC_HEADER },
+ /* Intel D430i depth camera */
+ { .match_flags = USB_DEVICE_ID_MATCH_DEVICE
+ | USB_DEVICE_ID_MATCH_INT_INFO,
+ .idVendor = 0x8086,
+ .idProduct = 0x0b4b,
+ .bInterfaceClass = USB_CLASS_VIDEO,
+ .bInterfaceSubClass = 1,
+ .bInterfaceProtocol = 0,
+ .driver_info = UVC_QUIRK_APPEND_UVC_HEADER },
/* Generic USB Video Class */
{ USB_INTERFACE_INFO(USB_CLASS_VIDEO, 1, UVC_PC_PROTOCOL_UNDEFINED) },
Expand Down
13 changes: 11 additions & 2 deletions scripts/realsense-metadata-ubuntu-xenial-master.patch
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Subject: [PATCH] added support for uvc metadata

Signed-off-by: Evgeni Raikhel <evgeni.raikhel@intel.com>
---
drivers/media/usb/uvc/uvc_driver.c | 126 +++++++++++++++++++++++++++++++++++++
drivers/media/usb/uvc/uvc_driver.c | 135 +++++++++++++++++++++++++++++++++++++
drivers/media/usb/uvc/uvc_video.c | 19 ++++--
drivers/media/usb/uvc/uvcvideo.h | 4 +-
3 files changed, 142 insertions(+), 7 deletions(-)
Expand All @@ -15,7 +15,7 @@ diff --git a/drivers/media/usb/uvc/uvc_driver.c b/drivers/media/usb/uvc/uvc_driv
index 04bf350..5fd10f0 100644
--- a/drivers/media/usb/uvc/uvc_driver.c
+++ b/drivers/media/usb/uvc/uvc_driver.c
@@ -2699,6 +2699,159 @@ static struct usb_device_id uvc_ids[] = {
@@ -2699,6 +2699,168 @@ static struct usb_device_id uvc_ids[] = {
.bInterfaceSubClass = 1,
.bInterfaceProtocol = 0,
.driver_info = UVC_QUIRK_FORCE_Y8 },
Expand Down Expand Up @@ -171,6 +171,15 @@ index 04bf350..5fd10f0 100644
+ .bInterfaceClass = USB_CLASS_VIDEO,
+ .bInterfaceSubClass = 1,
+ .bInterfaceProtocol = 0,
+ .driver_info = UVC_QUIRK_APPEND_UVC_HEADER },
+ /* Intel D430i depth camera */
+ { .match_flags = USB_DEVICE_ID_MATCH_DEVICE
+ | USB_DEVICE_ID_MATCH_INT_INFO,
+ .idVendor = 0x8086,
+ .idProduct = 0x0b4b,
+ .bInterfaceClass = USB_CLASS_VIDEO,
+ .bInterfaceSubClass = 1,
+ .bInterfaceProtocol = 0,
+ .driver_info = UVC_QUIRK_APPEND_UVC_HEADER },
/* Generic USB Video Class */
{ USB_INTERFACE_INFO(USB_CLASS_VIDEO, 1, UVC_PC_PROTOCOL_UNDEFINED) },
Expand Down
13 changes: 11 additions & 2 deletions scripts/realsense-metadata-ubuntu-xenial-v4.16.patch
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Subject: [PATCH] D4M metadata enablement w/metanode kernel 4.16
This patchs drops the documentation chapter as unnecessary

---
drivers/media/usb/uvc/uvc_driver.c | 137 +++++++++++++++++++++++++++++++++++++
drivers/media/usb/uvc/uvc_driver.c | 146 +++++++++++++++++++++++++++++++++++++
drivers/media/usb/uvc/uvcvideo.h | 2 +-
include/uapi/linux/videodev2.h | 1 +
3 files changed, 139 insertions(+), 1 deletion(-)
Expand All @@ -29,7 +29,7 @@ index fd387bf..3219519 100644

/*
* The Logitech cameras listed below have their interface class set to
@@ -2819,6 +2821,159 @@ static const struct usb_device_id uvc_ids[] = {
@@ -2819,6 +2821,168 @@ static const struct usb_device_id uvc_ids[] = {
.bInterfaceSubClass = 1,
.bInterfaceProtocol = 0,
.driver_info = (kernel_ulong_t)&uvc_quirk_force_y8 },
Expand Down Expand Up @@ -185,6 +185,15 @@ index fd387bf..3219519 100644
+ .bInterfaceClass = USB_CLASS_VIDEO,
+ .bInterfaceSubClass = 1,
+ .bInterfaceProtocol = 0,
+ .driver_info = UVC_QUIRK_META(V4L2_META_FMT_D4XX) },
+ /* Intel D430i depth camera */
+ { .match_flags = USB_DEVICE_ID_MATCH_DEVICE
+ | USB_DEVICE_ID_MATCH_INT_INFO,
+ .idVendor = 0x8086,
+ .idProduct = 0x0b4b,
+ .bInterfaceClass = USB_CLASS_VIDEO,
+ .bInterfaceSubClass = 1,
+ .bInterfaceProtocol = 0,
+ .driver_info = UVC_QUIRK_META(V4L2_META_FMT_D4XX) },
/* Generic USB Video Class */
{ USB_INTERFACE_INFO(USB_CLASS_VIDEO, 1, UVC_PC_PROTOCOL_UNDEFINED) },
Expand Down

0 comments on commit 5010e44

Please sign in to comment.