summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2020-04-27 04:54:14 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2020-04-28 01:54:55 +0300
commite951a2af20c6ca025cf82bae995dee7efe5f9b6b (patch)
treeb7575cd62d5cf5c0af91cab2e12d79539befe9a4
parent58e6970ba7f5256734c6a0d11cb345b3071fb6d2 (diff)
libcamera: pipeline: vimc: Pass configuration file to IPA init()
Pass the vimc IPA dummy configuration file to the IPA init() function. This will be used by the IPA to validate the init() call. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
-rw-r--r--src/libcamera/pipeline/vimc/vimc.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/libcamera/pipeline/vimc/vimc.cpp b/src/libcamera/pipeline/vimc/vimc.cpp
index 99f5261b..6707c5a0 100644
--- a/src/libcamera/pipeline/vimc/vimc.cpp
+++ b/src/libcamera/pipeline/vimc/vimc.cpp
@@ -382,10 +382,12 @@ bool PipelineHandlerVimc::match(DeviceEnumerator *enumerator)
std::unique_ptr<VimcCameraData> data = std::make_unique<VimcCameraData>(this);
data->ipa_ = IPAManager::instance()->createIPA(this, 0, 0);
- if (data->ipa_ == nullptr)
+ if (data->ipa_ != nullptr) {
+ std::string conf = data->ipa_->configurationFile("vimc.conf");
+ data->ipa_->init(IPASettings{ conf });
+ } else {
LOG(VIMC, Warning) << "no matching IPA found";
- else
- data->ipa_->init(IPASettings{});
+ }
/* Locate and open the capture video node. */
if (data->init(media))