[libcamera-devel] [PATCH v2 1/2] libcamera: camera_sensor: Print warning when orientation is unknown

Paul Elder paul.elder at ideasonboard.com
Mon Feb 22 09:01:11 CET 2021


Print a warning when the orientation of a sensor is unknown. The
location property is still defaulted to external.

Signed-off-by: Paul Elder <paul.elder at ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham at ideasonboard.com>

---
Changes in v2:
- expand the warning message
---
 src/libcamera/camera_sensor.cpp | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/libcamera/camera_sensor.cpp b/src/libcamera/camera_sensor.cpp
index c9e8d49b..d7785f63 100644
--- a/src/libcamera/camera_sensor.cpp
+++ b/src/libcamera/camera_sensor.cpp
@@ -446,6 +446,12 @@ int CameraSensor::initProperties()
 			break;
 		}
 	} else {
+		LOG(CameraSensor, Warning)
+			<< "Failed to retrieve the camera location, setting to External";
+		LOG(CameraSensor, Warning)
+			<< "The sensor kernel driver needs to be fixed";
+		LOG(CameraSensor, Warning)
+			<< "See Documentation/sensor_driver_requirements.rst in the libcamera sources for more information";
 		propertyValue = properties::CameraLocationExternal;
 	}
 	properties_.set(properties::Location, propertyValue);
-- 
2.27.0



More information about the libcamera-devel mailing list