From: Bastien Nocera Date: Sun, 2 Jul 2023 09:44:57 +0000 (+0200) Subject: hwdb: Add override for headset form-factors X-Git-Tag: v254-rc1~52 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=56506988f208e7f96ae0bfd83d1ff9436cb174f5;p=thirdparty%2Fsystemd.git 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 --- diff --git a/hwdb.d/70-sound-card.hwdb b/hwdb.d/70-sound-card.hwdb new file mode 100644 index 00000000000..51b235d94d0 --- /dev/null +++ b/hwdb.d/70-sound-card.hwdb @@ -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 diff --git a/hwdb.d/meson.build b/hwdb.d/meson.build index f1bf073949d..4c5df6ad709 100644 --- a/hwdb.d/meson.build +++ b/hwdb.d/meson.build @@ -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') diff --git a/hwdb.d/parse_hwdb.py b/hwdb.d/parse_hwdb.py index 5a1ae5a6a04..ee3474a6f5e 100755 --- a/hwdb.d/parse_hwdb.py +++ b/hwdb.d/parse_hwdb.py @@ -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]