CameraSensor: Don't fail to add camera with faulty lens

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@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>
This commit is contained in:
Kieran Bingham
2022-09-03 12:48:03 +01:00
parent 1a082a3e95
commit 29497a73dd

View File

@@ -467,8 +467,8 @@ int CameraSensor::discoverAncillaryDevices()
ret = focusLens_->init();
if (ret) {
LOG(CameraSensor, Error)
<< "CameraLens initialisation failed";
return ret;
<< "Lens initialisation failed, lens disabled";
focusLens_.reset();
}
break;