From a0701930a8be9900d428a8cbae0414b455b56e97 Mon Sep 17 00:00:00 2001 From: Naushir Patuck Date: Mon, 23 Jan 2023 15:49:21 +0000 Subject: 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 Reviewed-by: David Plowman Reviewed-by: Nick Hollinghurst Signed-off-by: Kieran Bingham --- src/ipa/raspberrypi/raspberrypi.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/ipa/raspberrypi/raspberrypi.cpp') diff --git a/src/ipa/raspberrypi/raspberrypi.cpp b/src/ipa/raspberrypi/raspberrypi.cpp index bead436d..ec184971 100644 --- a/src/ipa/raspberrypi/raspberrypi.cpp +++ b/src/ipa/raspberrypi/raspberrypi.cpp @@ -115,7 +115,7 @@ public: 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 stop() override {} @@ -158,6 +158,7 @@ private: ControlInfoMap sensorCtrls_; ControlInfoMap ispCtrls_; + bool lensPresent_; ControlList libcameraMetadata_; /* Camera sensor params. */ @@ -204,7 +205,7 @@ private: 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 @@ -241,6 +242,8 @@ int IPARPi::init(const IPASettings &settings, IPAInitResult *result) return ret; } + lensPresent_ = lensPresent; + controller_.initialise(); /* Return the controls handled by the IPA */ -- cgit v1.2.1