Patch Detail
Show a patch.
GET /api/1.1/patches/15516/?format=api
{ "id": 15516, "url": "https://patchwork.libcamera.org/api/1.1/patches/15516/?format=api", "web_url": "https://patchwork.libcamera.org/patch/15516/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/1.1/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": "<20220323133622.61593-3-jeanmichel.hautbois@ideasonboard.com>", "date": "2022-03-23T13:36:21", "name": "[libcamera-devel,RFC,2/3] libcamera: raspberrypi: Control the lens from pipeline", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "aa5a5ad51db29c68d8e6ac2857097fee63d8150b", "submitter": { "id": 75, "url": "https://patchwork.libcamera.org/api/1.1/people/75/?format=api", "name": "Jean-Michel Hautbois", "email": "jeanmichel.hautbois@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/15516/mbox/", "series": [ { "id": 2988, "url": "https://patchwork.libcamera.org/api/1.1/series/2988/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=2988", "date": "2022-03-23T13:36:19", "name": "RPi: Introduce AF algorithm", "version": 1, "mbox": "https://patchwork.libcamera.org/series/2988/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/15516/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/15516/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 5C110C3264\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 23 Mar 2022 13:36:31 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id E0EAB604DB;\n\tWed, 23 Mar 2022 14:36:29 +0100 (CET)", "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id EF226604D5\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 23 Mar 2022 14:36:26 +0100 (CET)", "from tatooine.ideasonboard.com (unknown\n\t[IPv6:2a01:e0a:169:7140:2e05:b10:1542:d51b])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id ACA9F1645;\n\tWed, 23 Mar 2022 14:36:26 +0100 (CET)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1648042589;\n\tbh=EA287Hwt5glVUgdzaeQKWcbKnnGZWRTVqjWta/B9euI=;\n\th=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=gilN7xxpxirbM8goI9w1uV9x/GEX3AJPKKLT0Z2+2uwFR//vZeNtDRq/JAdM0zQoD\n\t8iOjF+SEK+e/NgzIXEz2p/IMTxwFUAD7B92mmuPGhT6IVhDFIvSDwTyC2q31rgQkv1\n\tCD0hYZJGyUWPJ1eg4iDqwi1K4/GEsjkk4XVDsai9aE2bvSyT2bTus1P9a/8aHNI3Xl\n\tDZJkV/ZVxWyNwANQmuUhRJthGVAeNWDthzdEFfWfoKQRooF+S40wOY2pWyUWfJYmFk\n\tfKr0iqmYRL2EDmvLZ2POXuOoPwMcfhnLLL/8LZ+JRa7qBOdeoru9wzYtBJXOHy1R2Q\n\tZy4iYIa1oczlA==", "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1648042586;\n\tbh=EA287Hwt5glVUgdzaeQKWcbKnnGZWRTVqjWta/B9euI=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=qtOY0oZAA6VF1CLAjo5CZ49vxrGV1rTdQ0CqRRhODhUbGmx6TX2Ayxwn8JJkeJ1WN\n\te3AUSe/3LkIFn/CYqUKE+Dr+lL42R1fCeDt3kiZsB3fAcwNTUJcirpqgVu7zbL3dfi\n\thVFfKGo/p5Aw19bSaoN+ClX7cRwjtw0EFT0Ffs6M=" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"qtOY0oZA\"; dkim-atps=neutral", "To": "libcamera-devel@lists.libcamera.org", "Date": "Wed, 23 Mar 2022 14:36:21 +0100", "Message-Id": "<20220323133622.61593-3-jeanmichel.hautbois@ideasonboard.com>", "X-Mailer": "git-send-email 2.32.0", "In-Reply-To": "<20220323133622.61593-1-jeanmichel.hautbois@ideasonboard.com>", "References": "<20220323133622.61593-1-jeanmichel.hautbois@ideasonboard.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [RFC PATCH 2/3] libcamera: raspberrypi: Control\n\tthe lens from pipeline", "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>", "From": "Jean-Michel Hautbois via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>", "Reply-To": "Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "The lens focus is controled by a VCM, which is linked to the sensor\nusing the ancillary links.\nPass the control to the config info structure and make it possible to\nupdate by the IPA.\n\nSigned-off-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>\n---\n include/libcamera/ipa/raspberrypi.mojom | 1 +\n .../pipeline/raspberrypi/raspberrypi.cpp | 17 +++++++++++++++++\n 2 files changed, 18 insertions(+)", "diff": "diff --git a/include/libcamera/ipa/raspberrypi.mojom b/include/libcamera/ipa/raspberrypi.mojom\nindex acd3cafe..0c3922b0 100644\n--- a/include/libcamera/ipa/raspberrypi.mojom\n+++ b/include/libcamera/ipa/raspberrypi.mojom\n@@ -125,4 +125,5 @@ interface IPARPiEventInterface {\n \tembeddedComplete(uint32 bufferId);\n \tsetIspControls(libcamera.ControlList controls);\n \tsetDelayedControls(libcamera.ControlList controls);\n+\tsetLensControls(libcamera.ControlList controls);\n };\ndiff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\nindex c2230199..970f9fe7 100644\n--- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n+++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n@@ -33,6 +33,7 @@\n \n #include \"libcamera/internal/bayer_format.h\"\n #include \"libcamera/internal/camera.h\"\n+#include \"libcamera/internal/camera_lens.h\"\n #include \"libcamera/internal/camera_sensor.h\"\n #include \"libcamera/internal/delayed_controls.h\"\n #include \"libcamera/internal/device_enumerator.h\"\n@@ -202,6 +203,7 @@ public:\n \tvoid setIspControls(const ControlList &controls);\n \tvoid setDelayedControls(const ControlList &controls);\n \tvoid setSensorControls(ControlList &controls);\n+\tvoid setLensControls(const ControlList &controls);\n \n \t/* bufferComplete signal handlers. */\n \tvoid unicamBufferDequeue(FrameBuffer *buffer);\n@@ -1483,6 +1485,7 @@ int RPiCameraData::loadIPA(ipa::RPi::SensorConfig *sensorConfig)\n \tipa_->embeddedComplete.connect(this, &RPiCameraData::embeddedComplete);\n \tipa_->setIspControls.connect(this, &RPiCameraData::setIspControls);\n \tipa_->setDelayedControls.connect(this, &RPiCameraData::setDelayedControls);\n+\tipa_->setLensControls.connect(this, &RPiCameraData::setLensControls);\n \n \t/*\n \t * The configuration (tuning file) is made from the sensor name unless\n@@ -1519,6 +1522,10 @@ int RPiCameraData::configureIPA(const CameraConfiguration *config)\n \tentityControls.emplace(0, sensor_->controls());\n \tentityControls.emplace(1, isp_[Isp::Input].dev()->controls());\n \n+\tCameraLens *lens = sensor_->focusLens();\n+\tif (lens)\n+\t\tentityControls.emplace(2, lens->controls());\n+\n \t/* Always send the user transform to the IPA. */\n \tipaConfig.transform = static_cast<unsigned int>(config->transform);\n \n@@ -1735,6 +1742,16 @@ void RPiCameraData::setDelayedControls(const ControlList &controls)\n \thandleState();\n }\n \n+void RPiCameraData::setLensControls(const ControlList &ctrls)\n+{\n+\tCameraLens *lens = sensor_->focusLens();\n+\tif (!lens)\n+\t\treturn;\n+\n+\t/* \\todo Should we keep track of the latest value applied ? */\n+\tlens->setFocusPosition(ctrls.get(V4L2_CID_FOCUS_ABSOLUTE).get<int32_t>());\n+}\n+\n void RPiCameraData::setSensorControls(ControlList &controls)\n {\n \t/*\n", "prefixes": [ "libcamera-devel", "RFC", "2/3" ] }