From 40b6df2edcd776faeb2641ae30d05226ad8df836 Mon Sep 17 00:00:00 2001 From: Yusheng Hsu Date: Mon, 2 Oct 2023 17:58:08 -0700 Subject: [PATCH 1/3] Fix D457 exposure range ctrl --- src/linux/backend-v4l2.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/linux/backend-v4l2.cpp b/src/linux/backend-v4l2.cpp index fe0ae20505..beccc0dce0 100644 --- a/src/linux/backend-v4l2.cpp +++ b/src/linux/backend-v4l2.cpp @@ -1911,9 +1911,9 @@ namespace librealsense return range; } - struct v4l2_queryctrl query = {}; + struct v4l2_query_ext_ctrl query = {}; query.id = get_cid(option); - if (xioctl(_fd, VIDIOC_QUERYCTRL, &query) < 0) + if (xioctl(_fd, VIDIOC_QUERY_EXT_CTRL, &query) < 0) { // Some controls (exposure, auto exposure, auto hue) do not seem to work on V4L2 // Instead of throwing an error, return an empty range. This will cause this control to be omitted on our UI sample. From 015c61cc32e925cfe98c17a6ddbeab691703826d Mon Sep 17 00:00:00 2001 From: Eran Date: Sun, 2 Jun 2024 13:54:16 +0300 Subject: [PATCH 2/3] add more badges to readme.md (#12993) --- readme.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/readme.md b/readme.md index 66a720fd95..8703abc40e 100644 --- a/readme.md +++ b/readme.md @@ -1,7 +1,14 @@



----------------- +[![License](https://img.shields.io/github/license/IntelRealSense/librealsense.svg)](https://www.apache.org/licenses/LICENSE-2.0) +[![Release](https://img.shields.io/github/v/release/IntelRealSense/librealsense?sort=semver)](https://github.com/IntelRealSense/librealsense/releases/latest) +[![Commits](https://img.shields.io/github/commits-since/IntelRealSense/librealsense/master/development?label=commits%20since)](https://github.com/IntelRealSense/librealsense/compare/master...development) +[![Issues](https://img.shields.io/github/issues/IntelRealSense/librealsense.svg)](https://github.com/IntelRealSense/librealsense/issues) [![GitHub CI](../../actions/workflows/buildsCI.yaml/badge.svg?branch=development)](../../actions/workflows/buildsCI.yaml) +[![Forks](https://img.shields.io/github/forks/IntelRealSense/librealsense.svg)](https://github.com/IntelRealSense/librealsense/network/members) + + ## Overview **Intel® RealSense™ SDK 2.0** is a cross-platform library for Intel® RealSense™ depth cameras. From 048bb66f5dfe49066d1501cf3af79d4d77732159 Mon Sep 17 00:00:00 2001 From: nvidia Date: Mon, 10 Jun 2024 17:45:41 -0700 Subject: [PATCH 3/3] Change only for mipi device get_pu_range to minimize impact --- src/linux/backend-v4l2.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/linux/backend-v4l2.cpp b/src/linux/backend-v4l2.cpp index a5be25c353..05eca183ef 100644 --- a/src/linux/backend-v4l2.cpp +++ b/src/linux/backend-v4l2.cpp @@ -2814,7 +2814,19 @@ namespace librealsense control_range v4l_mipi_device::get_pu_range(rs2_option option) const { - return v4l_uvc_device::get_pu_range(option); + struct v4l2_query_ext_ctrl query = {}; + query.id = get_cid(option); + if (xioctl(_fd, VIDIOC_QUERY_EXT_CTRL, &query) < 0) + { + // Some controls (exposure, auto exposure, auto hue) do not seem to work on V4L2 + // Instead of throwing an error, return an empty range. This will cause this control to be omitted on our UI sample. + // TODO: Figure out what can be done about these options and make this work + query.minimum = query.maximum = 0; + } + + control_range range(query.minimum, query.maximum, query.step, query.default_value); + + return range; } uint32_t v4l_mipi_device::get_cid(rs2_option option) const