From patchwork Thu Jun 20 15:31:38 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 1483 Return-Path: Received: from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net [217.70.183.193]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 88C5960BA1 for ; Thu, 20 Jun 2019 17:30:40 +0200 (CEST) X-Originating-IP: 2.224.242.101 Received: from uno.lan (2-224-242-101.ip172.fastwebnet.it [2.224.242.101]) (Authenticated sender: jacopo@jmondi.org) by relay1-d.mail.gandi.net (Postfix) with ESMTPSA id DD0DF240015; Thu, 20 Jun 2019 15:30:39 +0000 (UTC) From: Jacopo Mondi To: libcamera-devel@lists.libcamera.org Date: Thu, 20 Jun 2019 17:31:38 +0200 Message-Id: <20190620153144.5394-1-jacopo@jmondi.org> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v5 0/6] 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: Thu, 20 Jun 2019 15:30:40 -0000 Hello, quite a few changes compared to v4, mostly on the V4L2Control and V4L2Controls side to work around the badly performing get() and set() methods implemented in v4. - Remove V4L2Controls::get() and set() as they iterated on the controls vector unecessarly - By removing 'set()' now control cannot be updated and reused - Make the operations to set and get a V4L2Control value public, to avoid having to access them through the V4L2Controls class - Change return of V4L2Device::s/getControls() to signal which control failed - Documentation improvements as suggested by Laurent. I have not taken in changes to the vector of controls in V4L2Controls after the discussion in mailing list. I would also like to provide a test, but VIMC has no control. VIVID has many, but iirc we deprecated VIVID in favour of VIMC everywhere we could. An example of the new API is provided in 6/6. Thanks j Jacopo Mondi (6): libcamera: Add V4L2Controls libcamera: v4l2_device: List valid controls at open libcamera: v4l2_device: Implement get and set controls libcamera: camera_sensor: Add V4L2 control operations libcamera: ipu3: Set pipe_mode based on stream configuration [HACK] ipu3: Set and get a few sensor controls src/libcamera/camera_sensor.cpp | 65 ++++++ src/libcamera/include/camera_sensor.h | 6 + src/libcamera/include/v4l2_controls.h | 86 ++++++++ src/libcamera/include/v4l2_device.h | 12 ++ src/libcamera/meson.build | 1 + src/libcamera/pipeline/ipu3/ipu3.cpp | 59 ++++++ src/libcamera/v4l2_controls.cpp | 282 ++++++++++++++++++++++++++ src/libcamera/v4l2_device.cpp | 265 ++++++++++++++++++++++++ 8 files changed, 776 insertions(+) create mode 100644 src/libcamera/include/v4l2_controls.h create mode 100644 src/libcamera/v4l2_controls.cpp --- 2.21.0