[libcamera-devel] [PATCH] libcamera: V4L2Device: Return the requested Controls in getContrls()

Hirokazu Honda hiroh at chromium.org
Thu Apr 15 05:07:30 CEST 2021


Originally V4L2Device::getControls() returns all the available
controls while requested control values are acquired by
VIDIOC_G_EXT_CTRLS. V4L2Device::getControls() should rather
return the request controls only. This fixes the bug.

Signed-off-by: Hirokazu Honda <hiroh at chromium.org>
---
 src/libcamera/v4l2_device.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/libcamera/v4l2_device.cpp b/src/libcamera/v4l2_device.cpp
index decd19ef..d4a9bb75 100644
--- a/src/libcamera/v4l2_device.cpp
+++ b/src/libcamera/v4l2_device.cpp
@@ -177,7 +177,7 @@ ControlList V4L2Device::getControls(const std::vector<uint32_t> &ids)
 	if (count == 0)
 		return {};
 
-	ControlList ctrls{ controls_ };
+	ControlList ctrls;
 
 	/*
 	 * Start by filling the ControlList. This can't be combined with filling
-- 
2.31.1.368.gbe11c130af-goog



More information about the libcamera-devel mailing list