From patchwork Thu Mar 3 23:49:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Scally X-Patchwork-Id: 15412 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 1795CBE08A for ; Thu, 3 Mar 2022 23:50:22 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id B749E6117D; Fri, 4 Mar 2022 00:50:21 +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="qiX+h+Ic"; dkim-atps=neutral Received: from mail-wm1-x330.google.com (mail-wm1-x330.google.com [IPv6:2a00:1450:4864:20::330]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id DFBEF6115E for ; Fri, 4 Mar 2022 00:50:15 +0100 (CET) Received: by mail-wm1-x330.google.com with SMTP id i66so4061253wma.5 for ; Thu, 03 Mar 2022 15:50:15 -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=twowYbzifRY45WIFOEBJ8E7Wqy3IcerLbWOdfwHLE5A=; b=qiX+h+IcAFN0A3D19EfFx99ui4fN9Vm3Cd0KnV4Iv/mjIdAAPktaxbxc+q/mudw2aG G/vMqzum95RruyA/caF4Ha2FxRsF9swU7jzKVkSpGM3AKn1nN8/XY9JlohUDue8kjS1u 48tyb7GHzETKvDbo8pmU0vlz0oAQYgijmW/bg3x+YEsWdSJktCwCpoh4Zj6tr6I2dufw 0CwCGVOfI3fLNUBCZo8k3xgFYYAEbygzgvnPUgVYcFb0x2Ee49RNlDKrGOTuV+UFAlnh Xy4wiXIJAl//k0rq/WuRQEYkOdsKXBVPHswshNduL3BBa/mqrMMOb0oxDjXX6mG+0ISn lMIg== 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=twowYbzifRY45WIFOEBJ8E7Wqy3IcerLbWOdfwHLE5A=; b=vhJ9QLeRGQAkGcgqnptfsE8mkd+ejNsT7U/fpSaH1z67vcaIq0OEsbm7OVbjqxImHE pwQXMIEs+yTZZ6K48HVXOgpciAU7VOKLqWQbljJrZ3+VYoXtiRLdveewrijP6hz/nBhr FtABgLaZ3sBl4+qAvkktkVBnuVKsVrRhUxojFwI/EvShMHW5B5Q5wBhezqX1Mm9cKVvF jgi6RKFgEj3QiBRa5SWRbVfIRugZ7uX1GlCeD0wuUXdVLrqJHNoJyirNv5edpWRctyfr OMlg/xvKQsksH+OwmqVkxtZnOqIBkrta593vG3oPfpbmwppn4dghk2BXXpjpwAgOd0Av B2xg== X-Gm-Message-State: AOAM532Y8KwClHYrbqNqb45aGF+jKL5NLi7E3zlAkymiWMKBdGHOAykF K0dCFnIMcGH9ayb5Ix54e46kWvwmwWQLhA== X-Google-Smtp-Source: ABdhPJyq6mKQZ2Q6hfkreeOJqQGO8RsMt5o73LfdkZ6vJ1XQGWjlsf9A9LjTUguowUSk9fJJqpLLUQ== X-Received: by 2002:a05:600c:4401:b0:387:1bcb:af41 with SMTP id u1-20020a05600c440100b003871bcbaf41mr5191796wmn.101.1646351415695; Thu, 03 Mar 2022 15:50:15 -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 y4-20020adff144000000b001f022290737sm3079779wro.6.2022.03.03.15.50.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Mar 2022 15:50:15 -0800 (PST) From: Daniel Scally To: libcamera-devel@lists.libcamera.org Date: Thu, 3 Mar 2022 23:49:52 +0000 Message-Id: <20220303234956.1463551-6-djrscally@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220303234956.1463551-1-djrscally@gmail.com> References: <20220303234956.1463551-1-djrscally@gmail.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v5 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 Reviewed-by: Jean-Michel Hautbois --- Changes in v5: - None 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 */