From patchwork Thu Dec 12 05:24:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Elder X-Patchwork-Id: 22294 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 DE226BD80A for ; Thu, 12 Dec 2024 05:25:05 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id BCB5467EBA; Thu, 12 Dec 2024 06:25:04 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="e65dl2/l"; 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 6AAFC6189C for ; Thu, 12 Dec 2024 06:25:02 +0100 (CET) Received: from neptunite.flets-east.jp (unknown [IPv6:2404:7a81:160:2100:39eb:989c:b016:217b]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id F3BA2316; Thu, 12 Dec 2024 06:24:27 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1733981068; bh=tZ5Qg0zTOXeItDNuxv2dNd075Q55mZg8FjjVpsXqhCA=; h=From:To:Cc:Subject:Date:From; b=e65dl2/lSP1by4qkpqi4zjZUrfGgm0cVCVjDrFZJluoc1WX9L9H8774Mu37LgcRnm WQkglSloK5Qw2M4GqK61MXK+znOEIudRDG9ZSIqeUK9ApgHQ2Nh5nI8idalVdvCrix bV8GIEnax7u+uOmIPyF3U07TP9FUhXkkMwi7deA4= From: Paul Elder To: libcamera-devel@lists.libcamera.org Cc: Paul Elder Subject: [PATCH v4 0/4] Add direction field to ControlId Date: Thu, 12 Dec 2024 14:24:34 +0900 Message-Id: <20241212052438.1547410-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. The main change in v4 is the addition of ControlId::direction(), to simplify serialization/deserialization. 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 | 20 +++++++++- 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 | 8 +++- src/libcamera/controls.cpp | 56 ++++++++++++++++++++++++++-- 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, 187 insertions(+), 16 deletions(-)