mirror of
https://github.com/KytyPS5/KytyPS5.git
synced 2026-10-20 02:47:02 +02:00
haptics: recognize 'Wireless Controller' audio endpoint on Linux (#1046)
On Linux (PipeWire / ALSA), the 4-channel USB audio playback device for the DualSense controller is named 'Wireless Controller' based on Sony's USB product descriptor string. Previously, FindDevice() only matched names containing 'DualSense', causing quad-channel endpoint discovery to fail on Linux systems. Add 'Wireless Controller' to the allowed endpoint names when 4 channels are present, and add a test case verifying discovery under this name.
This commit is contained in:
@@ -438,7 +438,15 @@ void TestDiscoveryAndHotplug() {
|
||||
devices[0].channels = 4;
|
||||
now += 2001;
|
||||
Queue(port, pcm.data());
|
||||
Check(streams.size() == 1 && opened_device == 10, "late USB connection was not discovered");
|
||||
devices.clear();
|
||||
now += 2001;
|
||||
Queue(port, pcm.data());
|
||||
Check(streams.empty(), "disconnected endpoint retained its stream");
|
||||
devices = {{10, "Wireless Controller", 4}};
|
||||
now += 2001;
|
||||
Queue(port, pcm.data());
|
||||
Check(streams.size() == 1 && opened_device == 10,
|
||||
"Linux Wireless Controller endpoint was not discovered");
|
||||
devices.clear();
|
||||
now += 2001;
|
||||
Queue(port, pcm.data());
|
||||
|
||||
Reference in New Issue
Block a user