diff options
author | Bastien Nocera <hadess@hadess.net> | 2021-10-26 12:17:27 +0200 |
---|---|---|
committer | Bastien Nocera <hadess@hadess.net> | 2021-10-27 00:14:41 +0200 |
commit | e78e11d8c59727aee2e6f03ce413ee73193e1937 (patch) | |
tree | 41ceddb27aa0747a591abeb96d85c14a1bfcc122 /hwdb.d | |
parent | 63fbfc598f9f6d3ce34cc00a7687089dab24daff (diff) | |
download | systemd-e78e11d8c59727aee2e6f03ce413ee73193e1937.tar.gz |
hwdb: Tag IR cameras as suchwip/hadess/webcams
So that front-ends can ignore them if they wish to.
See https://gitlab.gnome.org/GNOME/cheese/-/merge_requests/4
Diffstat (limited to 'hwdb.d')
-rw-r--r-- | hwdb.d/70-cameras.hwdb | 25 | ||||
-rw-r--r-- | hwdb.d/meson.build | 1 | ||||
-rwxr-xr-x | hwdb.d/parse_hwdb.py | 3 |
3 files changed, 29 insertions, 0 deletions
diff --git a/hwdb.d/70-cameras.hwdb b/hwdb.d/70-cameras.hwdb new file mode 100644 index 0000000000..3a84792a18 --- /dev/null +++ b/hwdb.d/70-cameras.hwdb @@ -0,0 +1,25 @@ +# This file is part of systemd. +# +# Database for webcam and camera quirks. +# +# Permitted keys: +# Specify if a camera is an infra-red camera +# ID_INFRARED_CAMERA=1|0 +# Specify if a camera is front or rear facing +# ID_CAMERA_DIRECTION=front|rear + +# Generic +camera:usb:v*p*:name:*IR Camera*: + ID_INFRARED_CAMERA=1 + +########################################################### +# Philips +########################################################### + +# Philips 346p1crh display +camera:usb:v04f2pb612:name:*USB2.0 FHD UVC WebCam* IR Camer*: + ID_INFRARED_CAMERA=1 + ID_CAMERA_DIRECTION=front + +camera:usb:v04f2pb612:name:*USB2.0 FHD UVC WebCam* USB2.0 F*: + ID_CAMERA_DIRECTION=front diff --git a/hwdb.d/meson.build b/hwdb.d/meson.build index fc6ee7c649..8ff044131c 100644 --- a/hwdb.d/meson.build +++ b/hwdb.d/meson.build @@ -28,6 +28,7 @@ hwdb_files_test = files(''' 60-seat.hwdb 60-sensor.hwdb 70-analyzers.hwdb + 70-cameras.hwdb 70-joystick.hwdb 70-mouse.hwdb 70-pointingstick.hwdb diff --git a/hwdb.d/parse_hwdb.py b/hwdb.d/parse_hwdb.py index f385e52628..941adf28f7 100755 --- a/hwdb.d/parse_hwdb.py +++ b/hwdb.d/parse_hwdb.py @@ -74,6 +74,7 @@ TYPES = {'mouse': ('usb', 'bluetooth', 'ps2', '*'), 'keyboard': ('name', ), 'sensor': ('modalias', ), 'ieee1394-unit-function' : ('node', ), + 'camera': ('usb'), } # Patterns that are used to set general properties on a device @@ -167,6 +168,8 @@ def property_grammar(): ('ID_VENDOR_FROM_DATABASE', name_literal), ('ID_MODEL_FROM_DATABASE', name_literal), ('ID_TAG_MASTER_OF_SEAT', Literal('1')), + ('ID_INFRARED_CAMERA', Or((Literal('0'), Literal('1')))), + ('ID_CAMERA_DIRECTION', Or(('front', 'rear'))), ) fixed_props = [Literal(name)('NAME') - Suppress('=') - val('VALUE') for name, val in props] |