From patchwork Fri Aug 27 06:25:20 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Elder X-Patchwork-Id: 13528 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 44F9BBD87D for ; Fri, 27 Aug 2021 06:25:38 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 4BC7768934; Fri, 27 Aug 2021 08:25:36 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="cncI2QZO"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 5A91660288 for ; Fri, 27 Aug 2021 08:25:34 +0200 (CEST) Received: from pyrite.rasen.tech (unknown [IPv6:2400:4051:61:600:2c71:1b79:d06d:5032]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id C5AC95A1; Fri, 27 Aug 2021 08:25:32 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1630045534; bh=YKSQ0NKUrmjNT1dOON/tsAd+ZIp8PyLk6iJT24C/XWk=; h=From:To:Cc:Subject:Date:From; b=cncI2QZOGw9xyu8WNpEZIhVe1FJVMq9BYuE7RBe7AJCC/mp7TypGblU1p+WzYBGJs eBTeLmbE5iOgD3DO1d5S9+OCcno2M5hlfKnUJ1HR43Xk2n0VdZvpY4HiTLUZXEgtgd R7Zd0kllevT13WdjN7IGwu2/GN9cXlCmNLAhmkVs= From: Paul Elder To: libcamera-devel@lists.libcamera.org Date: Fri, 27 Aug 2021 15:25:20 +0900 Message-Id: <20210827062521.2541170-1-paul.elder@ideasonboard.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 1/2] v4l2: v4l2_compat_manager: Don't print "camera not found" on openat() X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Some applications (like Firefox) run open() many times on video device nodes. This may lead to user confusion when they see "INFO V4L2Compat v4l2_compat_manager.cpp:146 No camera found for /dev/videoX" over and over again. Lower the log level to debug so that we can still get this information on debug, and so users won't see it all the time. Signed-off-by: Paul Elder Reviewed-by: Kieran Bingham Reviewed-by: Laurent Pinchart --- src/v4l2/v4l2_compat_manager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/v4l2/v4l2_compat_manager.cpp b/src/v4l2/v4l2_compat_manager.cpp index e566125a..690a191f 100644 --- a/src/v4l2/v4l2_compat_manager.cpp +++ b/src/v4l2/v4l2_compat_manager.cpp @@ -143,7 +143,7 @@ int V4L2CompatManager::openat(int dirfd, const char *path, int oflag, mode_t mod ret = getCameraIndex(fd); if (ret < 0) { - LOG(V4L2Compat, Info) << "No camera found for " << path; + LOG(V4L2Compat, Debug) << "No camera found for " << path; return fd; } From patchwork Fri Aug 27 06:25:21 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Elder X-Patchwork-Id: 13529 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 9CDE8BD87D for ; Fri, 27 Aug 2021 06:25:41 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 53B9268932; Fri, 27 Aug 2021 08:25:41 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="ejowlOMY"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 3187961534 for ; Fri, 27 Aug 2021 08:25:36 +0200 (CEST) Received: from pyrite.rasen.tech (unknown [IPv6:2400:4051:61:600:2c71:1b79:d06d:5032]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id B81B2739; Fri, 27 Aug 2021 08:25:34 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1630045535; bh=tjS2Z4BqXpaz9zd82bBDJdKUz2PNcdjDJWeG9Pz95QA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ejowlOMYAQpRGzX+SxbJNw4r5sdEKV1cQ9IIV/yP1wu5BwKD6xqUt/1v79ac78U5u WEv9EkT87gGZY3SEMWokWH2IYd3HdYvB1JnqYJ2W37nL9NcqcNsB4ifIvVA7opS1ED gek+wpBBK9IdOjxlBC8uNECYmYO2ls7qoeCutGOg= From: Paul Elder To: libcamera-devel@lists.libcamera.org Date: Fri, 27 Aug 2021 15:25:21 +0900 Message-Id: <20210827062521.2541170-2-paul.elder@ideasonboard.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210827062521.2541170-1-paul.elder@ideasonboard.com> References: <20210827062521.2541170-1-paul.elder@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 2/2] test: v4l2_compat_test: Fix v4l2-compliance version parsing X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" v4l2-compliance changed their version string: v4l2-compliance 1.21.0-4618 v4l2-compliance SHA: cc211b76476aca2c072ffa83a9b003957d5f3909, 64 bits, 64-bit time_t v4l2-compliance 1.21.0-4838, 64 bits, 64-bit time_t The current parsing takes the last result of split, which works for the former, but not the latter. Take the second result of split instead, and strip away any commas. Signed-off-by: Paul Elder Reviewed-by: Kieran Bingham Reviewed-by: Laurent Pinchart Tested-by: Laurent Pinchart --- Kieran, can you please check if this works? --- test/v4l2_compat/v4l2_compat_test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/v4l2_compat/v4l2_compat_test.py b/test/v4l2_compat/v4l2_compat_test.py index 51bfa952..ae892ced 100755 --- a/test/v4l2_compat/v4l2_compat_test.py +++ b/test/v4l2_compat/v4l2_compat_test.py @@ -94,7 +94,7 @@ def main(argv): return TestSkip ret, out = run_with_stdout(v4l2_compliance, '--version') - if ret != 0 or version.parse(out[0].split()[-1]) < MIN_V4L_UTILS_VERSION: + if ret != 0 or version.parse(out[0].split()[1].replace(',', '')) < MIN_V4L_UTILS_VERSION: print('v4l2-compliance version >= 1.21.0 required') return TestSkip