Message ID | 20230706080058.6259-1-laurent.pinchart@ideasonboard.com |
---|---|
State | Accepted |
Commit | d314d3b98b86dec9a25ce7b829e72a790b7ead1b |
Headers | show |
Series |
|
Related | show |
Hi Laurent, On 7/6/23 10:00 AM, Laurent Pinchart via libcamera-devel wrote: > 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 <laurent.pinchart@ideasonboard.com> Reviewed-by: Umang Jain <umang.jain@ideasonboard.com> > --- > 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(-) > > 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. > > base-commit: d06ed87d49ca3d734fd1c2f1409280abb499c625 > prerequisite-patch-id: 03020483e75d365fa1661922fc66b2f16ea11a04
Quoting Laurent Pinchart via libcamera-devel (2023-07-06 09:00:58) > 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 <laurent.pinchart@ideasonboard.com> > --- > 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(-) > > 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(), That's a bit different to others ... I guess there's no specific reason to have a 'hotplug_enabled' flag so Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> > '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. > > base-commit: d06ed87d49ca3d734fd1c2f1409280abb499c625 > prerequisite-patch-id: 03020483e75d365fa1661922fc66b2f16ea11a04 > -- > Regards, > > Laurent Pinchart >
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.
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 <laurent.pinchart@ideasonboard.com> --- 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