From patchwork Mon Jan 31 22:33:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Scally X-Patchwork-Id: 15310 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 9FF5DBF415 for ; Mon, 31 Jan 2022 22:33:49 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 5C8FB609E8; Mon, 31 Jan 2022 23:33:49 +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="qWSnFyBJ"; dkim-atps=neutral Received: from mail-wr1-x432.google.com (mail-wr1-x432.google.com [IPv6:2a00:1450:4864:20::432]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 81A6B609D6 for ; Mon, 31 Jan 2022 23:33:46 +0100 (CET) Received: by mail-wr1-x432.google.com with SMTP id e8so28326509wrc.0 for ; Mon, 31 Jan 2022 14:33:46 -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=yFC5s+Pzgarvt9s+APTlL0sMrtYNwNCuu7nzx0YKnEQ=; b=qWSnFyBJEVRAbITvVhOQr2q7FS0USxZ9/MSMHeZVYmsxe7G96FL+ZsgDV5KrcRISZ3 YjvPOgLaY2j7Lv+kMbFaIttUfKdS+92b6uH09XP95p3TOwE3XJtfu3kc2BGtaPyW9WEt LMALMCIy4aS7tU8cPh/uxleHK3I7JeYMXXh0beH9oheN9KPIguikZesZFdPedGQcjQld dZ4N8DlEysvV5q1Oi0FPmTL027dbaO0s1vu5EwXKG/6BiLbdAV+2cjjBAOAlZKaPbP8U MkGxLZAcB+N/NmyIvNjNN0SEP5SieyYNc6spU7aVsucX2PTxCFkV3aiw7P9rEQlLxoB2 sASQ== 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=yFC5s+Pzgarvt9s+APTlL0sMrtYNwNCuu7nzx0YKnEQ=; b=tEehKVhGpuqzkSO7udg4d3ecx2X0PvMw337xtXAliPz8cTD6WhXsrbQ1w7eas/wRBp H4257Z5GjCudD8ZdynBmP2ojTmvph4cOy1xwqtsJzsO6zcb7IaU9UtEC58C4N/gv1Mf4 RMiou18fqYkdc/6nQXSAKwpmmD9dLYrlYwjjf2aQ+EaaV5apKQeX9oraFQJVBuDwAxKG FFaJ1Cu/CI0pBy15SRYTEY0eKRVPmzaqjbZTsN/1m90fvQXHQ47bW56pH1Y15+WRbwqZ K/HWFfB1C2hPbHdEbC8gp5mxVdhr8tme14mYhT1xzBEVDf3DJKN8AFlQemtq9vfuSnEA ymoQ== X-Gm-Message-State: AOAM533TIP/hhZ33+uj7PhZ60hw5lRLREWHCg2kI42KV4jHes/446hZ+ 9C0SclosKV0pMfRjC5pkZ7VZF+L4Fcg= X-Google-Smtp-Source: ABdhPJz0qFROFTUn+CWhFu0uQD7PSehdYFYqZZrA0Go2FSPjdI14BP2Na+neXTg5fm/kdJqy3J3jAg== X-Received: by 2002:adf:f8c6:: with SMTP id f6mr19286877wrq.290.1643668426330; Mon, 31 Jan 2022 14:33:46 -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 q2sm6986740wrw.14.2022.01.31.14.33.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Jan 2022 14:33:45 -0800 (PST) From: Daniel Scally To: libcamera-devel@lists.libcamera.org Date: Mon, 31 Jan 2022 22:33:26 +0000 Message-Id: <20220131223330.61563-6-djrscally@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220131223330.61563-1-djrscally@gmail.com> References: <20220131223330.61563-1-djrscally@gmail.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v4 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 since v4: - None 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 */