linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Anthony Agresta <me@anthonyagresta.com>
To: linux-input@vger.kernel.org
Subject: Bug: hid-xinmo: Both joysticks register as player 1
Date: Fri, 4 Sep 2015 10:43:56 -0700	[thread overview]
Message-ID: <CAGJwqMLDHcXa3UDbeTfEj-b9++xxmFduJaCUsZX0bZcBYSS_jQ@mail.gmail.com> (raw)

Hi folks.

I recently upgraded from 3.17.6-1 -> 4.1.6-1, and my joystick stopped
working correctly.
I'm using some admittedly poorly-behaved hardware, with the hid-xinmo driver.

The hardware is a dual-joystick + 22-button USB controller, for use in
a MAME cabinet:
http://www.hollandcomputers.com/store/pc/Arcade-Game-Controller-USB-Interface-PCB-Kit-for-PC-MAME-PS3-to-Mame-2517p6687.htm

On the current hid-input driver, both joysticks control player 1's X
and Y axes, which is no good.

I commented out these lines in /drivers/hid/hid-input.c (around line
619) and it solved my problem:

    case HID_GD_RX: case HID_GD_RY: case HID_GD_RZ:
        /* if (field->flags & HID_MAIN_ITEM_RELATIVE)
            map_rel(usage->hid & 0xf);
        else
            map_abs_clear(usage->hid & 0xf);
        break; */

These were added in commit # 79346d620e9de87912de73337f6df8b7f9a46888 ,
to fix a quirk of an Atmel 840B digitizer by forcing the axes to the
first X and Y.
Unfortunately it looks like it has broken my device.

I'm content to run with a patched kernel for my own personal use,
but it might be good to figure out another way to work around the
Atmel 840B's quirk
without breaking the Xin-Mo dual joystick adapter.

I'm not super familiar with the driver, so I don't have a patch
prepared at the moment.
Please let me know if any further information would be useful.

Thanks,

Anthony Agresta

                 reply	other threads:[~2015-09-04 18:01 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAGJwqMLDHcXa3UDbeTfEj-b9++xxmFduJaCUsZX0bZcBYSS_jQ@mail.gmail.com \
    --to=me@anthonyagresta.com \
    --cc=linux-input@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).