{"id":1522,"url":"https://patchwork.libcamera.org/api/1.1/patches/1522/?format=json","web_url":"https://patchwork.libcamera.org/patch/1522/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/1.1/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":"<20190626101308.19099-1-jacopo@jmondi.org>","date":"2019-06-26T10:13:08","name":"[libcamera-devel] libcamera: v4l2_device: Fix control enumeration bug","commit_ref":null,"pull_url":null,"state":"accepted","archived":false,"hash":"3f7442fdd462a82d9711e241862025517748aef2","submitter":{"id":3,"url":"https://patchwork.libcamera.org/api/1.1/people/3/?format=json","name":"Jacopo Mondi","email":"jacopo@jmondi.org"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/1522/mbox/","series":[{"id":377,"url":"https://patchwork.libcamera.org/api/1.1/series/377/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=377","date":"2019-06-26T10:13:08","name":"[libcamera-devel] libcamera: v4l2_device: Fix control enumeration bug","version":1,"mbox":"https://patchwork.libcamera.org/series/377/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/1522/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/1522/checks/","tags":{},"headers":{"Return-Path":"<jacopo@jmondi.org>","Received":["from relay10.mail.gandi.net (relay10.mail.gandi.net\n\t[217.70.178.230])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 8C9926157F\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 26 Jun 2019 12:11:59 +0200 (CEST)","from uno.lan (2-224-242-101.ip172.fastwebnet.it [2.224.242.101])\n\t(Authenticated sender: jacopo@jmondi.org)\n\tby relay10.mail.gandi.net (Postfix) with ESMTPSA id 17AFD24000F;\n\tWed, 26 Jun 2019 10:11:58 +0000 (UTC)"],"From":"Jacopo Mondi <jacopo@jmondi.org>","To":"libcamera-devel@lists.libcamera.org","Date":"Wed, 26 Jun 2019 12:13:08 +0200","Message-Id":"<20190626101308.19099-1-jacopo@jmondi.org>","X-Mailer":"git-send-email 2.21.0","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH] libcamera: v4l2_device: Fix control\n\tenumeration bug","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.23","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":"Wed, 26 Jun 2019 10:11:59 -0000"},"content":"When enumerating the available V4L2 controls at video device open\ntime set the V4L2_CTRL_FLAG_NEXT_CTRL flag when hitting an unsupported\ncontrol type not to loop forever.\n\nWhile at it, downgrade the message reporting the control type in not\nsupported to Debug, as it is not an error worth being reported\nunconditionally.\n\nFixes: 030ce6491ed3 (\"libcamera: v4l2_device: List valid controls at open\")\nSigned-off-by: Jacopo Mondi <jacopo@jmondi.org>\n---\n src/libcamera/v4l2_device.cpp | 3 ++-\n 1 file changed, 2 insertions(+), 1 deletion(-)","diff":"diff --git a/src/libcamera/v4l2_device.cpp b/src/libcamera/v4l2_device.cpp\nindex 84758a811c27..13d4bce5c013 100644\n--- a/src/libcamera/v4l2_device.cpp\n+++ b/src/libcamera/v4l2_device.cpp\n@@ -341,8 +341,9 @@ void V4L2Device::listControls()\n \t\t\tbreak;\n \t\t/* \\todo Support compound controls. */\n \t\tdefault:\n-\t\t\tLOG(V4L2, Error) << \"Control type '\" << info.type()\n+\t\t\tLOG(V4L2, Debug) << \"Control type '\" << info.type()\n \t\t\t\t\t << \"' not supported\";\n+\t\t\tctrl.id |= V4L2_CTRL_FLAG_NEXT_CTRL;\n \t\t\tcontinue;\n \t\t}\n \n","prefixes":["libcamera-devel"]}