From patchwork Tue Dec 7 22:45:08 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Scally X-Patchwork-Id: 15071 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 92EC3C3258 for ; Tue, 7 Dec 2021 22:45:37 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 0E7C36088B; Tue, 7 Dec 2021 23:45:37 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="QE2gnC0+"; dkim-atps=neutral Received: from mail-wr1-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 1A5F4605C4 for ; Tue, 7 Dec 2021 23:45:32 +0100 (CET) Received: by mail-wr1-x436.google.com with SMTP id v11so708378wrw.10 for ; Tue, 07 Dec 2021 14:45:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=s40Qz5XU25p4IgxDODpNYrDcHg3dsmQPysJpPQyJVNo=; b=QE2gnC0+MAV1TCRswDFTd52LSM5G1Um9QeQGC4+Efm4M6At0QDk73SaXfJ6X7SXbr8 NIO70OXoNm+iddP/2xlkeVZiB84N5pPRuj/CXhV6/3MtzzXBXgnsJfToEFFZ20sgt5aX NX51ZK5QVTEf78NKIMov95tap21ir+dcBrtOgGhukDrcsgnj79lpPL4uU92HXoTMm90r eR/Dm8HDY6EgtgJMG8GJKZYgFe7sgyJ+OBhVSnYSyTlk9P/tzew+UVoeQxxMeW23SpR8 nVL/u9tCt+9Ac2otqog1r4KnhdWhsxOrierwtGUpHhnf7sHuvcLzaGAF1CreCBJyB6BN lgmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=s40Qz5XU25p4IgxDODpNYrDcHg3dsmQPysJpPQyJVNo=; b=CV8E9fN8Ify7PX4x6FRwV9QxV0jhvyNQzsNjvNyz1QUsN3RYu8Aoet55udUAYnxtyZ vqaGjdgVzMXmgZYUG40sqJCwygdkWvKUU/v1aPl6ULjMOxVq+5O6p85zNNCoJ3ZMj91Q 4ae+HCd4m2GLvDhqTdc8wGW16OFWaTAYmx9ft0eIo+WXjbhqEq84qfmMBO6fD5oA2o1k tO1qLLTFezQW/5vnJ7uCUYaUVO+MB8eXb7jS6nVMFa5N/YCRyV70oyxPwFdpq2j6WFr2 LsWm39soY6qLD6xNC1kpKj3EfojMSzxqriCdPw9Hs9ZXVyF+XD4wB90Jze1CbFzFfIXe SEgQ== X-Gm-Message-State: AOAM532Qpusli6lyPjWsFdWIxfv1GRilg26f5EUO+JWqoYafVQ9E3m4Z 2EfKnwWXMSEhd378zYU+Hnwc5tm8W8g= X-Google-Smtp-Source: ABdhPJwemRCn6JPGWRNo5r1CrC2ZQvW/WRxHfPnr4f00xlmax9eiiaGnhr3C0ZE8C0lvQo8dp2wZCA== X-Received: by 2002:adf:e5c7:: with SMTP id a7mr55542706wrn.318.1638917131917; Tue, 07 Dec 2021 14:45:31 -0800 (PST) Received: from localhost.localdomain (cpc141996-chfd3-2-0-cust928.12-3.cable.virginm.net. [86.13.91.161]) by smtp.gmail.com with ESMTPSA id y12sm980332wrn.73.2021.12.07.14.45.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Dec 2021 14:45:31 -0800 (PST) From: Daniel Scally To: libcamera-devel@lists.libcamera.org Date: Tue, 7 Dec 2021 22:45:08 +0000 Message-Id: <20211207224512.753979-6-djrscally@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211207224512.753979-1-djrscally@gmail.com> References: <20211207224512.753979-1-djrscally@gmail.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v3 5/9] libcamera: camera_lens: Add function to fetch subdev 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" Add a function to the CameraLens class to fetch the V4L2 controls for its V4L2 subdev Reviewed-by: Laurent Pinchart Signed-off-by: Daniel Scally --- Changes in v3: - s/sensor/lens include/libcamera/internal/camera_lens.h | 4 ++++ src/libcamera/camera_lens.cpp | 11 +++++++++++ 2 files changed, 15 insertions(+) diff --git a/include/libcamera/internal/camera_lens.h b/include/libcamera/internal/camera_lens.h index 6f2ea1bc..64794294 100644 --- a/include/libcamera/internal/camera_lens.h +++ b/include/libcamera/internal/camera_lens.h @@ -12,6 +12,8 @@ #include #include +#include + namespace libcamera { class MediaEntity; @@ -28,6 +30,8 @@ public: const std::string &model() const { return model_; } + const ControlInfoMap &controls() const; + protected: std::string logPrefix() const override; diff --git a/src/libcamera/camera_lens.cpp b/src/libcamera/camera_lens.cpp index 189cb025..142390ed 100644 --- a/src/libcamera/camera_lens.cpp +++ b/src/libcamera/camera_lens.cpp @@ -139,4 +139,15 @@ std::string CameraLens::logPrefix() const return "'" + entity_->name() + "'"; } +/** + * \fn CameraLens::controls() + * \brief Retrieve the V4L2 controls of the lens' subdev + * + * \return A map of the V4L2 controls supported by the lens' driver + */ +const ControlInfoMap &CameraLens::controls() const +{ + return subdev_->controls(); +} + } /* namespace libcamera */