@@ -241,6 +241,23 @@ std::optional<int> CameraSensorRaw::init()
if (ret)
return { ret };
+ /* Ensure CONFIG_MODEL is set to COMMON_RAW_SENSOR */
+ ControlList configModel = subdev_->getControls({ { V4L2_CID_CONFIG_MODEL } });
+ if (configModel.empty()) {
+ LOG(CameraSensor, Debug)
+ << entity_->name() << ": control "
+ << "V4L2_CID_CONFIG_MODEL not available";
+ return { 0 };
+ }
+
+ int32_t model = configModel.get(V4L2_CID_CONFIG_MODEL).get<int32_t>();
+ if (!(model & V4L2_CONFIG_MODEL_COMMON_RAW_SENSOR)) {
+ LOG(CameraSensor, Debug)
+ << entity_->name()
+ << ": Common raw sensor model not supported";
+ return { 0 };
+ }
+
/*
* 1. Identify the pads.
*/
Query the V4L2_CID_CONFIG_MODEL control on the sensor sub-device, and only match it with the CameraRawSensor class if the COMMON_RAW_SENSOR bit is set. Signed-off-by: Jai Luthra <jai.luthra@ideasonboard.com> --- src/libcamera/sensor/camera_sensor_raw.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)