{"id":17285,"url":"https://patchwork.libcamera.org/api/1.1/patches/17285/?format=json","web_url":"https://patchwork.libcamera.org/patch/17285/","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":"<20220903114803.951682-1-kieran.bingham@ideasonboard.com>","date":"2022-09-03T11:48:03","name":"[libcamera-devel] CameraSensor: Don't fail to add camera with faulty lens","commit_ref":null,"pull_url":null,"state":"accepted","archived":false,"hash":"ba59bce9b259370c05767a6c1d8dfebfd2b8174b","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/1.1/people/4/?format=json","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/17285/mbox/","series":[{"id":3464,"url":"https://patchwork.libcamera.org/api/1.1/series/3464/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=3464","date":"2022-09-03T11:48:03","name":"[libcamera-devel] CameraSensor: Don't fail to add camera with faulty lens","version":1,"mbox":"https://patchwork.libcamera.org/series/3464/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/17285/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/17285/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 15FF3C3272\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSat,  3 Sep 2022 11:48:13 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 6CA3B6202D;\n\tSat,  3 Sep 2022 13:48:12 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 3498961FBB\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat,  3 Sep 2022 13:48:10 +0200 (CEST)","from Monstersaurus.local\n\t(cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 97C514A8;\n\tSat,  3 Sep 2022 13:48:09 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1662205692;\n\tbh=eU8awA/xxTy7dZ2uAH6aMqJARjnuH3Y4JX51PJ8Y/WI=;\n\th=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post:\n\tList-Help:List-Subscribe:From:Reply-To:From;\n\tb=rxWSwYAd6Se72sfVaN01j1Ts1lch5s0wCHSnHYuU4F4vAgL4qDeGmhNjQUe6Ddq0C\n\tuf7saeXcjUaOnt6/q3XJZ1R18rbb6Fq5SJ8POFi/vdcGh5AfR40ma8xQcw6Xl9nSlk\n\toQ39x36af64bHWpFutj4NaEaUjb8eLjxqYOeOb2SIMJ8cHuWRuD7lZeXIARErhZgIP\n\tfqP2YZ6xqKl7MshATqkxOIQ5Zz2B2YmDeowY22ZXlBxZbdgZla3AjYN+adty7Qx/EO\n\tbpCMD6q59IGz/Dunn9sl/Bt5gLTFOCdWL0hQ7sGmiNiTBS6x724+Xqool206F4Kl5r\n\tDvfkfojwvziuA==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1662205689;\n\tbh=eU8awA/xxTy7dZ2uAH6aMqJARjnuH3Y4JX51PJ8Y/WI=;\n\th=From:To:Cc:Subject:Date:From;\n\tb=ZKp8jQDWsTWbLtnP0rT7lK6wS/n7GLsawAaN08lTZSJBPDmUM0ZmS2XgDbR1mFPRr\n\tbPxlZAs+9xXXN6tOu0j3oeDk363r7I2863NtWi5bnPT+WueQiyLc7tYL+Xx0aMXMBq\n\thcw7A1ZBRd2D1/onVZs0F650YGgad5iocjD7thXg="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"ZKp8jQDW\"; dkim-atps=neutral","To":"libcamera devel <libcamera-devel@lists.libcamera.org>","Date":"Sat,  3 Sep 2022 12:48:03 +0100","Message-Id":"<20220903114803.951682-1-kieran.bingham@ideasonboard.com>","X-Mailer":"git-send-email 2.34.1","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH] CameraSensor: Don't fail to add camera\n\twith faulty lens","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":"Kieran Bingham via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"If the CameraSensor fails to identify the VCM specified, it could still\nbe possible to continue to operate the sensor. Autofocus support will be\ndisabled, but this would be no different to operating a camera with a\nfixed focus. While of course the fixed focus position may not be\nsuitable, it would provide a better user experience to be able to\ncontinue to operate the camera, while still reporting that the lens is\ndisabled.\n\nBug: https://bugs.libcamera.org/show_bug.cgi?id=146\nSigned-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n---\n\nThe Surface devices now have a VCM registered, but they don't\nsuccessfully identify the device. While that should also be fixed,\nfailing to operate a camera because the VCM isn't operating seems to be\na bad user experience.\n\n\n src/libcamera/camera_sensor.cpp | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)","diff":"diff --git a/src/libcamera/camera_sensor.cpp b/src/libcamera/camera_sensor.cpp\nindex d055c16a4885..dcee7b9a0210 100644\n--- a/src/libcamera/camera_sensor.cpp\n+++ b/src/libcamera/camera_sensor.cpp\n@@ -467,8 +467,8 @@ int CameraSensor::discoverAncillaryDevices()\n \t\t\tret = focusLens_->init();\n \t\t\tif (ret) {\n \t\t\t\tLOG(CameraSensor, Error)\n-\t\t\t\t\t<< \"CameraLens initialisation failed\";\n-\t\t\t\treturn ret;\n+\t\t\t\t\t<< \"CameraLens initialisation failed: Lens disabled\";\n+\t\t\t\tbreak;\n \t\t\t}\n \t\t\tbreak;\n \n","prefixes":["libcamera-devel"]}