mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-02-08 05:57:26 +03:00
Merge pull request #19124 from takaswie/topic/fw-audio-entries
hwdb/rule: add database and rules for known audio and music unit in IEEE 1394 bus
This commit is contained in:
commit
ce0cedacc4
1143
hwdb.d/80-ieee1394-unit-function.hwdb
Normal file
1143
hwdb.d/80-ieee1394-unit-function.hwdb
Normal file
File diff suppressed because it is too large
Load Diff
@ -30,6 +30,7 @@ hwdb_files_test = files('''
|
|||||||
70-mouse.hwdb
|
70-mouse.hwdb
|
||||||
70-pointingstick.hwdb
|
70-pointingstick.hwdb
|
||||||
70-touchpad.hwdb
|
70-touchpad.hwdb
|
||||||
|
80-ieee1394-unit-function.hwdb
|
||||||
'''.split())
|
'''.split())
|
||||||
|
|
||||||
if conf.get('ENABLE_HWDB') == 1
|
if conf.get('ENABLE_HWDB') == 1
|
||||||
|
@ -72,6 +72,7 @@ TYPES = {'mouse': ('usb', 'bluetooth', 'ps2', '*'),
|
|||||||
'joystick': ('i8042', 'rmi', 'bluetooth', 'usb'),
|
'joystick': ('i8042', 'rmi', 'bluetooth', 'usb'),
|
||||||
'keyboard': ('name', ),
|
'keyboard': ('name', ),
|
||||||
'sensor': ('modalias', ),
|
'sensor': ('modalias', ),
|
||||||
|
'ieee1394-unit-function' : ('node', ),
|
||||||
}
|
}
|
||||||
|
|
||||||
# Patterns that are used to set general properties on a device
|
# Patterns that are used to set general properties on a device
|
||||||
@ -82,6 +83,7 @@ GENERAL_MATCHES = {'acpi',
|
|||||||
'sdio',
|
'sdio',
|
||||||
'vmbus',
|
'vmbus',
|
||||||
'OUI',
|
'OUI',
|
||||||
|
'ieee1394',
|
||||||
}
|
}
|
||||||
|
|
||||||
def upperhex_word(length):
|
def upperhex_word(length):
|
||||||
@ -99,7 +101,7 @@ def hwdb_grammar():
|
|||||||
matchline = (matchline_typed | matchline_general) + EOL
|
matchline = (matchline_typed | matchline_general) + EOL
|
||||||
|
|
||||||
propertyline = (White(' ', exact=1).suppress() +
|
propertyline = (White(' ', exact=1).suppress() +
|
||||||
Combine(UDEV_TAG - '=' - Optional(Word(alphanums + '_=:@*.!-;, "'))
|
Combine(UDEV_TAG - '=' - Optional(Word(alphanums + '_=:@*.!-;, "/'))
|
||||||
- Optional(pythonStyleComment)) +
|
- Optional(pythonStyleComment)) +
|
||||||
EOL)
|
EOL)
|
||||||
propertycomment = White(' ', exact=1) + pythonStyleComment + EOL
|
propertycomment = White(' ', exact=1) + pythonStyleComment + EOL
|
||||||
@ -122,6 +124,9 @@ def property_grammar():
|
|||||||
mount_matrix = Group(mount_matrix_row + ';' + mount_matrix_row + ';' + mount_matrix_row)('MOUNT_MATRIX')
|
mount_matrix = Group(mount_matrix_row + ';' + mount_matrix_row + ';' + mount_matrix_row)('MOUNT_MATRIX')
|
||||||
xkb_setting = Optional(Word(alphanums + '+-/@._'))
|
xkb_setting = Optional(Word(alphanums + '+-/@._'))
|
||||||
|
|
||||||
|
# Although this set doesn't cover all of characters in database entries, it's enough for test targets.
|
||||||
|
name_literal = Word(printables + ' ')
|
||||||
|
|
||||||
props = (('MOUSE_DPI', Group(OneOrMore(dpi_setting))),
|
props = (('MOUSE_DPI', Group(OneOrMore(dpi_setting))),
|
||||||
('MOUSE_WHEEL_CLICK_ANGLE', INTEGER),
|
('MOUSE_WHEEL_CLICK_ANGLE', INTEGER),
|
||||||
('MOUSE_WHEEL_CLICK_ANGLE_HORIZONTAL', INTEGER),
|
('MOUSE_WHEEL_CLICK_ANGLE_HORIZONTAL', INTEGER),
|
||||||
@ -153,6 +158,11 @@ def property_grammar():
|
|||||||
('ACCEL_MOUNT_MATRIX', mount_matrix),
|
('ACCEL_MOUNT_MATRIX', mount_matrix),
|
||||||
('ACCEL_LOCATION', Or(('display', 'base'))),
|
('ACCEL_LOCATION', Or(('display', 'base'))),
|
||||||
('PROXIMITY_NEAR_LEVEL', INTEGER),
|
('PROXIMITY_NEAR_LEVEL', INTEGER),
|
||||||
|
('IEEE1394_UNIT_FUNCTION_MIDI', Or((Literal('0'), Literal('1')))),
|
||||||
|
('IEEE1394_UNIT_FUNCTION_AUDIO', Or((Literal('0'), Literal('1')))),
|
||||||
|
('IEEE1394_UNIT_FUNCTION_VIDEO', Or((Literal('0'), Literal('1')))),
|
||||||
|
('ID_VENDOR_FROM_DATABASE', name_literal),
|
||||||
|
('ID_MODEL_FROM_DATABASE', name_literal),
|
||||||
)
|
)
|
||||||
fixed_props = [Literal(name)('NAME') - Suppress('=') - val('VALUE')
|
fixed_props = [Literal(name)('NAME') - Suppress('=') - val('VALUE')
|
||||||
for name, val in props]
|
for name, val in props]
|
||||||
|
@ -54,6 +54,16 @@ SUBSYSTEM=="firewire", ATTR{units}=="*0x00b09d:0x00010*", GROUP="video"
|
|||||||
SUBSYSTEM=="firewire", ATTR{units}=="*0x00a02d:0x010001*", GROUP="video"
|
SUBSYSTEM=="firewire", ATTR{units}=="*0x00a02d:0x010001*", GROUP="video"
|
||||||
SUBSYSTEM=="firewire", ATTR{units}=="*0x00a02d:0x014001*", GROUP="video"
|
SUBSYSTEM=="firewire", ATTR{units}=="*0x00a02d:0x014001*", GROUP="video"
|
||||||
|
|
||||||
|
SUBSYSTEM=="firewire", TEST=="units", TEST=="model", \
|
||||||
|
IMPORT{builtin}="hwdb 'ieee1394:node:ven$attr{vendor}mo$attr{model}units$attr{units}'"
|
||||||
|
|
||||||
|
SUBSYSTEM=="firewire", TEST=="units", TEST!="model", \
|
||||||
|
IMPORT{builtin}="hwdb 'ieee1394:node:ven$attr{vendor}units$attr{units}'"
|
||||||
|
|
||||||
|
SUBSYSTEM=="firewire", TEST=="units", ENV{IEEE1394_UNIT_FUNCTION_MIDI}=="1", GROUP="audio"
|
||||||
|
SUBSYSTEM=="firewire", TEST=="units", ENV{IEEE1394_UNIT_FUNCTION_AUDIO}=="1", GROUP="audio"
|
||||||
|
SUBSYSTEM=="firewire", TEST=="units", ENV{IEEE1394_UNIT_FUNCTION_VIDEO}=="1", GROUP="video"
|
||||||
|
|
||||||
KERNEL=="parport[0-9]*", GROUP="lp"
|
KERNEL=="parport[0-9]*", GROUP="lp"
|
||||||
SUBSYSTEM=="printer", KERNEL=="lp*", GROUP="lp"
|
SUBSYSTEM=="printer", KERNEL=="lp*", GROUP="lp"
|
||||||
SUBSYSTEM=="ppdev", GROUP="lp"
|
SUBSYSTEM=="ppdev", GROUP="lp"
|
||||||
|
@ -44,6 +44,10 @@ SUBSYSTEM=="firewire", ATTR{units}=="*0x00b09d:0x00010*", TAG+="uaccess"
|
|||||||
SUBSYSTEM=="firewire", ATTR{units}=="*0x00a02d:0x010001*", TAG+="uaccess"
|
SUBSYSTEM=="firewire", ATTR{units}=="*0x00a02d:0x010001*", TAG+="uaccess"
|
||||||
SUBSYSTEM=="firewire", ATTR{units}=="*0x00a02d:0x014001*", TAG+="uaccess"
|
SUBSYSTEM=="firewire", ATTR{units}=="*0x00a02d:0x014001*", TAG+="uaccess"
|
||||||
|
|
||||||
|
SUBSYSTEM=="firewire", TEST=="units", ENV{IEEE1394_UNIT_FUNCTION_MIDI}=="1", TAG+="uaccess"
|
||||||
|
SUBSYSTEM=="firewire", TEST=="units", ENV{IEEE1394_UNIT_FUNCTION_AUDIO}=="1", TAG+="uaccess"
|
||||||
|
SUBSYSTEM=="firewire", TEST=="units", ENV{IEEE1394_UNIT_FUNCTION_VIDEO}=="1", TAG+="uaccess"
|
||||||
|
|
||||||
# DRI video devices
|
# DRI video devices
|
||||||
SUBSYSTEM=="drm", KERNEL=="card*", TAG+="uaccess"
|
SUBSYSTEM=="drm", KERNEL=="card*", TAG+="uaccess"
|
||||||
m4_ifdef(`GROUP_RENDER_UACCESS',``
|
m4_ifdef(`GROUP_RENDER_UACCESS',``
|
||||||
|
Loading…
x
Reference in New Issue
Block a user