libcamera: camera_sensor: Validate driver support

The CameraSensor class requires the sensor driver to report
information through V4L2 controls and through the V4L2 selection API,
and uses that information to register Camera properties and to
construct CameraSensorInfo class instances to provide them to the IPA.

Currently, validation of the kernel support happens each time a
feature is requested, with slighly similar debug/error messages
output to the user in case a feature is not supported.

Rationalize this by validating the sensor driver requirements in a
single function

Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
This commit is contained in:
Jacopo Mondi 2020-12-22 15:40:08 +01:00
parent 1b4997ef08
commit 8502d4c52d
2 changed files with 85 additions and 0 deletions

View file

@ -69,6 +69,7 @@ protected:
private:
int generateId();
int validateSensorDriver();
int initProperties();
const MediaEntity *entity_;