From patchwork Fri Dec 3 22:42:27 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Scally X-Patchwork-Id: 15034 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 383E2C3250 for ; Fri, 3 Dec 2021 22:42:43 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id B36AB60839; Fri, 3 Dec 2021 23:42:42 +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="ZF4FovKS"; dkim-atps=neutral Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com [IPv6:2a00:1450:4864:20::431]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id CBD8A60839 for ; Fri, 3 Dec 2021 23:42:39 +0100 (CET) Received: by mail-wr1-x431.google.com with SMTP id u17so1356889wrt.3 for ; Fri, 03 Dec 2021 14:42:39 -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=eUYEpbXyFsFKyKfSIdfaLFVI3cENzDs1rMMecgrfghk=; b=ZF4FovKSbtLK4mr6hJqr5lsxqdR/eYNoCN3DIep/lJRuD8Ci2G/4M6yVDKgP88lvvS iJ22EM/ozjNBBhGnWz8GYE10vgMOSqSneN4gBb+gze+6eniMFQuufjQlD0G1Gu3JWiHB FRCI0TWr35ma8fgEvZii1uH5btHJqtRoqDMuq5L4IalGZB8Rf6dL0lER6OCEF4ca/Y0V S7nJsbymqFVTRY1SbFICflm9J2Qb3V/o2zQPuZhhXyNpAycP8Gn3gfZwvXJW+8i4DyPr yHtW452p728+kL7xdKE6FMfwpdSxj9rUlyZKEX/QDZD0D0SdV4uPhoyFY25BFc5s14rj 5ezQ== 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=eUYEpbXyFsFKyKfSIdfaLFVI3cENzDs1rMMecgrfghk=; b=h8fpT4bKO9mYVNo5THBfDBsj4E30wOeIOdqmiDAo5QYjAfaB1hDPHzaLMJNUcxIMFt e0zxLHaTJ/C36fX9ZtbCskHZMeUc3oCPP60g2ff8IhSzvCLpIUyVakF4Y+YRZPUAbv9y OQTQSALva5cme0BLAJLyx/pbjCaLMU0Bu+DDDaX/6cTMiCk3BIfYN3ZXOuaO/BjgEY/y EYVhzTOkWMyogehSowVOlXn95YaKI2L0l33z3I505qJXTyL5eq2Kb7Yy0ZYkU2B+owSw o3HuZAbqdKIRcVBwo8S6xCc1HNFeodOpystxm96qY/yjmydsg4/2KoG2xeDzUvPrBKTl r8Xg== X-Gm-Message-State: AOAM533TBro/o6GrT2Gmq415XOQYERojjYs7vmLqCo/yCPZI5L3MtCle QMFSdteFz9wr+qe6TAaNcimrAh4h73U= X-Google-Smtp-Source: ABdhPJz2jgdmikadLUSy7ELyNpmlAkflZ+rlCKcM+llUmjYGejAF0d3C2dFvSp2yJj+5Q7yWCWhvHQ== X-Received: by 2002:adf:cf05:: with SMTP id o5mr24787322wrj.325.1638571359600; Fri, 03 Dec 2021 14:42:39 -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 o25sm3939919wms.17.2021.12.03.14.42.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Dec 2021 14:42:39 -0800 (PST) From: Daniel Scally To: libcamera-devel@lists.libcamera.org Date: Fri, 3 Dec 2021 22:42:27 +0000 Message-Id: <20211203224230.38700-5-djrscally@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211203224230.38700-1-djrscally@gmail.com> References: <20211203224230.38700-1-djrscally@gmail.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 4/7] 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 Signed-off-by: Daniel Scally Reviewed-by: Laurent Pinchart --- Changes in v2: - New patch 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..7b3b9c24 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 sensor + */ +const ControlInfoMap &CameraLens::controls() const +{ + return subdev_->controls(); +} + } /* namespace libcamera */