From patchwork Thu Mar 24 14:20:33 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Umang Jain X-Patchwork-Id: 15537 X-Patchwork-Delegate: umang.jain@ideasonboard.com Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 27730C0F1B for ; Thu, 24 Mar 2022 14:20:51 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id D683B604DC; Thu, 24 Mar 2022 15:20:50 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1648131650; bh=fJGnPQcF6+WjdHb+G9AEYuD6P2KgQ6wmQ0JA0UEGD8U=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=mQdNzwBBvQe2P46EtPwUzI7s/iLHQCTgOC94dk2iFCsDeuJmwTS5LpJu2msyZDnhO Prsqk4XGHZqhnHUk20fAPGi+a4X0gaGJ65MibFKqaMxBCX5pgpIIXjE9ybs8BsbPvE eClp/T69RnuqPkxVYir0pOJKy2iUX0BN/tVkwLl4koDy5tGOjvB1hu8c6jLncz1o// gs6FJR8B7ci4dyakzZEZG9cpz8vK6PLGfpnyMW8sNOmYa0MEVHboSdzQwJ8cSEVLef IPxexJ3sDUMiksxXtND1pCPY9Umbr90pj+vK1YmjVVdR3KO5aw+0QBt28Q3/m7vcY8 6m2pspE8xJB0Q== Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 00E36604C5 for ; Thu, 24 Mar 2022 15:20:50 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="qRDIlR0O"; dkim-atps=neutral Received: from perceval.ideasonboard.com (unknown [103.86.18.100]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id CF6EC1844; Thu, 24 Mar 2022 15:20:47 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1648131649; bh=fJGnPQcF6+WjdHb+G9AEYuD6P2KgQ6wmQ0JA0UEGD8U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qRDIlR0Ojznxl+w31qbOUbaOmcsQthdtbmu5W6b0PcESoYww0c7csB/qVEtg/WEJm DsLx5lWKpMeywcRLHdr8iHmfbyODoI/KbKvlR9NO5Cqpfhts7muDeS83FXnrDiLzZ/ e+symclSGMVkawvz54ZvKEp1IR/ufJPZbUkBKCFs= To: libcamera-devel@lists.libcamera.org Date: Thu, 24 Mar 2022 19:50:33 +0530 Message-Id: <20220324142035.47338-2-umang.jain@ideasonboard.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220324142035.47338-1-umang.jain@ideasonboard.com> References: <20220324142035.47338-1-umang.jain@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v3 1/3] ipa: ipu3: Consolidate querying of exposure and gain limits X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Umang Jain via libcamera-devel From: Umang Jain Reply-To: Umang Jain Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" The exposure and gain limits are required for AGC configuration handled in IPAIPU3::updateSessionConfiguration(), which is happening already. Therefore the max/min private members in IPAIPU3 class for exposure/gain serve no use except setting initial values of exposure_ and gain_ members. Drop the max/min private members from IPAIPU3 class and set initial gain_ and exposure_ in IPAIPU3::updateSessionConfiguration(). Signed-off-by: Umang Jain Reviewed-by: Kieran Bingham Reviewed-by: Laurent Pinchart --- src/ipa/ipu3/ipu3.cpp | 26 ++------------------------ 1 file changed, 2 insertions(+), 24 deletions(-) diff --git a/src/ipa/ipu3/ipu3.cpp b/src/ipa/ipu3/ipu3.cpp index 1ea2c898..a8cc2f6c 100644 --- a/src/ipa/ipu3/ipu3.cpp +++ b/src/ipa/ipu3/ipu3.cpp @@ -169,11 +169,7 @@ private: /* Camera sensor controls. */ uint32_t defVBlank_; uint32_t exposure_; - uint32_t minExposure_; - uint32_t maxExposure_; uint32_t gain_; - uint32_t minGain_; - uint32_t maxGain_; /* Interface to the Camera Helper */ std::unique_ptr camHelper_; @@ -194,10 +190,12 @@ void IPAIPU3::updateSessionConfiguration(const ControlInfoMap &sensorControls) const ControlInfo &v4l2Exposure = sensorControls.find(V4L2_CID_EXPOSURE)->second; int32_t minExposure = v4l2Exposure.min().get(); int32_t maxExposure = v4l2Exposure.max().get(); + exposure_ = minExposure; const ControlInfo &v4l2Gain = sensorControls.find(V4L2_CID_ANALOGUE_GAIN)->second; int32_t minGain = v4l2Gain.min().get(); int32_t maxGain = v4l2Gain.max().get(); + gain_ = minGain; /* * When the AGC computes the new exposure values for a frame, it needs @@ -434,32 +432,12 @@ int IPAIPU3::configure(const IPAConfigInfo &configInfo, */ sensorCtrls_ = configInfo.sensorControls; - const auto itExp = sensorCtrls_.find(V4L2_CID_EXPOSURE); - if (itExp == sensorCtrls_.end()) { - LOG(IPAIPU3, Error) << "Can't find exposure control"; - return -EINVAL; - } - - const auto itGain = sensorCtrls_.find(V4L2_CID_ANALOGUE_GAIN); - if (itGain == sensorCtrls_.end()) { - LOG(IPAIPU3, Error) << "Can't find gain control"; - return -EINVAL; - } - const auto itVBlank = sensorCtrls_.find(V4L2_CID_VBLANK); if (itVBlank == sensorCtrls_.end()) { LOG(IPAIPU3, Error) << "Can't find VBLANK control"; return -EINVAL; } - minExposure_ = itExp->second.min().get(); - maxExposure_ = itExp->second.max().get(); - exposure_ = minExposure_; - - minGain_ = itGain->second.min().get(); - maxGain_ = itGain->second.max().get(); - gain_ = minGain_; - defVBlank_ = itVBlank->second.def().get(); calculateBdsGrid(configInfo.bdsOutputSize); From patchwork Thu Mar 24 14:20:34 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Umang Jain X-Patchwork-Id: 15538 X-Patchwork-Delegate: umang.jain@ideasonboard.com Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 768D4C0F1B for ; Thu, 24 Mar 2022 14:20:54 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 3E6CA604D4; Thu, 24 Mar 2022 15:20:54 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1648131654; bh=zc39wk+H5OxlQO7xzQdrOPi/HFEGmd3msaMIDLF2/G8=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=0FfQLw1wmQBn7wyCXnmPPZp5UcdmXU4Z824kq3oDJ3M7pbGiW0fRo0y3DfH6PhWz7 9roLrlEWuKhMuYwoPCwcManZ2xvwx5tkXUaflW9MQtkdTN6GtIPVzwqMi4E/cxYStX 9743Tbm1/3DLgKMmDnAAcxdhHwLyjz/T0HJJZygM3lPb4d0YrqEZxl/h/bpjaI/thV cMLStRckd+XiOji5wBrKrBL70L/jAhxmnUzdcW5WS0EIiPmQQDw1VrUiDZBK3duufL XnQMrQBWPEhGzK0q9fC279HVoUxaod0/YneAFI9f/3zrbx99q50bAbqJoVw9QGk8+X 6gDs/qHPGOE+Q== Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 5BD9B604C5 for ; Thu, 24 Mar 2022 15:20:53 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="BQCbhlya"; dkim-atps=neutral Received: from perceval.ideasonboard.com (unknown [103.86.18.100]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 44F851844; Thu, 24 Mar 2022 15:20:50 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1648131653; bh=zc39wk+H5OxlQO7xzQdrOPi/HFEGmd3msaMIDLF2/G8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BQCbhlyaIY8/1X9SAomOkXcdpEhAE+MUGmGWCW1Ld63bS2SceHN0KRUayH80aQnYm EYE75lO00r/pyfeUVraIGzWM0dWqpMGxGtbTXD3WEHnhM/W7w1Y+VQkxrY7pZHhh7i 6rUs6lClbdfyE/RGXlgVcOIftAi6A1ulIjLBWnnE= To: libcamera-devel@lists.libcamera.org Date: Thu, 24 Mar 2022 19:50:34 +0530 Message-Id: <20220324142035.47338-3-umang.jain@ideasonboard.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220324142035.47338-1-umang.jain@ideasonboard.com> References: <20220324142035.47338-1-umang.jain@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v3 2/3] ipa: ipu3: Drop sensor controls private members from IPAIPU3 X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Umang Jain via libcamera-devel From: Umang Jain Reply-To: Umang Jain Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Drop exposure, gain private members from IPAIPU3 because the values are handled directly via IPAFrameContext. Move the default vblank value from IPAIPU3 to IPASessionContext structure as it is a default static value not expected to change for a session. Signed-off-by: Umang Jain Reviewed-by: Kieran Bingham Reviewed-by: Laurent Pinchart --- src/ipa/ipu3/ipa_context.h | 1 + src/ipa/ipu3/ipu3.cpp | 29 +++++++++-------------------- 2 files changed, 10 insertions(+), 20 deletions(-) diff --git a/src/ipa/ipu3/ipa_context.h b/src/ipa/ipu3/ipa_context.h index 6b7a512e..103498ef 100644 --- a/src/ipa/ipu3/ipa_context.h +++ b/src/ipa/ipu3/ipa_context.h @@ -37,6 +37,7 @@ struct IPASessionConfiguration { } agc; struct { + int32_t defVBlank; utils::Duration lineDuration; } sensor; }; diff --git a/src/ipa/ipu3/ipu3.cpp b/src/ipa/ipu3/ipu3.cpp index a8cc2f6c..3717d893 100644 --- a/src/ipa/ipu3/ipu3.cpp +++ b/src/ipa/ipu3/ipu3.cpp @@ -166,11 +166,6 @@ private: IPACameraSensorInfo sensorInfo_; - /* Camera sensor controls. */ - uint32_t defVBlank_; - uint32_t exposure_; - uint32_t gain_; - /* Interface to the Camera Helper */ std::unique_ptr camHelper_; @@ -187,15 +182,16 @@ private: */ void IPAIPU3::updateSessionConfiguration(const ControlInfoMap &sensorControls) { + const ControlInfo vBlank = sensorControls.find(V4L2_CID_VBLANK)->second; + context_.configuration.sensor.defVBlank = vBlank.def().get(); + const ControlInfo &v4l2Exposure = sensorControls.find(V4L2_CID_EXPOSURE)->second; int32_t minExposure = v4l2Exposure.min().get(); int32_t maxExposure = v4l2Exposure.max().get(); - exposure_ = minExposure; const ControlInfo &v4l2Gain = sensorControls.find(V4L2_CID_ANALOGUE_GAIN)->second; int32_t minGain = v4l2Gain.min().get(); int32_t maxGain = v4l2Gain.max().get(); - gain_ = minGain; /* * When the AGC computes the new exposure values for a frame, it needs @@ -432,14 +428,6 @@ int IPAIPU3::configure(const IPAConfigInfo &configInfo, */ sensorCtrls_ = configInfo.sensorControls; - const auto itVBlank = sensorCtrls_.find(V4L2_CID_VBLANK); - if (itVBlank == sensorCtrls_.end()) { - LOG(IPAIPU3, Error) << "Can't find VBLANK control"; - return -EINVAL; - } - - defVBlank_ = itVBlank->second.def().get(); - calculateBdsGrid(configInfo.bdsOutputSize); /* Clean frameContext at each reconfiguration. */ @@ -605,6 +593,7 @@ void IPAIPU3::parseStatistics(unsigned int frame, const ipu3_uapi_stats_3a *stats) { double lineDuration = context_.configuration.sensor.lineDuration.get(); + int32_t vBlank = context_.configuration.sensor.defVBlank; ControlList ctrls(controls::controls); for (auto const &algo : algorithms_) @@ -613,7 +602,7 @@ void IPAIPU3::parseStatistics(unsigned int frame, setControls(frame); /* \todo Use VBlank value calculated from each frame exposure. */ - int64_t frameDuration = (defVBlank_ + sensorInfo_.outputSize.height) * lineDuration; + int64_t frameDuration = (vBlank + sensorInfo_.outputSize.height) * lineDuration; ctrls.set(controls::FrameDuration, frameDuration); ctrls.set(controls::AnalogueGain, context_.frameContext.sensor.gain); @@ -649,12 +638,12 @@ void IPAIPU3::setControls(unsigned int frame) IPU3Action op; op.op = ActionSetSensorControls; - exposure_ = context_.frameContext.agc.exposure; - gain_ = camHelper_->gainCode(context_.frameContext.agc.gain); + int32_t exposure = context_.frameContext.agc.exposure; + int32_t gain = camHelper_->gainCode(context_.frameContext.agc.gain); ControlList ctrls(sensorCtrls_); - ctrls.set(V4L2_CID_EXPOSURE, static_cast(exposure_)); - ctrls.set(V4L2_CID_ANALOGUE_GAIN, static_cast(gain_)); + ctrls.set(V4L2_CID_EXPOSURE, exposure); + ctrls.set(V4L2_CID_ANALOGUE_GAIN, gain); op.sensorControls = ctrls; ControlList lensCtrls(lensCtrls_); From patchwork Thu Mar 24 14:20:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Umang Jain X-Patchwork-Id: 15539 X-Patchwork-Delegate: umang.jain@ideasonboard.com Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id DA59AC0F1B for ; Thu, 24 Mar 2022 14:20:58 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id A1603604D5; Thu, 24 Mar 2022 15:20:58 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1648131658; bh=O79HbxZc3dEQrPzwJu1mlJQvAduOUfEGbfMj49HOlIQ=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=mnETLy31HUqIBm7zCMJ7OCxxD5GgazE70RHuhEr52/sjognHP+5Rk+nSCVCC+hhjh qf6opiuqcqkQFZ2wRA71UYZ9s5NOGfWksMZCNebs1GaQ7IeymppPfeF2FFrbSRqm0c lXZEkQMqbP9ET5g/B22Czq/wDFjTrKInlQbjB8s8T4fRlOyYMi7IPTJq32Cl7apLfi X8N9jIXaBRGN4wTaQCzWiXfZeqJsHnzADSIIDGN1JFrcfemjjeGq/K/ctCEqAmlzE0 C81KrzPQLRaV1DXbNTsYLUJ2Vp+vlyoxO9XKVYORtkKZJDaVfpgomVUsb+wHYJfiKI Dmj240Njuny4Q== Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 03B6E604C5 for ; Thu, 24 Mar 2022 15:20:57 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="Ra9myZ2I"; dkim-atps=neutral Received: from perceval.ideasonboard.com (unknown [103.86.18.100]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 35D4E1844; Thu, 24 Mar 2022 15:20:54 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1648131656; bh=O79HbxZc3dEQrPzwJu1mlJQvAduOUfEGbfMj49HOlIQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ra9myZ2IpmXhORTSOS3BRwIisrEPRE/kFOMK9U+nSiVDcS4ssiJJRlXhQrI9JZec3 SAx01Sr/Az0c6GCnuf9jjuvmt05wY7250bU/oEZ33FQ48AtlQj5aVM8C57TPSNPaFQ T0P40cdE9Ssdv5AqAqpACEP5XM179AG9lhksnfvQ= To: libcamera-devel@lists.libcamera.org Date: Thu, 24 Mar 2022 19:50:35 +0530 Message-Id: <20220324142035.47338-4-umang.jain@ideasonboard.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220324142035.47338-1-umang.jain@ideasonboard.com> References: <20220324142035.47338-1-umang.jain@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v3 3/3] ipa: ipu3: Ensure controls exists in updateSessionConfiguration() X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Umang Jain via libcamera-devel From: Umang Jain Reply-To: Umang Jain Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Add a control-not-found error checking for the controls being queried in IPAIPU3::updateSessionConfiguration(). If the control is not found, progagate the error back to the caller. This requires a change in the function signature of private member function IPAIPU3::updateSessionConfiguration(). Signed-off-by: Umang Jain Reviewed-by: Laurent Pinchart Reviewed-by: Kieran Bingham --- src/ipa/ipu3/ipu3.cpp | 44 +++++++++++++++++++++++++++++++------------ 1 file changed, 32 insertions(+), 12 deletions(-) diff --git a/src/ipa/ipu3/ipu3.cpp b/src/ipa/ipu3/ipu3.cpp index 3717d893..66346728 100644 --- a/src/ipa/ipu3/ipu3.cpp +++ b/src/ipa/ipu3/ipu3.cpp @@ -149,7 +149,7 @@ private: void updateControls(const IPACameraSensorInfo &sensorInfo, const ControlInfoMap &sensorControls, ControlInfoMap *ipaControls); - void updateSessionConfiguration(const ControlInfoMap &sensorControls); + int updateSessionConfiguration(const ControlInfoMap &sensorControls); void processControls(unsigned int frame, const ControlList &controls); void fillParams(unsigned int frame, ipu3_uapi_params *params); void parseStatistics(unsigned int frame, @@ -180,18 +180,33 @@ private: * \brief Compute IPASessionConfiguration using the sensor information and the * sensor V4L2 controls */ -void IPAIPU3::updateSessionConfiguration(const ControlInfoMap &sensorControls) +int IPAIPU3::updateSessionConfiguration(const ControlInfoMap &sensorControls) { - const ControlInfo vBlank = sensorControls.find(V4L2_CID_VBLANK)->second; - context_.configuration.sensor.defVBlank = vBlank.def().get(); + const auto itVBlank = sensorControls.find(V4L2_CID_VBLANK); + if (itVBlank == sensorControls.end()) { + LOG(IPAIPU3, Error) << "Can't find vblank control"; + return -EINVAL; + } - const ControlInfo &v4l2Exposure = sensorControls.find(V4L2_CID_EXPOSURE)->second; - int32_t minExposure = v4l2Exposure.min().get(); - int32_t maxExposure = v4l2Exposure.max().get(); + context_.configuration.sensor.defVBlank = itVBlank->second.def().get(); + + const auto itExp = sensorControls.find(V4L2_CID_EXPOSURE); + if (itExp == sensorControls.end()) { + LOG(IPAIPU3, Error) << "Can't find exposure control"; + return -EINVAL; + } + + int32_t minExposure = itExp->second.min().get(); + int32_t maxExposure = itExp->second.max().get(); - const ControlInfo &v4l2Gain = sensorControls.find(V4L2_CID_ANALOGUE_GAIN)->second; - int32_t minGain = v4l2Gain.min().get(); - int32_t maxGain = v4l2Gain.max().get(); + const auto itGain = sensorControls.find(V4L2_CID_ANALOGUE_GAIN); + if (itGain == sensorControls.end()) { + LOG(IPAIPU3, Error) << "Can't find analogue gain control"; + return -EINVAL; + } + + int32_t minGain = itGain->second.min().get(); + int32_t maxGain = itGain->second.max().get(); /* * When the AGC computes the new exposure values for a frame, it needs @@ -204,6 +219,8 @@ void IPAIPU3::updateSessionConfiguration(const ControlInfoMap &sensorControls) context_.configuration.agc.maxShutterSpeed = maxExposure * context_.configuration.sensor.lineDuration; context_.configuration.agc.minAnalogueGain = camHelper_->gain(minGain); context_.configuration.agc.maxAnalogueGain = camHelper_->gain(maxGain); + + return 0; } /** @@ -437,10 +454,13 @@ int IPAIPU3::configure(const IPAConfigInfo &configInfo, updateControls(sensorInfo_, sensorCtrls_, ipaControls); /* Update the IPASessionConfiguration using the sensor settings. */ - updateSessionConfiguration(sensorCtrls_); + int ret = updateSessionConfiguration(sensorCtrls_); + if (ret < 0) + return ret; + for (auto const &algo : algorithms_) { - int ret = algo->configure(context_, configInfo); + ret = algo->configure(context_, configInfo); if (ret) return ret; }