Show a patch.

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

{
    "id": 3075,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/3075/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/3075/",
    "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": "<20200309162414.720306-11-jacopo@jmondi.org>",
    "date": "2020-03-09T16:24:13",
    "name": "[libcamera-devel,10/11] libcamera: v4l2_device: Enable enumeration of U8 controls",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "846e986746054a4774b4d88ac03c98f71db0583a",
    "submitter": {
        "id": 3,
        "url": "https://patchwork.libcamera.org/api/1.1/people/3/?format=api",
        "name": "Jacopo Mondi",
        "email": "jacopo@jmondi.org"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/3075/mbox/",
    "series": [
        {
            "id": 716,
            "url": "https://patchwork.libcamera.org/api/1.1/series/716/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=716",
            "date": "2020-03-09T16:24:03",
            "name": "Adda support for V4L2 array control and strings",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/716/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/3075/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/3075/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "<jacopo@jmondi.org>",
        "Received": [
            "from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net\n\t[217.70.183.195])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 00B9362938\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  9 Mar 2020 17:21:32 +0100 (CET)",
            "from uno.lan (93-34-114-233.ip49.fastwebnet.it [93.34.114.233])\n\t(Authenticated sender: jacopo@jmondi.org)\n\tby relay3-d.mail.gandi.net (Postfix) with ESMTPSA id B7E4C60008\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  9 Mar 2020 16:21:31 +0000 (UTC)"
        ],
        "X-Originating-IP": "93.34.114.233",
        "From": "Jacopo Mondi <jacopo@jmondi.org>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Mon,  9 Mar 2020 17:24:13 +0100",
        "Message-Id": "<20200309162414.720306-11-jacopo@jmondi.org>",
        "X-Mailer": "git-send-email 2.25.0",
        "In-Reply-To": "<20200309162414.720306-1-jacopo@jmondi.org>",
        "References": "<20200309162414.720306-1-jacopo@jmondi.org>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH 10/11] libcamera: v4l2_device: Enable\n\tenumeration of U8 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>",
        "X-List-Received-Date": "Mon, 09 Mar 2020 16:21:33 -0000"
    },
    "content": "Enable the enumeration of V4L2 array controls with V4L2_CTRL_TYPE_U8\ntype.\n\nSigned-off-by: Jacopo Mondi <jacopo@jmondi.org>\n---\n src/libcamera/v4l2_device.cpp | 13 ++++---------\n 1 file changed, 4 insertions(+), 9 deletions(-)",
    "diff": "diff --git a/src/libcamera/v4l2_device.cpp b/src/libcamera/v4l2_device.cpp\nindex 464df6a1fe18..a36c121aa62a 100644\n--- a/src/libcamera/v4l2_device.cpp\n+++ b/src/libcamera/v4l2_device.cpp\n@@ -388,7 +388,8 @@ void V4L2Device::listControls()\n \n \t/* \\todo Add support for menu and compound controls. */\n \twhile (1) {\n-\t\tctrl.id |= V4L2_CTRL_FLAG_NEXT_CTRL;\n+\t\tctrl.id |= V4L2_CTRL_FLAG_NEXT_CTRL |\n+\t\t\t   V4L2_CTRL_FLAG_NEXT_COMPOUND;\n \t\tif (ioctl(VIDIOC_QUERY_EXT_CTRL, &ctrl))\n \t\t\tbreak;\n \n@@ -396,13 +397,6 @@ void V4L2Device::listControls()\n \t\t    ctrl.flags & V4L2_CTRL_FLAG_DISABLED)\n \t\t\tcontinue;\n \n-\t\tif (ctrl.elems != 1 || ctrl.nr_of_dims) {\n-\t\t\tLOG(V4L2, Debug)\n-\t\t\t\t<< \"Array control \" << utils::hex(ctrl.id)\n-\t\t\t\t<< \" not supported\";\n-\t\t\tcontinue;\n-\t\t}\n-\n \t\tswitch (ctrl.type) {\n \t\tcase V4L2_CTRL_TYPE_INTEGER:\n \t\tcase V4L2_CTRL_TYPE_BOOLEAN:\n@@ -411,8 +405,9 @@ void V4L2Device::listControls()\n \t\tcase V4L2_CTRL_TYPE_INTEGER64:\n \t\tcase V4L2_CTRL_TYPE_BITMASK:\n \t\tcase V4L2_CTRL_TYPE_INTEGER_MENU:\n+\t\tcase V4L2_CTRL_TYPE_U8:\n \t\t\tbreak;\n-\t\t/* \\todo Support compound controls. */\n+\t\t/* \\todo Support other control types. */\n \t\tdefault:\n \t\t\tLOG(V4L2, Debug)\n \t\t\t\t<< \"Control \" << utils::hex(ctrl.id)\n",
    "prefixes": [
        "libcamera-devel",
        "10/11"
    ]
}