From patchwork Thu Jul 6 08:00:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 18794 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 13B10BDC71 for ; Thu, 6 Jul 2023 08:01:03 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 6685A628C0; Thu, 6 Jul 2023 10:01:02 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1688630462; bh=CtKOkjfj7ilQXD0MzAhzMm+VHjOC4DNkRHClkfdxssc=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=rrfc2vWb6CssP8N7EQFl8vRvWLVnoi6tiAZ8GoHzGfPQrlkogWn5B50jMRm0IzSxp kbkNYV6KkbAFpVKn6PtcaviM7yyhmDyI+pPnXcdwuqfNHgVv18RZ8f4GYYeKqXM6hy 9s+SR1Zp4EChmQff/lnygpcbH6QBQgv2cCm0m9TSQeL4/y1amjhwd0PmgBzjJzORXy hfuCyTrFPIjhMHaEtJMwG64qPj0x/w3GRUBm4aiH6h5Qb7so8oVBAfPWvJ3n+2F1ap fgYignGHAN+IdnFest+Dq+dvftUCemSMQ7L/N5qvSiejuL4saWhP7RaahObjCEenhZ 7OziaC56gN2bg== 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 1D92F61E33 for ; Thu, 6 Jul 2023 10:01:00 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="DvvnNh0q"; dkim-atps=neutral Received: from pendragon.ideasonboard.com (85-160-25-222.reb.o2.cz [85.160.25.222]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 7CB7C6C8; Thu, 6 Jul 2023 10:00:14 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1688630414; bh=CtKOkjfj7ilQXD0MzAhzMm+VHjOC4DNkRHClkfdxssc=; h=From:To:Cc:Subject:Date:From; b=DvvnNh0qlPg3wh8qNeHzHYqgLLWKaXr9Ggt4d7NPytWbyQ6QJJGMh6LD/QMDX8sjR rOI3U1GAXI+CK+MK4K8AQPQxGLOcqlXcZgIM8JJXPmfkZcx0HHGELh0+6h784pK2bq PJEI4haOAW0mhXr880LcnmBFd4OMGXoxxFnM99c8= To: libcamera-devel@lists.libcamera.org Date: Thu, 6 Jul 2023 11:00:58 +0300 Message-Id: <20230706080058.6259-1-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.39.3 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2] libcamera: Add option to configure udev support 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: , X-Patchwork-Original-From: Laurent Pinchart via libcamera-devel From: Laurent Pinchart Reply-To: Laurent Pinchart Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" libcamera uses udev to support hotplug (and unplug) detection. This is an optional feature, which gets selected automatically if udev is available. Users may however want to build libcamera without hotplug detection, even if udev is available on the system. Add a new feature option to control udev support. The default value is auto, which retains the existing behaviour. Signed-off-by: Laurent Pinchart Reviewed-by: Umang Jain Reviewed-by: Kieran Bingham --- Changes since v1: - Add configuration summary for hotplug --- meson.build | 1 + meson_options.txt | 5 +++++ src/libcamera/meson.build | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) base-commit: d06ed87d49ca3d734fd1c2f1409280abb499c625 prerequisite-patch-id: 03020483e75d365fa1661922fc66b2f16ea11a04 diff --git a/meson.build b/meson.build index 29777529a0d9..363de459e537 100644 --- a/meson.build +++ b/meson.build @@ -261,6 +261,7 @@ py_mod.find_installation('python3', modules : py_modules) summary({ 'Enabled pipelines': pipelines, 'Enabled IPA modules': enabled_ipa_names, + 'Hotplug support': libudev.found(), 'Tracing support': tracing_enabled, 'Android support': android_enabled, 'GStreamer support': gst_enabled, diff --git a/meson_options.txt b/meson_options.txt index 4405b401d7d3..fad928af4b62 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -66,6 +66,11 @@ option('tracing', value : 'auto', description : 'Enable tracing (based on lttng)') +option('udev', + type : 'feature', + value : 'auto', + description : 'Enable udev support for hotplug') + option('v4l2', type : 'boolean', value : false, diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build index 38fbb41e7d6c..b24f82965764 100644 --- a/src/libcamera/meson.build +++ b/src/libcamera/meson.build @@ -76,7 +76,7 @@ libdl = null_dep if not cc.has_function('dlopen') libdl = cc.find_library('dl') endif -libudev = dependency('libudev', required : false) +libudev = dependency('libudev', required : get_option('udev')) libyaml = dependency('yaml-0.1', required : false) # Use one of gnutls or libcrypto (provided by OpenSSL), trying gnutls first.