[libcamera-devel] [PATCH] libcamera: device_enumerator: extend documentation of DeviceMatch

Laurent Pinchart laurent.pinchart at ideasonboard.com
Fri Jan 18 01:12:54 CET 2019


Hi Niklas,

Thank you for the patch.

On Fri, Jan 18, 2019 at 12:06:36AM +0100, Niklas Söderlund wrote:
> Extend the document of the intended usage of DeviceMatch need for
> information to correctly function to find a uniquely identifiable media
> device.
> 
> Signed-off-by: Niklas Söderlund <niklas.soderlund at ragnatech.se>
> ---
>  src/libcamera/device_enumerator.cpp | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/src/libcamera/device_enumerator.cpp b/src/libcamera/device_enumerator.cpp
> index 55c510e3b79a415b..e0b19313552f6aa5 100644
> --- a/src/libcamera/device_enumerator.cpp
> +++ b/src/libcamera/device_enumerator.cpp
> @@ -52,6 +52,15 @@ namespace libcamera {
>   *
>   * The description is meant to be filled by pipeline managers and passed to a
>   * device enumerator to find matching media devices.
> + *
> + * A DeviceMatch is created with a specific Linux device driver in mind, therefor

s/therefor/therefore/

(The spelling therefor exists but is archaic)

> + * the name of the driver is a required property. One or more Entity names can
> + * be added the matching with \a add().

Maybe "can be added as match criteria" ?

> + *
> + * A pipeline handler should add as many entities to a DeviceMatch so that the
> + * media device can be uniquely identified in case a Linux device driver is
> + * capable of producing different media graphs as a result of different hardware
> + * versions or other circumstances.

How about phrasing that as a recommended usage ?

Pipeline handlers are recommended to add entities to DeviceMatch as
appropriare to ensure that the media device they need can be uniquely
identified. This is useful  when the corresponding kernel driver can
produce different graphs, for instance as a result of different driver
versions or hardware configurations, and not all those graphs are
suitable for a pipeline handler.
different hardware versions

>   */

-- 
Regards,

Laurent Pinchart


More information about the libcamera-devel mailing list