From patchwork Fri Nov 29 09:19:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Elder X-Patchwork-Id: 22135 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 0E492C3220 for ; Fri, 29 Nov 2024 09:19:28 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 9107366010; Fri, 29 Nov 2024 10:19:27 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="IEtkZm3D"; dkim-atps=neutral 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 2279A66006 for ; Fri, 29 Nov 2024 10:19:26 +0100 (CET) Received: from neptunite.flets-east.jp (unknown [IPv6:2404:7a81:160:2100:b147:f3c:c4e8:a42a]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id B59ABA8F; Fri, 29 Nov 2024 10:19:00 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1732871941; bh=RMxYhj9l/fphxHNLziuioBTF+TNySkrh8sm3WgWTpaM=; h=From:To:Cc:Subject:Date:From; b=IEtkZm3DwkpcniDedYzE8pk//w7qCXqHoTmdx8oHpS/csBLd/gpEaghDnSTqCWOk2 rOUxQaYjF1co9kn/cj1Pmct0WAetxMrMe2KSHTzX2AYpgKeG5T7OkOOhuHvT1/O3ea 5FSZontKheJQWfS2dfRxTNHgma3UfGor2XVUDUHk= From: Paul Elder To: libcamera-devel@lists.libcamera.org Cc: Paul Elder Subject: [PATCH v3 0/4] Add direction field to ControlId Date: Fri, 29 Nov 2024 18:19:12 +0900 Message-Id: <20241129091916.298359-1-paul.elder@ideasonboard.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 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: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" This patch series add support for querying the ControlId for the direction that it can be passed. This used to only be mentioned in the control id definitions as "This control can only be returned in metadata" so this codifies it and allows this information to be queried by applications. This is an ABI breaking change, so I really want to sneak it in before the 0.4.0 release that's coming imminently... Patches 1 and 2 prepare control definitions and parsing, while patch 3 adds the actual support. Patch 4 enables visualization via cam. The main changes in v2 are that the direction field in controls definitions yaml files are now required, and the code has been cleaned up to take advantage of Flags. v3 expands the v4l2 and local id control serializers so that we can remove the default bidirectional parameter from ControlId and Control constructors. Paul Elder (4): libcamera: controls: Populate direction field in control definitions utils: codegen: controls.py: Parse direction information libcamera: controls: Add support for querying direction information apps: cam: Print control direction information include/libcamera/controls.h | 19 ++++++++++-- include/libcamera/ipa/ipa_controls.h | 3 +- src/apps/cam/camera_session.cpp | 10 +++++-- src/libcamera/control_ids.cpp.in | 4 +-- src/libcamera/control_ids_core.yaml | 44 +++++++++++++++++++++++++++ src/libcamera/control_ids_draft.yaml | 15 ++++++++++ src/libcamera/control_ids_rpi.yaml | 3 ++ src/libcamera/control_serializer.cpp | 11 ++++++- src/libcamera/controls.cpp | 45 ++++++++++++++++++++++++++-- src/libcamera/v4l2_device.cpp | 10 ++++++- src/py/libcamera/gen-py-controls.py | 2 +- utils/codegen/controls.py | 24 ++++++++++++++- utils/codegen/gen-controls.py | 2 +- utils/codegen/gen-gst-controls.py | 2 +- 14 files changed, 178 insertions(+), 16 deletions(-)