From 7c847b11591469d2908e65ff59af28f94f0e6b62 Mon Sep 17 00:00:00 2001 From: Jacopo Mondi Date: Mon, 24 Nov 2025 17:43:44 +0100 Subject: [PATCH] apps: cam: Do not override Request::controls() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The ControlList associated with a Request are created with the libcamera::controls::controls id map. The cam application, when parsing controls from a script assigns to the Request's control list a newly created one, which is initialized without a valid idmap or info map. This causes IPA that run in isolated mode to fail, as the IPC serialization/deserialization code requires all ControlList to have a valid idmap or info map associated. Instead of overwriting the Request::controls() list, merge it with the one created by cam when parsing the capture script. Closes: https://gitlab.freedesktop.org/camera/libcamera/-/issues/295 Fixes: 568865a6c14355 ("cam: Use script parser to set controls") Signed-off-by: Jacopo Mondi Reviewed-by: Barnabás Pőcze Reviewed-by: Kieran Bingham --- src/apps/cam/camera_session.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/apps/cam/camera_session.cpp b/src/apps/cam/camera_session.cpp index 1596a25a..17444a21 100644 --- a/src/apps/cam/camera_session.cpp +++ b/src/apps/cam/camera_session.cpp @@ -447,7 +447,8 @@ int CameraSession::queueRequest(Request *request) return 0; if (script_) - request->controls() = script_->frameControls(queueCount_); + request->controls().merge(script_->frameControls(queueCount_), + ControlList::MergePolicy::OverwriteExisting); queueCount_++;