Commit cf595018 authored by Vicki Pfau's avatar Vicki Pfau Committed by Dmitry Torokhov

Input: xpad - fix PowerA EnWired Controller guide button

This commit explicitly disables the audio interface the same way the official
driver does. This is needed for some controllers, such as the PowerA Enhanced
Wired Controller for Series X|S (0x20d6:0x200e) to report the guide button.
Signed-off-by: default avatarVicki Pfau <vi@endrift.com>
Link: https://lore.kernel.org/r/20230411031650.960322-3-vi@endrift.comSigned-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent f9b2e603
......@@ -1396,6 +1396,21 @@ static int xpad_start_xbox_one(struct usb_xpad *xpad)
unsigned long flags;
int retval;
if (usb_ifnum_to_if(xpad->udev, GIP_WIRED_INTF_AUDIO)) {
/*
* Explicitly disable the audio interface. This is needed
* for some controllers, such as the PowerA Enhanced Wired
* Controller for Series X|S (0x20d6:0x200e) to report the
* guide button.
*/
retval = usb_set_interface(xpad->udev,
GIP_WIRED_INTF_AUDIO, 0);
if (retval)
dev_warn(&xpad->dev->dev,
"unable to disable audio interface: %d\n",
retval);
}
spin_lock_irqsave(&xpad->odata_lock, flags);
/*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment