[libcamera-devel] [PATCH] CameraSensor: Don't fail to add camera with faulty lens
Kieran Bingham
kieran.bingham at ideasonboard.com
Sat Sep 3 13:48:03 CEST 2022
If the CameraSensor fails to identify the VCM specified, it could still
be possible to continue to operate the sensor. Autofocus support will be
disabled, but this would be no different to operating a camera with a
fixed focus. While of course the fixed focus position may not be
suitable, it would provide a better user experience to be able to
continue to operate the camera, while still reporting that the lens is
disabled.
Bug: https://bugs.libcamera.org/show_bug.cgi?id=146
Signed-off-by: Kieran Bingham <kieran.bingham at ideasonboard.com>
---
The Surface devices now have a VCM registered, but they don't
successfully identify the device. While that should also be fixed,
failing to operate a camera because the VCM isn't operating seems to be
a bad user experience.
src/libcamera/camera_sensor.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/libcamera/camera_sensor.cpp b/src/libcamera/camera_sensor.cpp
index d055c16a4885..dcee7b9a0210 100644
--- a/src/libcamera/camera_sensor.cpp
+++ b/src/libcamera/camera_sensor.cpp
@@ -467,8 +467,8 @@ int CameraSensor::discoverAncillaryDevices()
ret = focusLens_->init();
if (ret) {
LOG(CameraSensor, Error)
- << "CameraLens initialisation failed";
- return ret;
+ << "CameraLens initialisation failed: Lens disabled";
+ break;
}
break;
--
2.34.1
More information about the libcamera-devel
mailing list