mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-12-23 17:34:00 +03:00
Merge pull request #21130 from systemd/wip/hadess/webcams
Tag IR cameras and allow media* access
This commit is contained in:
commit
3f9335e8e3
25
hwdb.d/70-cameras.hwdb
Normal file
25
hwdb.d/70-cameras.hwdb
Normal file
@ -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
|
@ -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
|
||||
|
@ -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]
|
||||
|
9
rules.d/70-camera.rules
Normal file
9
rules.d/70-camera.rules
Normal file
@ -0,0 +1,9 @@
|
||||
# do not edit this file, it will be overwritten on update
|
||||
|
||||
ACTION=="remove", GOTO="camera_end"
|
||||
|
||||
SUBSYSTEM=="video4linux", ENV{ID_BUS}="usb" , \
|
||||
IMPORT{builtin}="hwdb 'camera:usb:v$env{ID_VENDOR_ID}p$env{ID_MODEL_ID}:name:$attr{name}:'", \
|
||||
GOTO="camera_end"
|
||||
|
||||
LABEL="camera_end"
|
@ -19,6 +19,7 @@ rules = files('''
|
||||
60-persistent-v4l.rules
|
||||
60-sensor.rules
|
||||
60-serial.rules
|
||||
70-camera.rules
|
||||
70-joystick.rules
|
||||
70-mouse.rules
|
||||
70-touchpad.rules
|
||||
|
@ -33,6 +33,7 @@ SUBSYSTEM=="sound", TAG+="uaccess", \
|
||||
# Webcams, frame grabber, TV cards
|
||||
SUBSYSTEM=="video4linux", TAG+="uaccess"
|
||||
SUBSYSTEM=="dvb", TAG+="uaccess"
|
||||
SUBSYSTEM=="media", TAG+="uaccess"
|
||||
|
||||
# industrial cameras, some webcams, camcorders, set-top boxes, TV sets, audio devices, and more
|
||||
SUBSYSTEM=="firewire", TEST=="units", ENV{IEEE1394_UNIT_FUNCTION_MIDI}=="1", TAG+="uaccess"
|
||||
|
Loading…
Reference in New Issue
Block a user