From patchwork Sat Jan 16 11:48:02 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Niklas_S=C3=B6derlund?= X-Patchwork-Id: 10878 X-Patchwork-Delegate: niklas.soderlund@ragnatech.se 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 DD747C0F1D for ; Sat, 16 Jan 2021 11:48:22 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id AAF2168123; Sat, 16 Jan 2021 12:48:22 +0100 (CET) Received: from bin-mail-out-06.binero.net (bin-mail-out-06.binero.net [195.74.38.229]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 514706810C for ; Sat, 16 Jan 2021 12:48:21 +0100 (CET) X-Halon-ID: bac20099-57f0-11eb-a076-005056917f90 Authorized-sender: niklas.soderlund@fsdn.se Received: from bismarck.berto.se (p4fca2458.dip0.t-ipconnect.de [79.202.36.88]) by bin-vsp-out-02.atm.binero.net (Halon) with ESMTPA id bac20099-57f0-11eb-a076-005056917f90; Sat, 16 Jan 2021 12:48:20 +0100 (CET) From: =?utf-8?q?Niklas_S=C3=B6derlund?= To: libcamera-devel@lists.libcamera.org Date: Sat, 16 Jan 2021 12:48:02 +0100 Message-Id: <20210116114805.905397-6-niklas.soderlund@ragnatech.se> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210116114805.905397-1-niklas.soderlund@ragnatech.se> References: <20210116114805.905397-1-niklas.soderlund@ragnatech.se> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v5 5/8] libcamera: camera_sensor: Expose the camera device 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" Expose the device backing the CameraSensor instance. Signed-off-by: Niklas Söderlund Reviewed-by: Jacopo Mondi Reviewed-by: Laurent Pinchart --- * Changes since v4 - Add a \todo * Changes since v3 - New, needed to be able to move the DelayedControls handling out of CameraSensor. --- include/libcamera/internal/camera_sensor.h | 2 ++ src/libcamera/camera_sensor.cpp | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/include/libcamera/internal/camera_sensor.h b/include/libcamera/internal/camera_sensor.h index f80d836161a564e7..a70e024aa327f69b 100644 --- a/include/libcamera/internal/camera_sensor.h +++ b/include/libcamera/internal/camera_sensor.h @@ -61,6 +61,8 @@ public: ControlList getControls(const std::vector &ids); int setControls(ControlList *ctrls); + V4L2Subdevice *device() { return subdev_.get(); } + const ControlList &properties() const { return properties_; } int sensorInfo(CameraSensorInfo *info) const; diff --git a/src/libcamera/camera_sensor.cpp b/src/libcamera/camera_sensor.cpp index e786821d4ba22fb8..8c00e1f8289b88fe 100644 --- a/src/libcamera/camera_sensor.cpp +++ b/src/libcamera/camera_sensor.cpp @@ -514,6 +514,13 @@ ControlList CameraSensor::getControls(const std::vector &ids) return subdev_->getControls(ids); } +/** + * \fn CameraSensor::device() + * \brief Retrieve the camera sensor device + * \todo Remove this function by integrating DelayedControl with CameraSensor + * \return The camera sensor device + */ + /** * \fn CameraSensor::properties() * \brief Retrieve the camera sensor properties