apps: cam: Do not override Request::controls()

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: 568865a6c1 ("cam: Use script parser to set controls")
Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
Jacopo Mondi
2025-11-24 17:43:44 +01:00
parent 310cd8bc07
commit 7c847b1159
+2 -1
View File
@@ -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_++;