mirror of
https://git.libcamera.org/libcamera/libcamera.git
synced 2025-07-13 15:29:45 +03:00
pipeline: ipa: raspberrypi: Check if lens actuator is available
Check if a lens actuator is available by the presense of the lens driver entity in the pipeline handler. Pass this result to the IPA on init. Signed-off-by: Naushir Patuck <naush@raspberrypi.com> Reviewed-by: David Plowman <david.plowman@raspberrypi.com> Reviewed-by: Nick Hollinghurst <nick.hollinghurst@raspberrypi.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
parent
8f85c024f9
commit
a0701930a8
3 changed files with 8 additions and 4 deletions
|
@ -50,7 +50,7 @@ struct StartConfig {
|
||||||
};
|
};
|
||||||
|
|
||||||
interface IPARPiInterface {
|
interface IPARPiInterface {
|
||||||
init(libcamera.IPASettings settings)
|
init(libcamera.IPASettings settings, bool lensPresent)
|
||||||
=> (int32 ret, IPAInitResult result);
|
=> (int32 ret, IPAInitResult result);
|
||||||
start(libcamera.ControlList controls) => (StartConfig startConfig);
|
start(libcamera.ControlList controls) => (StartConfig startConfig);
|
||||||
stop();
|
stop();
|
||||||
|
|
|
@ -115,7 +115,7 @@ public:
|
||||||
munmap(lsTable_, MaxLsGridSize);
|
munmap(lsTable_, MaxLsGridSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
int init(const IPASettings &settings, IPAInitResult *result) override;
|
int init(const IPASettings &settings, bool lensPresent, IPAInitResult *result) override;
|
||||||
void start(const ControlList &controls, StartConfig *startConfig) override;
|
void start(const ControlList &controls, StartConfig *startConfig) override;
|
||||||
void stop() override {}
|
void stop() override {}
|
||||||
|
|
||||||
|
@ -158,6 +158,7 @@ private:
|
||||||
|
|
||||||
ControlInfoMap sensorCtrls_;
|
ControlInfoMap sensorCtrls_;
|
||||||
ControlInfoMap ispCtrls_;
|
ControlInfoMap ispCtrls_;
|
||||||
|
bool lensPresent_;
|
||||||
ControlList libcameraMetadata_;
|
ControlList libcameraMetadata_;
|
||||||
|
|
||||||
/* Camera sensor params. */
|
/* Camera sensor params. */
|
||||||
|
@ -204,7 +205,7 @@ private:
|
||||||
uint32_t maxSensorGainCode_;
|
uint32_t maxSensorGainCode_;
|
||||||
};
|
};
|
||||||
|
|
||||||
int IPARPi::init(const IPASettings &settings, IPAInitResult *result)
|
int IPARPi::init(const IPASettings &settings, bool lensPresent, IPAInitResult *result)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* Load the "helper" for this sensor. This tells us all the device specific stuff
|
* Load the "helper" for this sensor. This tells us all the device specific stuff
|
||||||
|
@ -241,6 +242,8 @@ int IPARPi::init(const IPASettings &settings, IPAInitResult *result)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
lensPresent_ = lensPresent;
|
||||||
|
|
||||||
controller_.initialise();
|
controller_.initialise();
|
||||||
|
|
||||||
/* Return the controls handled by the IPA */
|
/* Return the controls handled by the IPA */
|
||||||
|
|
|
@ -32,6 +32,7 @@
|
||||||
|
|
||||||
#include "libcamera/internal/bayer_format.h"
|
#include "libcamera/internal/bayer_format.h"
|
||||||
#include "libcamera/internal/camera.h"
|
#include "libcamera/internal/camera.h"
|
||||||
|
#include "libcamera/internal/camera_lens.h"
|
||||||
#include "libcamera/internal/camera_sensor.h"
|
#include "libcamera/internal/camera_sensor.h"
|
||||||
#include "libcamera/internal/device_enumerator.h"
|
#include "libcamera/internal/device_enumerator.h"
|
||||||
#include "libcamera/internal/framebuffer.h"
|
#include "libcamera/internal/framebuffer.h"
|
||||||
|
@ -1513,7 +1514,7 @@ int RPiCameraData::loadIPA(ipa::RPi::IPAInitResult *result)
|
||||||
|
|
||||||
IPASettings settings(configurationFile, sensor_->model());
|
IPASettings settings(configurationFile, sensor_->model());
|
||||||
|
|
||||||
return ipa_->init(settings, result);
|
return ipa_->init(settings, !!sensor_->focusLens(), result);
|
||||||
}
|
}
|
||||||
|
|
||||||
int RPiCameraData::configureIPA(const CameraConfiguration *config, ipa::RPi::IPAConfigResult *result)
|
int RPiCameraData::configureIPA(const CameraConfiguration *config, ipa::RPi::IPAConfigResult *result)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue