From patchwork Sun Jun 2 13:04:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 1329 Return-Path: Received: from relay11.mail.gandi.net (relay11.mail.gandi.net [217.70.178.231]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 2D56260BFA for ; Sun, 2 Jun 2019 15:03:42 +0200 (CEST) Received: from uno.homenet.telecomitalia.it (unknown [79.35.79.123]) (Authenticated sender: jacopo@jmondi.org) by relay11.mail.gandi.net (Postfix) with ESMTPSA id 85118100004; Sun, 2 Jun 2019 13:03:41 +0000 (UTC) From: Jacopo Mondi To: libcamera-devel@lists.libcamera.org Date: Sun, 2 Jun 2019 15:04:29 +0200 Message-Id: <20190602130435.18780-1-jacopo@jmondi.org> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 0/6] libcamera: v4l2_controls: 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: Sun, 02 Jun 2019 13:03:42 -0000 Hello, this series implement support for V4L2 Controls through the V4L2 Extended Controls APIs. The series provide a base class for V4L2Device and V4L2Subdevice where the control support will be implemented, as it is common between devices and subdevices. After this, V4L2Controls are defined, by using a base template class specialized by derived classes meant to be used to access the control value. Using the defined data types, support to get and set a single or a list of controls is added to the V4L2base class, to be shared by both V4L2Device and V4L2Subdevice implementations. Finally, controls are used to set the IPU3 pipe mode, and in a final example patch not meant to be merged a list of control is applied to the camera sensor. Tested on IPU3 Soraka, by inspecting the control values before and after running the IPU3 pipeline handler. 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 | 43 +++ src/libcamera/include/v4l2_controls.h | 147 ++++++++++ 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 | 116 ++++++++ src/libcamera/v4l2_base.cpp | 354 +++++++++++++++++++++++++ src/libcamera/v4l2_controls.cpp | 301 +++++++++++++++++++++ src/libcamera/v4l2_device.cpp | 13 +- src/libcamera/v4l2_subdevice.cpp | 12 +- 12 files changed, 984 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