Patch Detail
Show a patch.
GET /api/patches/4054/?format=api
{ "id": 4054, "url": "https://patchwork.libcamera.org/api/patches/4054/?format=api", "web_url": "https://patchwork.libcamera.org/patch/4054/", "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": "<20200616131244.70308-11-paul.elder@ideasonboard.com>", "date": "2020-06-16T13:12:39", "name": "[libcamera-devel,10/15] v4l2: v4l2_camera_proxy: Call streamoff on reqbufs 0", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "24c22f2d468cf796126494b87ad8a489d45759aa", "submitter": { "id": 17, "url": "https://patchwork.libcamera.org/api/people/17/?format=api", "name": "Paul Elder", "email": "paul.elder@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/4054/mbox/", "series": [ { "id": 1006, "url": "https://patchwork.libcamera.org/api/series/1006/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=1006", "date": "2020-06-16T13:12:29", "name": "Support v4l2-compliance", "version": 1, "mbox": "https://patchwork.libcamera.org/series/1006/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/4054/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/4054/checks/", "tags": {}, "headers": { "Return-Path": "<paul.elder@ideasonboard.com>", "Received": [ "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 4FC2B603C4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 16 Jun 2020 15:13:19 +0200 (CEST)", "from jade.flets-east.jp (unknown\n\t[IPv6:2400:4051:61:600:2807:bdfa:f6a:8e53])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id D9E94F9;\n\tTue, 16 Jun 2020 15:13:17 +0200 (CEST)" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"mC5v9Btv\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1592313199;\n\tbh=2CS7/Khg/CLRDpVz0F3dcbSNJwsFYdeHXv0NRP0c4ao=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=mC5v9Btveo+SGhgcY073lkTc/a/KrZfN0S2KLAJDhJ1Vpy27LeOlw+ecElRGxzkLN\n\tBupM9WxgCJaM+3Girq20cht4xrNoD2IjNezYIzUTlozhnxNUHRHmGUQrRXhMOmsOXQ\n\tg5tHBiVhd7NQsCmHLvny3uTZkQaOO0X1V5WpG0TM=", "From": "Paul Elder <paul.elder@ideasonboard.com>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Tue, 16 Jun 2020 22:12:39 +0900", "Message-Id": "<20200616131244.70308-11-paul.elder@ideasonboard.com>", "X-Mailer": "git-send-email 2.27.0", "In-Reply-To": "<20200616131244.70308-1-paul.elder@ideasonboard.com>", "References": "<20200616131244.70308-1-paul.elder@ideasonboard.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH 10/15] v4l2: v4l2_camera_proxy: Call\n\tstreamoff on reqbufs 0", "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": "Tue, 16 Jun 2020 13:13:19 -0000" }, "content": "VIDIOC_REQBUFS with count = 0 should also exhibit the same effects as\nVIDIOC_STREAMOFF if the stream is on. Although V4L2Camera::streamOff is\ncalled in the handler for VIDIOC_REQBUFS in V4L2CameraProxy, there is\nstill some state in V4L2CameraProxy that needs to be reset, so call\nV4L2CameraProxy::vidioc_streamoff.\n\nSigned-off-by: Paul Elder <paul.elder@ideasonboard.com>\n---\n src/v4l2/v4l2_camera_proxy.cpp | 7 +++++++\n 1 file changed, 7 insertions(+)", "diff": "diff --git a/src/v4l2/v4l2_camera_proxy.cpp b/src/v4l2/v4l2_camera_proxy.cpp\nindex 63b4124..45e4656 100644\n--- a/src/v4l2/v4l2_camera_proxy.cpp\n+++ b/src/v4l2/v4l2_camera_proxy.cpp\n@@ -510,6 +510,13 @@ int V4L2CameraProxy::vidioc_reqbufs(int fd, struct v4l2_requestbuffers *arg)\n \tmemset(arg->reserved, 0, sizeof(arg->reserved));\n \n \tif (arg->count == 0) {\n+\t\tif (streaming_) {\n+\t\t\tint argStreamoff = arg->type;\n+\t\t\tret = vidioc_streamoff(fd, &argStreamoff);\n+\t\t\tif (ret < 0)\n+\t\t\t\treturn ret;\n+\t\t}\n+\n \t\tunlock(fd);\n \t\treturn freeBuffers();\n \t}\n", "prefixes": [ "libcamera-devel", "10/15" ] }