From patchwork Thu Nov 18 09:52:40 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Elder X-Patchwork-Id: 14623 X-Patchwork-Delegate: paul.elder@ideasonboard.com 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 029B4BF415 for ; Thu, 18 Nov 2021 09:52:55 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 175846033C; Thu, 18 Nov 2021 10:52:55 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="EFWWq5oM"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 54DEB60230 for ; Thu, 18 Nov 2021 10:52:53 +0100 (CET) Received: from pyrite.rasen.tech (unknown [IPv6:2400:4051:61:600:2c71:1b79:d06d:5032]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id C5D953E5; Thu, 18 Nov 2021 10:52:51 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1637229173; bh=CJc0GAlFgW/fps2dg901cwlW6F50DebVski+zDK5uyc=; h=From:To:Cc:Subject:Date:From; b=EFWWq5oMJhfW7gT6VYbdQLkKJbfWWZwKMMHkAyEFyfVlrC8FcyJXIEaPFtGI7Lxsb Pa5sBHhaZ/hsoCG22qpZdUGYQ/wdlCViNgRXfd/RXHKfeINa+CsuvcqYbokdq2OYtI 98AJVMJ/w4Zuap6X3YwEw3lQjTm/9cofmIxmEjgo= From: Paul Elder To: libcamera-devel@lists.libcamera.org Date: Thu, 18 Nov 2021 18:52:40 +0900 Message-Id: <20211118095240.358827-1-paul.elder@ideasonboard.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH] android: capabilities: Add exposure time keys only if available 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" The exposure time range static metadata key and the exposure time request and result keys are not required for non-FULL hardware levels. Since we already have checks for them in the capability detector, only add them if the libcamera camera supports it. Signed-off-by: Paul Elder Reviewed-by: Kieran Bingham Reviewed-by: Umang Jain --- src/android/camera_capabilities.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/android/camera_capabilities.cpp b/src/android/camera_capabilities.cpp index 6e46f163..105d5b4f 100644 --- a/src/android/camera_capabilities.cpp +++ b/src/android/camera_capabilities.cpp @@ -812,7 +812,6 @@ int CameraCapabilities::initializeStaticMetadata() ANDROID_SENSOR_AVAILABLE_TEST_PATTERN_MODES, ANDROID_SENSOR_INFO_ACTIVE_ARRAY_SIZE, ANDROID_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT, - ANDROID_SENSOR_INFO_EXPOSURE_TIME_RANGE, ANDROID_SENSOR_INFO_MAX_FRAME_DURATION, ANDROID_SENSOR_INFO_PHYSICAL_SIZE, ANDROID_SENSOR_INFO_PIXEL_ARRAY_SIZE, @@ -890,7 +889,6 @@ int CameraCapabilities::initializeStaticMetadata() ANDROID_NOISE_REDUCTION_MODE, ANDROID_REQUEST_PIPELINE_DEPTH, ANDROID_SCALER_CROP_REGION, - ANDROID_SENSOR_EXPOSURE_TIME, ANDROID_SENSOR_FRAME_DURATION, ANDROID_SENSOR_ROLLING_SHUTTER_SKEW, ANDROID_SENSOR_TEST_PATTERN_MODE, @@ -1106,6 +1104,10 @@ int CameraCapabilities::initializeStaticMetadata() staticMetadata_->addEntry(ANDROID_SENSOR_INFO_EXPOSURE_TIME_RANGE, exposureTimeRange, 2); + + availableCharacteristicsKeys_.insert(ANDROID_SENSOR_INFO_EXPOSURE_TIME_RANGE); + availableRequestKeys_.insert(ANDROID_SENSOR_EXPOSURE_TIME); + availableResultKeys_.insert(ANDROID_SENSOR_EXPOSURE_TIME); } staticMetadata_->addEntry(ANDROID_SENSOR_ORIENTATION, orientation_);