Re: [PATCH] HID: quirks: fix RetroUSB.com devices

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Dec 6, 2018 at 5:59 PM Nic Soudée <nsoudee@xxxxxxxxx> wrote:
>
> SNES RetroPort and RetroPad register only 4 gamepad buttons
> when they should register all 8 buttons. This is described here:
>
> https://ask.fedoraproject.org/en/question/128102
>
> This is happening because of:
>
> Commit 190d7f02ce8e ("HID: input: do not increment usages when
>     duplicate is found")
>
> Here, I add the quirk HID_QUIRK_INCREMENT_USAGE_ON_DUPLICATE
> (created for backward compatibility with the change in 190d7f02ce8e)
> for the two products.
>
> Tested with both RetroPort and RetroPad.

Hi Nic,

Thanks for the patch. It looks good but I might need a couple of days
before I am able to apply it.

While I try to put my system back on its feet, can you provide me the
hid-recorder[1] outputs of these 2 devices?

I just want to be sure that there is not something I overlooked in the
mentioned patch and that a generic solution should not be used.

Cheers,
Benjamin

[1] http://bentiss.github.io/hid-replay-docs/

>
> Signed-off-by: Nic Soudée <nsoudee@xxxxxxxxx>
> ---
>  drivers/hid/hid-ids.h    | 4 ++++
>  drivers/hid/hid-quirks.c | 2 ++
>  2 files changed, 6 insertions(+)
>
> diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
> index f63489c882bb..ba2f97fd54e5 100644
> --- a/drivers/hid/hid-ids.h
> +++ b/drivers/hid/hid-ids.h
> @@ -933,6 +933,10 @@
>  #define USB_VENDOR_ID_REALTEK          0x0bda
>  #define USB_DEVICE_ID_REALTEK_READER   0x0152
>
> +#define USB_VENDOR_ID_RETROUSB         0xf000
> +#define USB_DEVICE_ID_RETROUSB_SNES_RETROPAD   0x0003
> +#define USB_DEVICE_ID_RETROUSB_SNES_RETROPORT  0x00f1
> +
>  #define USB_VENDOR_ID_ROCCAT           0x1e7d
>  #define USB_DEVICE_ID_ROCCAT_ARVO      0x30d4
>  #define USB_DEVICE_ID_ROCCAT_ISKU      0x319c
> diff --git a/drivers/hid/hid-quirks.c b/drivers/hid/hid-quirks.c
> index 52c3b01917e7..a38f3e08efed 100644
> --- a/drivers/hid/hid-quirks.c
> +++ b/drivers/hid/hid-quirks.c
> @@ -135,6 +135,8 @@ static const struct hid_device_id hid_quirks[] = {
>         { HID_USB_DEVICE(USB_VENDOR_ID_QUANTA, USB_DEVICE_ID_QUANTA_OPTICAL_TOUCH_3003), HID_QUIRK_NOGET },
>         { HID_USB_DEVICE(USB_VENDOR_ID_QUANTA, USB_DEVICE_ID_QUANTA_OPTICAL_TOUCH_3008), HID_QUIRK_NOGET },
>         { HID_USB_DEVICE(USB_VENDOR_ID_REALTEK, USB_DEVICE_ID_REALTEK_READER), HID_QUIRK_NO_INIT_REPORTS },
> +       { HID_USB_DEVICE(USB_VENDOR_ID_RETROUSB, USB_DEVICE_ID_RETROUSB_SNES_RETROPAD), HID_QUIRK_INCREMENT_USAGE_ON_DUPLICATE },
> +       { HID_USB_DEVICE(USB_VENDOR_ID_RETROUSB, USB_DEVICE_ID_RETROUSB_SNES_RETROPORT), HID_QUIRK_INCREMENT_USAGE_ON_DUPLICATE },
>         { HID_USB_DEVICE(USB_VENDOR_ID_SAITEK, USB_DEVICE_ID_SAITEK_RUMBLEPAD), HID_QUIRK_BADPAD },
>         { HID_USB_DEVICE(USB_VENDOR_ID_SEMICO, USB_DEVICE_ID_SEMICO_USB_KEYKOARD2), HID_QUIRK_NO_INIT_REPORTS },
>         { HID_USB_DEVICE(USB_VENDOR_ID_SEMICO, USB_DEVICE_ID_SEMICO_USB_KEYKOARD), HID_QUIRK_NO_INIT_REPORTS },
> --
> 2.19.2
>
>



[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux