From patchwork Mon Feb 8 22:54:27 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 11198 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 A3729BD160 for ; Mon, 8 Feb 2021 22:54:58 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 286AE613F3; Mon, 8 Feb 2021 23:54:58 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="jhBV4u6l"; 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 15C5F60D2E for ; Mon, 8 Feb 2021 23:54:57 +0100 (CET) Received: from pendragon.lan (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 835BF3D7 for ; Mon, 8 Feb 2021 23:54:56 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1612824896; bh=H0//hpA6C+CM4mdaVFV7LPo8R2qrTlsdkKQvx9DPKF8=; h=From:To:Subject:Date:From; b=jhBV4u6lDEL7zHNuQVGu3PHMA1zmPO0LktFanJkiTg5xwVNUO8uzEgJFw6v7SOpy4 4WF45D3UjxNOGKSUnTVgFGulPXj3W/tFlhM8D5inRhKYt5gOEHlLR2IioS1Yb2L0Ho NYYcsmCDISaIQRV+KKXL5/JO3HU7f7jS2XRAmQ94= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Date: Tue, 9 Feb 2021 00:54:27 +0200 Message-Id: <20210208225429.31627-1-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH/RFC 0/2] libcamera: Add Control instances for V4L2 controls 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" Hello, This patch series attempts to extend Control generation for V4L2 controls. I've been toying with the idea for some time and wondered how it would look like, we now have one answer to that question. The patches are quite self-explicit, so I won't repeat their commit messages here. The tentative improvements are in patch 2/2, and its commit message lists remaining issues and ideas for potential further improvements. I'm not entirely convinced with the end result yet, but maybe that's because this is only an RFC and doesn't handle the RPi controls yet. Laurent Pinchart (2): libcamera: Generate Control instances for V4L2 controls libcamera: Use V4L2 Control instances include/libcamera/internal/meson.build | 29 +++- .../libcamera/internal/v4l2_control_ids.h.in | 29 ++++ include/libcamera/internal/v4l2_controls.h | 2 + src/ipa/ipu3/ipu3.cpp | 10 +- src/ipa/raspberrypi/raspberrypi.cpp | 25 ++-- src/ipa/rkisp1/rkisp1.cpp | 10 +- src/libcamera/camera_sensor.cpp | 36 ++--- src/libcamera/meson.build | 8 +- src/libcamera/pipeline/ipu3/ipu3.cpp | 2 +- .../pipeline/raspberrypi/raspberrypi.cpp | 16 +-- src/libcamera/pipeline/uvcvideo/uvcvideo.cpp | 29 ++-- src/libcamera/pipeline/vimc/vimc.cpp | 10 +- src/libcamera/v4l2_control_ids.cpp.in | 34 +++++ src/libcamera/v4l2_control_ids.yaml | 62 +++++++++ utils/gen-v4l2-controls.py | 126 ++++++++++++++++++ utils/meson.build | 1 + 16 files changed, 351 insertions(+), 78 deletions(-) create mode 100644 include/libcamera/internal/v4l2_control_ids.h.in create mode 100644 src/libcamera/v4l2_control_ids.cpp.in create mode 100644 src/libcamera/v4l2_control_ids.yaml create mode 100755 utils/gen-v4l2-controls.py Reviewed-by: Kieran Bingham