Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add PDP Faceoff Deluxe+ Audio controller #40

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ravikanodia
Copy link

This controller (0e6f:0184) is similar to the "non-deluxe" PDP Wired controller for Switch which is already listed (0e6f:180). I tested this change and as far as I can tell, the controller works as expected in Steam.

Note that 0184 also includes a USB audio interface, connected to a 3.5mm jack on the controller. This audio interface "works for me" in Windows, but in Linux (Ubuntu 22.04), I can see the audio interface listed in my Sound control panel but I have not been able to make audio come out of it. Also, this audio interface seems to only expose itself to the host when a headset is physically connected to the jack - with nothing connected, neither Windows nor Linux seems to recognize the controller as an audio interface. I don't think solving this mystery is required to add support for the device as a gamepad.

There are some other minor differences between the two controllers, but all of that functionality seems to be handled "inside the hardware" so it is transparent to the host. For reference, 0180 includes "turbo" features, while 0184 has remappable back paddles that can be configured to act as any of the "regular" buttons on the controller.

I have both controllers in my possession so if anyone has more questions about them, I am happy to experiment and provide direct information.

This controller (0e6f:0184) is similar to the "non-deluxe" PDP Wired controller for Switch which is already listed (0e6f:180). I tested this change and as far as I can tell, the controller works as expected in Steam.

Note that 0184 also includes a USB audio interface, connected to a 3.5mm jack on the controller. This audio interface "works for me" in Windows, but in Linux (Ubuntu 22.04), I can see the audio interface listed in my Sound control panel but I have not been able to make audio come out of it. Also, this audio interface seems to only expose itself to the host when a headset is physically connected to the jack - with nothing connected, neither Windows nor Linux seems to recognize the controller as an audio interface. I don't think solving this mystery is required to add support for the device as a gamepad.

There are some other minor differences between the two controllers, but all of that functionality seems to be handled "inside the hardware" so it is transparent to the host. For reference, 0180 includes "turbo" features, while 0184 has remappable back paddles that can be configured to act as any of the "regular" buttons on the controller.

I have both controllers in my possession so if anyone has more questions about them, I am happy to experiment and provide direct information.
@smcv
Copy link

smcv commented Apr 6, 2023

If you run

~/.steam/root/ubuntu12_32/steam-runtime/run.sh steam-runtime-input-monitor

with these devices unconnected, wait for it to finish describing all your other devices (it should say {"all-for-now": true} at the end), and then connect each of these devices, what additional information is displayed after the {"all-for-now": true} marker?

Press Ctrl+C to stop the input monitor when it has finished displaying the new device(s). Having that information will help to avoid regressions in SDL for these devices.

@smcv
Copy link

smcv commented Apr 12, 2023

This appears to be a third-party controller intended for Switch. SDL already knows about it.

@slouken, do we want this in src/joystick/SDL_gamepad_db.h, or is generic support for Switch controller clones enough to handle it?

@ravikanodia
Copy link
Author

Apologies for the delay. Here is the output of

~/.steam/root/ubuntu12_32/steam-runtime/run.sh steam-runtime-input-monitor

for each of these controllers, after the all-for-now stanza.

controller-0180.txt
controller-0184.txt

also, here's what it looked like with a headset connected to the 0184 controller, in case that's relevant:
controller-0184-with-headset.txt

@slouken
Copy link
Contributor

slouken commented Jul 9, 2023

@slouken, do we want this in src/joystick/SDL_gamepad_db.h, or is generic support for Switch controller clones enough to handle it?

Yes, we want Nintendo Switch controllers in SDL_gamepad_db.h with the button label hint so the face buttons can be reversed.

@smcv
Copy link

smcv commented Jul 10, 2023

@ravikanodia: thanks, it's useful to have this information for multiple controllers. I assume this:

    "input_ancestor" : {
      "sys_path" : "/sys/devices/virtual/input/input32",
      "name" : "Microsoft X-Box 360 pad 0",
      "bus_type" : "0x0003",
      "vendor_id" : "0x28de",
      "product_id" : "0x11ff",
      "version" : "0x0001"
    }

is the virtual controller created by Steam Input, and doesn't appear if you plug in these controllers while Steam is not running?

@smcv
Copy link

smcv commented Jul 10, 2023

For Steam and SDL's purposes, all three of your reports are equivalent: as you say, extra functionality of these controllers seems to be handled internally.

also, here's what it looked like with a headset connected to the 0184 controller

This appears to be reported by ... changing a 0 to a 1 in the serial number?! Bizarre.

This audio interface "works for me" in Windows, but in Linux (Ubuntu 22.04), I can see the audio interface listed in my Sound control panel but I have not been able to make audio come out of it.

Steam and SDL both do audio routing via the OS's usual audio paths (PulseAudio, Pipewire or occasionally ALSA) so if the kernel handles this audio interface, it should work in Steam and SDL too, and if the kernel doesn't handle it, there's little that Steam or SDL can do about it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants