hwdb: Add override for headset form-factors

Correct the SOUND_FORM_FACTOR property for Steelseries Arctis headsets.
The USB IDs were all gathered from HeadsetControl[1].

[1]: https://github.com/Sapd/HeadsetControl
This commit is contained in:
Bastien Nocera 2023-07-02 11:44:57 +02:00 committed by Luca Boccassi
parent b9d29a2028
commit 56506988f2
3 changed files with 33 additions and 0 deletions

31
hwdb.d/70-sound-card.hwdb Normal file
View file

@ -0,0 +1,31 @@
# This file is part of systemd.
#
# Database of sound hardware that gets misdetected
#
# To add local entries, copy this file to
# /etc/udev/hwdb.d/
# and add your rules there. To load the new rules execute (as root):
# systemd-hwdb update
# udevadm trigger
###########################################################
# Steelseries
###########################################################
# Arctis Headsets
usb:v1038p12B3*
usb:v1038p12B6*
usb:v1038p12D7*
usb:v1038p1260*
usb:v1038p12AD*
usb:v1038p1252*
usb:v1038p1280*
usb:v1038p220E*
usb:v1038p2212*
usb:v1038p2216*
usb:v1038p2236*
usb:v1038p12C2*
usb:v1038p2202*
usb:v1038p2206*
usb:v1038p220A*
usb:v1038p1290*
SOUND_FORM_FACTOR=headset

View file

@ -33,6 +33,7 @@ hwdb_files_test = files(
'70-mouse.hwdb',
'70-pda.hwdb',
'70-pointingstick.hwdb',
'70-sound-card.hwdb',
'70-touchpad.hwdb',
'80-ieee1394-unit-function.hwdb')

View file

@ -193,6 +193,7 @@ def property_grammar():
('ID_TAG_MASTER_OF_SEAT', Literal('1')),
('ID_INFRARED_CAMERA', Or((Literal('0'), Literal('1')))),
('ID_CAMERA_DIRECTION', Or(('front', 'rear'))),
('SOUND_FORM_FACTOR', Or(('internal', 'webcam', 'speaker', 'headphone', 'headset', 'handset', 'microphone'))),
)
fixed_props = [Literal(name)('NAME') - Suppress('=') - val('VALUE')
for name, val in props]