From patchwork Mon Jun 10 16:40:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 1381 Return-Path: Received: from relay10.mail.gandi.net (relay10.mail.gandi.net [217.70.178.230]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 8B699635DC for ; Mon, 10 Jun 2019 18:39:45 +0200 (CEST) Received: from uno.lan (2-224-242-101.ip172.fastwebnet.it [2.224.242.101]) (Authenticated sender: jacopo@jmondi.org) by relay10.mail.gandi.net (Postfix) with ESMTPSA id 27EE4240008; Mon, 10 Jun 2019 16:39:44 +0000 (UTC) From: Jacopo Mondi To: libcamera-devel@lists.libcamera.org Date: Mon, 10 Jun 2019 18:40:46 +0200 Message-Id: <20190610164052.30741-1-jacopo@jmondi.org> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 0/6] [TEMP] Add support for V4L2 Controls X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Jun 2019 16:39:45 -0000 Hello, first of all, this series is half-backed, sorry about this. I'm sending it out in this not-ready-to-merge state to ask for a validation of the interface, as it sits between what I had in v1 and what has been suggested during review by Laurent and Kieran. You should basically look into the last two patches to have a taste of the interface and look at 3/6 to check out the V4L2Controls wrapper implementation. I still have to address comments on V4L2Base, on patch 1/6 and a few things on 3/6 (like not quering controls everytime they are get or set). As I've said, this is just to have feedback on the user interface. On the back storage and the V4L2ControlValue vs ControlValue discussion, I really don't care much. I consider the template version more felxible, and the proxy class hides from the extern the casts, providing a series of getInt() getBool() etc methods. Memory is managed by the V4L2Controls class and by the V4L2Base::setControls() and V4L2Base::getControls() methods, so it should not cause issues for the users. As soon as I receive comments on the API, I'll fix the remaining parts and eventually send for inclusion. Tested on IPU3 Soraka. Thanks j Jacopo Mondi (6): libcamera: camera_sensor: Add dev() operation libcamera: Provide a V4L2Base class libcamera: Add V4L2Controls libcamera: v4l2_base: Add V4L2 control support libcamera: ipu3: Set pipe_mode based on stream configuration [HACK] ipu3: Set and get a few sensor controls src/libcamera/camera_sensor.cpp | 6 + src/libcamera/include/camera_sensor.h | 1 + src/libcamera/include/v4l2_base.h | 42 ++ src/libcamera/include/v4l2_controls.h | 210 ++++++++ src/libcamera/include/v4l2_device.h | 9 +- src/libcamera/include/v4l2_subdevice.h | 9 +- src/libcamera/meson.build | 3 + src/libcamera/pipeline/ipu3/ipu3.cpp | 109 +++++ src/libcamera/v4l2_base.cpp | 302 ++++++++++++ src/libcamera/v4l2_controls.cpp | 632 +++++++++++++++++++++++++ src/libcamera/v4l2_device.cpp | 13 +- src/libcamera/v4l2_subdevice.cpp | 12 +- 12 files changed, 1318 insertions(+), 30 deletions(-) create mode 100644 src/libcamera/include/v4l2_base.h create mode 100644 src/libcamera/include/v4l2_controls.h create mode 100644 src/libcamera/v4l2_base.cpp create mode 100644 src/libcamera/v4l2_controls.cpp --- 2.21.0