{"id":16536,"url":"https://patchwork.libcamera.org/api/patches/16536/?format=json","web_url":"https://patchwork.libcamera.org/patch/16536/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20220704221548.GB8002@amd>","date":"2022-07-04T22:15:49","name":"[libcamera-devel] PinePhone needs S_FRAME_INTERVAL","commit_ref":null,"pull_url":null,"state":"rejected","archived":false,"hash":"05f7f482185c6f6ba239d2bc47c241abeb2796ad","submitter":{"id":49,"url":"https://patchwork.libcamera.org/api/people/49/?format=json","name":"Pavel Machek","email":"pavel@ucw.cz"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/16536/mbox/","series":[{"id":3249,"url":"https://patchwork.libcamera.org/api/series/3249/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=3249","date":"2022-07-04T22:15:49","name":"[libcamera-devel] PinePhone needs S_FRAME_INTERVAL","version":1,"mbox":"https://patchwork.libcamera.org/series/3249/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/16536/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/16536/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 2F729BE173\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon,  4 Jul 2022 22:15:52 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 8500A6054A;\n\tTue,  5 Jul 2022 00:15:51 +0200 (CEST)","from jabberwock.ucw.cz (jabberwock.ucw.cz [46.255.230.98])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 2BC856054A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue,  5 Jul 2022 00:15:50 +0200 (CEST)","by jabberwock.ucw.cz (Postfix, from userid 1017)\n\tid BE4771C0BFA; Tue,  5 Jul 2022 00:15:49 +0200 (CEST)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1656972951;\n\tbh=AiLgy3FWDkkvFYKf1DKAA4MGUu/C56sZ8M9xmjzdFWs=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=nHuz989UA+b5btiY3Vxp9/q5V4jGg29AAOmUuTuItDg8ThUfOdi7kofC58xPN9iPW\n\toimz2t/FrxJe/IueKmyt2kkxLJgQ3e8DubrXCJnvIbq5GN7Q5s5lo0oFXfYiWWxIPl\n\tl0oWs7M4x7dDBBG9IWvWJMDDuM1jtVQHKu/zkf/j9+WixsyMX8rvCTf6SyMQIGxjK3\n\t8XVCUroqdCUvmmoa6m4er+tdN2Jx0oDhcS2wyRTAjQ0uHmmpxCTrOLwO4Qp5pd2nbd\n\t/AAwDvw9DIPeuwlNaQput4x2Mlbvdj0x6y1iQM/NcttL8x4eOO1pMUbXqXnDhtz7d+\n\tDzN68iLn4s4cA==","Date":"Tue, 5 Jul 2022 00:15:49 +0200","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Message-ID":"<20220704221548.GB8002@amd>","References":"<YrG2JHFwydqmvhQ+@pendragon.ideasonboard.com>\n\t<20220701211120.GB18840@duo.ucw.cz>\n\t<279b87a6-2209-e4d1-6342-12253258b59f@riseup.net>\n\t<YsGe984b7/ShqZXw@pendragon.ideasonboard.com>\n\t<9a63e90b-5da6-2915-462e-70b2f61d1867@riseup.net>\n\t<20220703155800.GA11658@amd>\n\t<70821a87-8ea5-1583-daa3-ce1531977ce7@riseup.net>\n\t<d37fdb5f-79a6-56be-274f-12a5852836fc@riseup.net>\n\t<20220704161526.GA23964@amd>\n\t<YsMZOLfuXkjw6h+G@pendragon.ideasonboard.com>","MIME-Version":"1.0","Content-Type":"multipart/signed; micalg=pgp-sha1;\n\tprotocol=\"application/pgp-signature\"; boundary=\"jq0ap7NbKX2Kqbes\"","Content-Disposition":"inline","In-Reply-To":"<YsMZOLfuXkjw6h+G@pendragon.ideasonboard.com>","User-Agent":"Mutt/1.5.23 (2014-03-12)","Subject":"[libcamera-devel] PinePhone needs S_FRAME_INTERVAL","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":"Pavel Machek via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"Pavel Machek <pavel@ucw.cz>","Cc":"martijn@brixit.nl, libcamera-devel@lists.libcamera.org, jozef@mlich.cz","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"Hi!\n\nIt looks I solved another mystery: Top resolution was not available,\nand depending on order of commands, sometimes 1280x720 was not\navailable, either.\n\nSo I took a look into megapixels, and mystery solved -- libcamera is\nnot setting frame intervals at all.\n\nAFAICT that needs to happen. PinePhone needs lower fps for top\nresolution, but an use high fps for lower resolutions...\n\nThis is obviosly a hack, but we need something like that.\n\nBest regards,\n\t\t\t\t\t\t\tPavel\n\ncommit 66616c78007c08fcd3fde66888c2210a392b184e\nAuthor: Pavel Machek <pavel@ucw.cz>\nDate:   Mon Jul 4 23:54:22 2022 +0200\n\n    S_FRAME_INTERVAL is needed, or things don't work.\n\nindex fba90e20..0ee6ac30 100644","diff":"--- a/src/libcamera/v4l2_subdevice.cpp\n+++ b/src/libcamera/v4l2_subdevice.cpp\n@@ -452,6 +452,21 @@ int V4L2Subdevice::setFormat(unsigned int pad, V4L2SubdeviceFormat *format,\n \t\t\t     Whence whence)\n {\n \tstruct v4l2_subdev_format subdevFmt = {};\n+\n+\t{\n+\t  struct v4l2_subdev_frame_interval interval = {};\n+                interval.pad = 0;\n+                interval.interval.numerator = 1;\n+                interval.interval.denominator = 10;\n+                if (int ret = ioctl(VIDIOC_SUBDEV_S_FRAME_INTERVAL,\n+                           &interval) == -1) {\n+\t\t\tLOG(V4L2, Error)\n+\t\t\t  << \"Unable to set frame interval on pad \" << pad\n+\t\t\t  << \": \" << strerror(-ret);\n+                        return ret;\n+                }\n+\n+\t}\n \tsubdevFmt.which = whence == ActiveFormat ? V4L2_SUBDEV_FORMAT_ACTIVE\n \t\t\t: V4L2_SUBDEV_FORMAT_TRY;\n \tsubdevFmt.pad = pad;\n","prefixes":["libcamera-devel"]}