From patchwork Tue Jul 20 10:12:58 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Elder X-Patchwork-Id: 13049 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 C8776C0109 for ; Tue, 20 Jul 2021 10:13:21 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 41E0268521; Tue, 20 Jul 2021 12:13:21 +0200 (CEST) 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="F6LRmrMJ"; 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 E94AE68521 for ; Tue, 20 Jul 2021 12:13:19 +0200 (CEST) Received: from pyrite.rasen.tech (unknown [IPv6:2400:4051:61:600:2c71:1b79:d06d:5032]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 63A67443; Tue, 20 Jul 2021 12:13:18 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1626775999; bh=yxu07AqL6DgMuYPxflqhd61p4ZaJjW6dRzvfbpTERE4=; h=From:To:Cc:Subject:Date:From; b=F6LRmrMJt5GuTODpZgDU67fEd6CcwR3KOTf4DBueHpHroBH8+wxi5EvuhhrRoxPpW FzicXpgz8JI8Eg26g7L4h0yDqOvhZPopU+fZpkM5t8R72Ndp/4QhX+kM3jxf5KbwbU kCUtQ4YWjqnu5nBmz24HAoqcyOePJ+7oIDOMoTSE= From: Paul Elder To: libcamera-devel@lists.libcamera.org Date: Tue, 20 Jul 2021 19:12:58 +0900 Message-Id: <20210720101307.26010-1-paul.elder@ideasonboard.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v5 0/9] android: Support capability and hardware level detection 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" Used to be "Preliminary FULL plumbing" We've graduated from RFC and "preliminary"! \o/ This series depends on "android: Drive-by cleanups". This patch series adds support for capability and hardware level detection. It also adds the MaxLatency (SYNC_MAX_LATENCY) control. I've split out this series from the old one as I want this half merged first. I think it'll take at least another version, though. New in v3, 1/9 adds a constructor for ControlInfo that takes boolean values. In v4, this has been upgraded so that it actually works. In v5 it has been cleaned (?) a bit. New in v4, 2/9 adds convenience functions to CameraMetadata, and 3/9 fixes some templates in CameraMetadata. Patch 5/9 has the plumbing for capability detection. New in v4, at the end we tally up all the requirements to enable capabilities, instead of turning them off as we set the static metadata. This cleans up the code a lot New in v3, patch 6/9 adds helpers for setting android metadata for libcamera controls, to help keep the HAL capability tracking cleaner. New in v4, patch 7/9 moves static and request and result keys into a set and member variable of CameraCapabilities, to ease adding new controls later. New in v4, patch 8/9 adds skeletal manual and still request templates. Patch 9/9 adds the MaxLatency control, and plumbs it into the capabilities. Paul Elder (9): controls: Add boolean constructors for ControlInfo android: metadata: Add hasEntry and entryContains android: metadata: Fix addEntry template type android: jpeg: get ISO from SENSOR_SENSITIVITY android: Add infrastructure for determining capabilities and hardware level android: Add helpers for setting android metadata from libcamera controls android: capabilities: Make keys list into set and member variable android: Add skeletal still and manual request templates android, controls: Add and plumb MaxLatency control include/libcamera/controls.h | 3 + src/android/camera_capabilities.cpp | 602 +++++++++++++++++------ src/android/camera_capabilities.h | 19 + src/android/camera_device.cpp | 7 +- src/android/camera_metadata.cpp | 18 + src/android/camera_metadata.h | 17 +- src/android/jpeg/post_processor_jpeg.cpp | 5 +- src/libcamera/control_ids.yaml | 10 + src/libcamera/controls.cpp | 29 ++ test/controls/control_info.cpp | 33 ++ 10 files changed, 592 insertions(+), 151 deletions(-)