From 962df634bd0afe12e6f38464f5e602cf1460c430 Mon Sep 17 00:00:00 2001 From: David Plowman Date: Tue, 5 Oct 2021 09:57:00 +0100 Subject: pipeline: raspberrypi: Create empty control lists correctly When the pipeline handler start() method is supplied with a NULL list of controls, we send an empty control list to the IPA. When the IPA is running in isolated mode the control list goes through the data serializer, for which it must be marked correctly as a list of "controls::controls", otherwise the IPA process will abort. The IPA has a similar problem returning a control list in its configure() method. We must be careful to initialise it properly even when empty. Signed-off-by: David Plowman Reviewed-by: Laurent Pinchart Reviewed-by: Naushir Patuck Reviewed-by: Paul Elder Signed-off-by: Laurent Pinchart --- src/ipa/raspberrypi/raspberrypi.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'src/ipa/raspberrypi/raspberrypi.cpp') diff --git a/src/ipa/raspberrypi/raspberrypi.cpp b/src/ipa/raspberrypi/raspberrypi.cpp index 047123ab..fed82e22 100644 --- a/src/ipa/raspberrypi/raspberrypi.cpp +++ b/src/ipa/raspberrypi/raspberrypi.cpp @@ -389,21 +389,26 @@ int IPARPi::configure(const IPACameraSensorInfo &sensorInfo, /* Pass the camera mode to the CamHelper to setup algorithms. */ helper_->SetCameraMode(mode_); + /* + * Initialise this ControlList correctly, even if empty, in case the IPA is + * running is isolation mode (passing the ControlList through the IPC layer). + */ + ControlList ctrls(sensorCtrls_); + if (firstStart_) { /* Supply initial values for frame durations. */ applyFrameDurations(defaultMinFrameDuration, defaultMaxFrameDuration); /* Supply initial values for gain and exposure. */ - ControlList ctrls(sensorCtrls_); AgcStatus agcStatus; agcStatus.shutter_time = defaultExposureTime; agcStatus.analogue_gain = defaultAnalogueGain; applyAGC(&agcStatus, ctrls); - - ASSERT(controls); - *controls = std::move(ctrls); } + ASSERT(controls); + *controls = std::move(ctrls); + return 0; } -- cgit v1.2.1