Show a patch.

GET /api/patches/15528/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 15528,
    "url": "https://patchwork.libcamera.org/api/patches/15528/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/15528/",
    "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": "<20220323160145.90606-4-jeanmichel.hautbois@ideasonboard.com>",
    "date": "2022-03-23T16:01:44",
    "name": "[libcamera-devel,RFC,v2,3/4] 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/people/75/?format=api",
        "name": "Jean-Michel Hautbois",
        "email": "jeanmichel.hautbois@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/15528/mbox/",
    "series": [
        {
            "id": 2991,
            "url": "https://patchwork.libcamera.org/api/series/2991/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=2991",
            "date": "2022-03-23T16:01:41",
            "name": "RPi: Introduce AF algorithm",
            "version": 2,
            "mbox": "https://patchwork.libcamera.org/series/2991/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/15528/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/15528/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 0B39AC0F1B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 23 Mar 2022 16:01:56 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 24C99632E6;\n\tWed, 23 Mar 2022 17:01:54 +0100 (CET)",
            "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id E5542604DA\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 23 Mar 2022 17:01:49 +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 A83359DE;\n\tWed, 23 Mar 2022 17:01:49 +0100 (CET)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1648051314;\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=I4TRJqnWapOn8EOaWcrHPpYxvvp0jehnOIKzQGtlIlWb77ywBmIXLEhj0Qiq3hAuE\n\tfVDJIfK1AfB+QJWG1u+hD2v1Pa/QyNsoyvnG+cXAWdVIgnvBRosTGmNQM4WgmVm0LK\n\tybjoXvCDinRYpysxIF6GoQ5M2VrYE/P9N1sE8LP5znp9Hf5ykaXOLheJ/lTc5CcYe7\n\tyZe1uL5T10y0RNBtR3LXxKfyxqMZK7eKiyspcBkh++7uAaBAxYkEV4evvuQM6w3FEw\n\tP/tMHAASDimfb/LgiC7AT7qwzRjO/GdkLLvGKtFW0zPlttzfcSZxqJacSDOpAu/2nA\n\tg3TAbl3WO/gEg==",
            "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1648051309;\n\tbh=EA287Hwt5glVUgdzaeQKWcbKnnGZWRTVqjWta/B9euI=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=j6z6CtRy4lT4kjGPxh/3YE2LlmIpozupwbmdUEsb3L6Hcc9+PDiPbo4O4gsIfs4DQ\n\tDNR11Jj/hSu5Y9VVZPvI7MtKZmJR4XDItFUN1WlP/bIPDPok1OlLVFWfoHqbnsiDC1\n\twDhh5wOOQiU9LBXz4apbauQVZO3nH7lk33WKUI40="
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"j6z6CtRy\"; dkim-atps=neutral",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Wed, 23 Mar 2022 17:01:44 +0100",
        "Message-Id": "<20220323160145.90606-4-jeanmichel.hautbois@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.32.0",
        "In-Reply-To": "<20220323160145.90606-1-jeanmichel.hautbois@ideasonboard.com>",
        "References": "<20220323160145.90606-1-jeanmichel.hautbois@ideasonboard.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [RFC PATCH v2 3/4] libcamera: raspberrypi:\n\tControl the 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",
        "v2",
        "3/4"
    ]
}