Patch Detail
Show a patch.
GET /api/patches/12077/?format=api
{ "id": 12077, "url": "https://patchwork.libcamera.org/api/patches/12077/?format=api", "web_url": "https://patchwork.libcamera.org/patch/12077/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/projects/1/?format=api", "name": "libcamera", "link_name": "libcamera", "list_id": "libcamera_core", "list_email": "libcamera-devel@lists.libcamera.org", "web_url": "", "scm_url": "", "webscm_url": "" }, "msgid": "<20210422094102.371772-11-paul.elder@ideasonboard.com>", "date": "2021-04-22T09:41:00", "name": "[libcamera-devel,RFC,v2,10/12] android: camera_device: Translate android controls to libcamera controls", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "aefb45bc124a53fe7c9c48268939ff5e3ca6a8db", "submitter": { "id": 17, "url": "https://patchwork.libcamera.org/api/people/17/?format=api", "name": "Paul Elder", "email": "paul.elder@ideasonboard.com" }, "delegate": { "id": 17, "url": "https://patchwork.libcamera.org/api/users/17/?format=api", "username": "epaul", "first_name": "Paul", "last_name": "Elder", "email": "paul.elder@ideasonboard.com" }, "mbox": "https://patchwork.libcamera.org/patch/12077/mbox/", "series": [ { "id": 1962, "url": "https://patchwork.libcamera.org/api/series/1962/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=1962", "date": "2021-04-22T09:40:50", "name": "FULL hardware level fixes", "version": 2, "mbox": "https://patchwork.libcamera.org/series/1962/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/12077/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/12077/checks/", "tags": {}, "headers": { "Return-Path": "<libcamera-devel-bounces@lists.libcamera.org>", "X-Original-To": "parsemail@patchwork.libcamera.org", "Delivered-To": "parsemail@patchwork.libcamera.org", "Received": [ "from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 2CEE4BDB17\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 22 Apr 2021 09:41:34 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id AF63E68865;\n\tThu, 22 Apr 2021 11:41:33 +0200 (CEST)", "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id AF47A6883E\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 22 Apr 2021 11:41:30 +0200 (CEST)", "from pyrite.rasen.tech (unknown\n\t[IPv6:2400:4051:61:600:2c71:1b79:d06d:5032])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 707863EE;\n\tThu, 22 Apr 2021 11:41:29 +0200 (CEST)" ], "Authentication-Results": "lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"iPcup3IU\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1619084490;\n\tbh=u/VhtE817BG5sUZK4UJUd8b8nK3Jeg1JwwZWsNU1cBk=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=iPcup3IU5j3dvfVdOcpKKuhj8f1t5MqRzuwIK9mhWpAIH6vAMeaoYBj+ZJLD/gPPd\n\tqu33od9yPHzU6KTSgfwRpX7CJOEcIH6rx5DXHKbY83y1lWI7robZ8gLe9zhWpYYzfK\n\t0FjrlIXuqq/dZJmpOSWzSKBjeJZcz9KEDfvQE4x0=", "From": "Paul Elder <paul.elder@ideasonboard.com>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Thu, 22 Apr 2021 18:41:00 +0900", "Message-Id": "<20210422094102.371772-11-paul.elder@ideasonboard.com>", "X-Mailer": "git-send-email 2.27.0", "In-Reply-To": "<20210422094102.371772-1-paul.elder@ideasonboard.com>", "References": "<20210422094102.371772-1-paul.elder@ideasonboard.com>", "MIME-Version": "1.0", "Subject": "[libcamera-devel] [RFC PATCH v2 10/12] android: camera_device:\n\tTranslate android controls to libcamera controls", "X-BeenThere": "libcamera-devel@lists.libcamera.org", "X-Mailman-Version": "2.1.29", "Precedence": "list", "List-Id": "<libcamera-devel.lists.libcamera.org>", "List-Unsubscribe": "<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>", "List-Archive": "<https://lists.libcamera.org/pipermail/libcamera-devel/>", "List-Post": "<mailto:libcamera-devel@lists.libcamera.org>", "List-Help": "<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>", "List-Subscribe": "<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>", "Content-Type": "text/plain; charset=\"us-ascii\"", "Content-Transfer-Encoding": "7bit", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "Translate the newly added android controls that are required to FULL\ncompliance into libcamera controls before sending them to the Camera.\n\nSigned-off-by: Paul Elder <paul.elder@ideasonboard.com>\n---\n src/android/camera_device.cpp | 33 ++++++++++++++++++++++++++++++++-\n 1 file changed, 32 insertions(+), 1 deletion(-)", "diff": "diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp\nindex 99c67555..30692a67 100644\n--- a/src/android/camera_device.cpp\n+++ b/src/android/camera_device.cpp\n@@ -2136,15 +2136,46 @@ int CameraDevice::processControls(Camera3RequestDescriptor *descriptor)\n \n \t/* Translate the Android request settings to libcamera controls. */\n \tcamera_metadata_ro_entry_t entry;\n+\tControlList &controls = descriptor->request_->controls();\n+\n \tif (settings.getEntry(ANDROID_SCALER_CROP_REGION, &entry)) {\n \t\tconst int32_t *data = entry.data.i32;\n \t\tRectangle cropRegion{ data[0], data[1],\n \t\t\t\t static_cast<unsigned int>(data[2]),\n \t\t\t\t static_cast<unsigned int>(data[3]) };\n-\t\tControlList &controls = descriptor->request_->controls();\n \t\tcontrols.set(controls::ScalerCrop, cropRegion);\n \t}\n \n+\tif (settings.getEntry(ANDROID_SENSOR_EXPOSURE_TIME, &entry))\n+\t\tcontrols.set(controls::ExposureTime, *entry.data.i64 / 1000ULL);\n+\n+\tif (settings.getEntry(ANDROID_BLACK_LEVEL_LOCK, &entry))\n+\t\tcontrols.set(controls::draft::BlackLevelLocked, *entry.data.u8);\n+\n+\tif (settings.getEntry(ANDROID_CONTROL_AE_LOCK, &entry))\n+\t\tcontrols.set(controls::AeLocked, *entry.data.u8);\n+\n+\tif (settings.getEntry(ANDROID_CONTROL_AE_PRECAPTURE_TRIGGER, &entry))\n+\t\tcontrols.set(controls::draft::AePrecaptureTrigger, *entry.data.u8);\n+\n+\tif (settings.getEntry(ANDROID_CONTROL_AWB_MODE, &entry))\n+\t\tcontrols.set(controls::AwbMode, *entry.data.u8);\n+\n+\tif (settings.getEntry(ANDROID_CONTROL_AWB_LOCK, &entry))\n+\t\tcontrols.set(controls::AwbLocked, *entry.data.u8);\n+\n+\tif (settings.getEntry(ANDROID_EDGE_MODE, &entry))\n+\t\tcontrols.set(controls::draft::EdgeMode, *entry.data.u8);\n+\n+\tif (settings.getEntry(ANDROID_NOISE_REDUCTION_MODE, &entry))\n+\t\tcontrols.set(controls::draft::NoiseReductionMode, *entry.data.u8);\n+\n+\tif (settings.getEntry(ANDROID_SENSOR_SENSITIVITY, &entry))\n+\t\tcontrols.set(controls::draft::SensorSensitivity, *entry.data.i32);\n+\n+\tif (settings.getEntry(ANDROID_TONEMAP_MODE, &entry))\n+\t\tcontrols.set(controls::draft::TonemapMode, *entry.data.u8);\n+\n \treturn 0;\n }\n \n", "prefixes": [ "libcamera-devel", "RFC", "v2", "10/12" ] }