]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
hwdb: classify PlayStation controller audio as controller form-factor
authorJulian Bouzas <julian.bouzas@collabora.com>
Mon, 20 Jul 2026 13:54:48 +0000 (09:54 -0400)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 20 Jul 2026 22:30:37 +0000 (07:30 +0900)
Add Sony PlayStation controller entries to 70-sound-card.hwdb so that their
ALSA sound devices are tagged with SOUND_FORM_FACTOR=controller:
 - DualSense (054c:0ce6)
 - DualSense Edge (054c:0df2)
 - DualShock 4 CUH-ZCT1x (054c:05c4)
 - DualShock 4 CUH-ZCT2x (054c:09cc)

These controllers expose USB audio but are neither headsets nor speakers.
Pinning them in the hwdb ensures they are identified correctly before any
fallback matching occurs.

hwdb.d/70-sound-card.hwdb
hwdb.d/parse_hwdb.py

index 340e6b54e3c5ee17f2ec807efeb9c3d8c017471a..62d005d61e7b07bc9f5f4f6d377a23eeae9ad14f 100644 (file)
@@ -51,6 +51,19 @@ usb:v045Ep02F9*
 usb:v045Ep091E*
  SOUND_FORM_FACTOR=headset
 
+###########################################################
+# Sony
+###########################################################
+# DualSense (PS5)
+usb:v054Cp0CE6*
+# DualSense Edge (PS5)
+usb:v054Cp0DF2*
+# DualShock 4 [CUH-ZCT1x]
+usb:v054Cp05C4*
+# DualShock 4 [CUH-ZCT2x]
+usb:v054Cp09CC*
+ SOUND_FORM_FACTOR=controller
+
 ###########################################################
 # Steelseries
 ###########################################################
index 6402492dff2d3d1fea1bc3d2b6d5c8e1f7ba0094..1532f5237f37f93cdf0ad30b696a526b81d23248 100755 (executable)
@@ -230,7 +230,18 @@ def property_grammar():
         ('ID_CAMERA_DIRECTION', Or(('front', 'rear'))),
         (
             'SOUND_FORM_FACTOR',
-            Or(('internal', 'webcam', 'speaker', 'headphone', 'headset', 'handset', 'microphone')),
+            Or(
+                (
+                    'internal',
+                    'webcam',
+                    'speaker',
+                    'headphone',
+                    'headset',
+                    'handset',
+                    'microphone',
+                    'controller',
+                )
+            ),
         ),
         ('ID_SYS_VENDOR_IS_RUBBISH', zero_one),
         ('ID_PRODUCT_NAME_IS_RUBBISH', zero_one),