Audio & haptics with Dualsense
Wireplumber lists the following data related to the Dualsense gamepad, with two controllers connected via USB:
Audio
├─ Devices:
│ 71. DualSense wireless controller (PS5) [alsa]
│ 75. DualSense wireless controller (PS5) [alsa]
│
├─ Sinks:
│ 73. DualSense wireless controller (PS5) Analog Surround 4.0 [vol: 0.40]
│ 84. DualSense wireless controller (PS5) Analog Surround 4.0 [vol: 0.56 MUTED]
│
├─ Sink endpoints:
│
├─ Sources:
│ 70. DualSense wireless controller (PS5) Analog Stereo [vol: 1.00]
│ 90. DualSense wireless controller (PS5) Analog Stereo [vol: 1.00]
│
├─ Source endpoints:
│
└─ Streams:
However, there does not seem to be any code in the Linux kernel relating to audio or anything (other than the buttons). VCM based Haptics seem to be exposed as audio devices, no trace in the driver.
Linux kernel
https://patchwork.kernel.org/project/linux-input/patch/20201219062336.72568-9-roderick@gaikai.com/
The DualSense features a haptics system based on voicecoil motors, which requires PCM data (or special HID packets using Bluetooth). There is no appropriate API yet in the Linux kernel to expose these.
https://patchwork.kernel.org/project/linux-input/patch/20201219062336.72568-11-roderick@gaikai.com/
The DualSense controller has a built-in microphone exposed as an audio device over USB (or HID using Bluetooth). At least the USB HID seems separate from the audio data, this is unfortunate as it will likely be platform-dependent.
This needs further investigating