libcamera: camera_sensor: Support SensorConfiguration

Add a class function to the CameraSensor class to apply a full
configuration to the sensor.

The configuration shall be fully populated and shall apply without
modifications to the sensor.

Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Reviewed-by: Naushir Patuck <naush@raspberrypi.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
Jacopo Mondi 2023-09-21 18:55:40 +02:00 committed by Laurent Pinchart
parent 1602043e62
commit f446c23842
2 changed files with 90 additions and 0 deletions

View file

@ -29,6 +29,7 @@ namespace libcamera {
class BayerFormat;
class CameraLens;
class MediaEntity;
class SensorConfiguration;
struct CameraSensorProperties;
@ -58,6 +59,10 @@ public:
Transform transform = Transform::Identity);
int tryFormat(V4L2SubdeviceFormat *format) const;
int applyConfiguration(const SensorConfiguration &config,
Transform transform = Transform::Identity,
V4L2SubdeviceFormat *sensorFormat = nullptr);
const ControlInfoMap &controls() const;
ControlList getControls(const std::vector<uint32_t> &ids);
int setControls(ControlList *ctrls);