[{"id":27490,"web_url":"https://patchwork.libcamera.org/comment/27490/","msgid":"<fb678181-c3e3-d241-e491-a5ef88c1bc86@ideasonboard.com>","date":"2023-07-06T08:35:42","subject":"Re: [libcamera-devel] [PATCH v2] libcamera: Add option to configure\n\tudev support","submitter":{"id":86,"url":"https://patchwork.libcamera.org/api/people/86/","name":"Umang Jain","email":"umang.jain@ideasonboard.com"},"content":"Hi Laurent,\n\nOn 7/6/23 10:00 AM, Laurent Pinchart via libcamera-devel wrote:\n> libcamera uses udev to support hotplug (and unplug) detection. This is\n> an optional feature, which gets selected automatically if udev is\n> available. Users may however want to build libcamera without hotplug\n> detection, even if udev is available on the system. Add a new feature\n> option to control udev support. The default value is auto, which retains\n> the existing behaviour.\n>\n> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\nReviewed-by: Umang Jain <umang.jain@ideasonboard.com>\n\n> ---\n> Changes since v1:\n>\n> - Add configuration summary for hotplug\n> ---\n>   meson.build               | 1 +\n>   meson_options.txt         | 5 +++++\n>   src/libcamera/meson.build | 2 +-\n>   3 files changed, 7 insertions(+), 1 deletion(-)\n>\n> diff --git a/meson.build b/meson.build\n> index 29777529a0d9..363de459e537 100644\n> --- a/meson.build\n> +++ b/meson.build\n> @@ -261,6 +261,7 @@ py_mod.find_installation('python3', modules : py_modules)\n>   summary({\n>               'Enabled pipelines': pipelines,\n>               'Enabled IPA modules': enabled_ipa_names,\n> +            'Hotplug support': libudev.found(),\n>               'Tracing support': tracing_enabled,\n>               'Android support': android_enabled,\n>               'GStreamer support': gst_enabled,\n> diff --git a/meson_options.txt b/meson_options.txt\n> index 4405b401d7d3..fad928af4b62 100644\n> --- a/meson_options.txt\n> +++ b/meson_options.txt\n> @@ -66,6 +66,11 @@ option('tracing',\n>           value : 'auto',\n>           description : 'Enable tracing (based on lttng)')\n>   \n> +option('udev',\n> +       type : 'feature',\n> +       value : 'auto',\n> +       description : 'Enable udev support for hotplug')\n> +\n>   option('v4l2',\n>           type : 'boolean',\n>           value : false,\n> diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build\n> index 38fbb41e7d6c..b24f82965764 100644\n> --- a/src/libcamera/meson.build\n> +++ b/src/libcamera/meson.build\n> @@ -76,7 +76,7 @@ libdl = null_dep\n>   if not cc.has_function('dlopen')\n>       libdl = cc.find_library('dl')\n>   endif\n> -libudev = dependency('libudev', required : false)\n> +libudev = dependency('libudev', required : get_option('udev'))\n>   libyaml = dependency('yaml-0.1', required : false)\n>   \n>   # Use one of gnutls or libcrypto (provided by OpenSSL), trying gnutls first.\n>\n> base-commit: d06ed87d49ca3d734fd1c2f1409280abb499c625\n> prerequisite-patch-id: 03020483e75d365fa1661922fc66b2f16ea11a04","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 31005C323E\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu,  6 Jul 2023 08:35:49 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 67D75628BC;\n\tThu,  6 Jul 2023 10:35:48 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id B9B6D61E33\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu,  6 Jul 2023 10:35:46 +0200 (CEST)","from [192.168.0.136] (85-160-25-222.reb.o2.cz [85.160.25.222])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 072AF7F3;\n\tThu,  6 Jul 2023 10:35:00 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1688632548;\n\tbh=5ZJ9CvHoZr7rqIX4YnQu5XmPQTNb4+KWWuhd8hs7lMc=;\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:\n\tFrom;\n\tb=gl/jqtfz3/Ob2XTm0LTV7VaKu1NTmhvK4xNTbUdjvrQZzw/94R9FHzQ/jZEwAVEz1\n\t5uC+vKpVEw0VJ1IOcrMM2hxKftewAU+QNsW/iE7uu8BFio9iFvpRTSBjVqRzEauwXv\n\t2EgWaZC05YqCCy1Qzy15Kkm8QPiRgQ5P+rhYbd7U+gFYOMmAWTNvXKUHxJTNn74hBk\n\tTdD6FiPQ5pqF/QzrHzfaQmXdFmEn5YFa1QS4Xp+8GBVVwFoV1MEFsM+n2kIEuNucS9\n\tspzPp9yyi54uoNU58TyDyRXuewcBh4hRBXVouyH6/Qlf04RgabKtBbophcQOMADCi8\n\tOKcV0q9fPhf1w==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1688632501;\n\tbh=5ZJ9CvHoZr7rqIX4YnQu5XmPQTNb4+KWWuhd8hs7lMc=;\n\th=Date:Subject:To:References:From:In-Reply-To:From;\n\tb=wEqyAl5m4gnelVMywd6plOq2FrXkuJ0AyMkzjWkyB4GB9Y4kS8qbFxwpWu/GTJvY2\n\t3A7PqB3TFnWnbQCknthXtRgigMRQJwtagn+kLFPDiKqgzUOIonjRWEdDjetj3hPG5w\n\tbR+/bQtcUNpDoUbGIS+fXGmudQPHqAPJgtycoATI="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"wEqyAl5m\"; dkim-atps=neutral","Message-ID":"<fb678181-c3e3-d241-e491-a5ef88c1bc86@ideasonboard.com>","Date":"Thu, 6 Jul 2023 10:35:42 +0200","MIME-Version":"1.0","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101\n\tThunderbird/102.7.1","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","References":"<20230706080058.6259-1-laurent.pinchart@ideasonboard.com>","Content-Language":"en-US","In-Reply-To":"<20230706080058.6259-1-laurent.pinchart@ideasonboard.com>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"7bit","Subject":"Re: [libcamera-devel] [PATCH v2] libcamera: Add option to configure\n\tudev support","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":"Umang Jain via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"Umang Jain <umang.jain@ideasonboard.com>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":27493,"web_url":"https://patchwork.libcamera.org/comment/27493/","msgid":"<168863663855.780480.9259804379955922240@Monstersaurus>","date":"2023-07-06T09:43:58","subject":"Re: [libcamera-devel] [PATCH v2] libcamera: Add option to configure\n\tudev support","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Laurent Pinchart via libcamera-devel (2023-07-06 09:00:58)\n> libcamera uses udev to support hotplug (and unplug) detection. This is\n> an optional feature, which gets selected automatically if udev is\n> available. Users may however want to build libcamera without hotplug\n> detection, even if udev is available on the system. Add a new feature\n> option to control udev support. The default value is auto, which retains\n> the existing behaviour.\n> \n> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> ---\n> Changes since v1:\n> \n> - Add configuration summary for hotplug\n> ---\n>  meson.build               | 1 +\n>  meson_options.txt         | 5 +++++\n>  src/libcamera/meson.build | 2 +-\n>  3 files changed, 7 insertions(+), 1 deletion(-)\n> \n> diff --git a/meson.build b/meson.build\n> index 29777529a0d9..363de459e537 100644\n> --- a/meson.build\n> +++ b/meson.build\n> @@ -261,6 +261,7 @@ py_mod.find_installation('python3', modules : py_modules)\n>  summary({\n>              'Enabled pipelines': pipelines,\n>              'Enabled IPA modules': enabled_ipa_names,\n> +            'Hotplug support': libudev.found(),\n\nThat's a bit different to others ... I guess there's no specific reason\nto have a 'hotplug_enabled' flag so\n\n\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\n>              'Tracing support': tracing_enabled,\n>              'Android support': android_enabled,\n>              'GStreamer support': gst_enabled,\n> diff --git a/meson_options.txt b/meson_options.txt\n> index 4405b401d7d3..fad928af4b62 100644\n> --- a/meson_options.txt\n> +++ b/meson_options.txt\n> @@ -66,6 +66,11 @@ option('tracing',\n>          value : 'auto',\n>          description : 'Enable tracing (based on lttng)')\n>  \n> +option('udev',\n> +       type : 'feature',\n> +       value : 'auto',\n> +       description : 'Enable udev support for hotplug')\n> +\n>  option('v4l2',\n>          type : 'boolean',\n>          value : false,\n> diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build\n> index 38fbb41e7d6c..b24f82965764 100644\n> --- a/src/libcamera/meson.build\n> +++ b/src/libcamera/meson.build\n> @@ -76,7 +76,7 @@ libdl = null_dep\n>  if not cc.has_function('dlopen')\n>      libdl = cc.find_library('dl')\n>  endif\n> -libudev = dependency('libudev', required : false)\n> +libudev = dependency('libudev', required : get_option('udev'))\n>  libyaml = dependency('yaml-0.1', required : false)\n>  \n>  # Use one of gnutls or libcrypto (provided by OpenSSL), trying gnutls first.\n> \n> base-commit: d06ed87d49ca3d734fd1c2f1409280abb499c625\n> prerequisite-patch-id: 03020483e75d365fa1661922fc66b2f16ea11a04\n> -- \n> Regards,\n> \n> Laurent Pinchart\n>","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 848F6C323E\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu,  6 Jul 2023 09:44:04 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id DE2D1628BC;\n\tThu,  6 Jul 2023 11:44:03 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 3702961E33\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu,  6 Jul 2023 11:44:02 +0200 (CEST)","from pendragon.ideasonboard.com\n\t(aztw-30-b2-v4wan-166917-cust845.vm26.cable.virginm.net\n\t[82.37.23.78])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id BECDE6C8;\n\tThu,  6 Jul 2023 11:43:16 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1688636643;\n\tbh=XwRl3w5lydn8YH6gqsb400s//L2fT/y8LxBIFEVIvTc=;\n\th=In-Reply-To:References:To:Date:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=3DI8mB8o3j5LR8WGVGmukdSpXqWSXMtofvQiC0bDDvV83VUpG3YuTxcUV+boURz2S\n\tv+kXTE386vIlXLohD8LwJSCNW3fsaz79ItoXZvRfqsOqRFIm50UmtHikQRplLwM0e/\n\t+xECyjitGW74zoZTFnzkNIAnDjWd963vRDll/n+iFkFwta+2wtaYBhClUW/clDXVVb\n\tIHytgd58RXe+xe56ZqrqaRGRwyaakIeUqxUISLxTj7JMKpNBOK0t+yS7pvkDfQPhcU\n\t33emL4abJOkHKL2ReGc7QTBmPwpgD9R8Gqkev2mAwEsRwNvxmhYyiUAsm/NXY6aUH9\n\tjlEzZH5fowCzw==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1688636596;\n\tbh=XwRl3w5lydn8YH6gqsb400s//L2fT/y8LxBIFEVIvTc=;\n\th=In-Reply-To:References:Subject:From:To:Date:From;\n\tb=hwSRkLtFRKnDJlie+GdpR9uA/OgFsOeTXjIDXS5QfJFZjcNHTHVVSorPe+yft7brj\n\tv3+i48zxKNK0s9oD2ep+io+5sIroNK8IspwWqdVodrY/WhrZpMH9iMk68dj+fQf4sZ\n\tobJtcB+gstZRACi7x3jrMt8CsR+qFR0S1niCxbdk="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"hwSRkLtF\"; dkim-atps=neutral","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20230706080058.6259-1-laurent.pinchart@ideasonboard.com>","References":"<20230706080058.6259-1-laurent.pinchart@ideasonboard.com>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Date":"Thu, 06 Jul 2023 10:43:58 +0100","Message-ID":"<168863663855.780480.9259804379955922240@Monstersaurus>","User-Agent":"alot/0.10","Subject":"Re: [libcamera-devel] [PATCH v2] libcamera: Add option to configure\n\tudev support","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>"}}]