From 05016d15206db5fa3355b0ee7de36c607d7283ef Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Sun, 2 Jul 2023 11:44:57 +0200 Subject: [PATCH] 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 (cherry picked from commit 56506988f208e7f96ae0bfd83d1ff9436cb174f5) Related: RHEL-5950 --- hwdb.d/70-sound-card.hwdb | 31 +++++++++++++++++++++++++++++++ hwdb.d/meson.build | 1 + hwdb.d/parse_hwdb.py | 1 + 3 files changed, 33 insertions(+) create mode 100644 hwdb.d/70-sound-card.hwdb diff --git a/hwdb.d/70-sound-card.hwdb b/hwdb.d/70-sound-card.hwdb new file mode 100644 index 0000000000..51b235d94d --- /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 90b71916b7..d073477618 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 5a1ae5a6a0..ee3474a6f5 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]