linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Henrik Rydberg <rydberg@euromail.se>
To: Benjamin Tissoires <benjamin.tissoires@redhat.com>,
	Benjamin Tissoires <benjamin.tissoires@gmail.com>,
	Jiri Kosina <jkosina@suse.cz>,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	David Herrmann <dh.herrmann@gmail.com>,
	Antonio Ospite <ospite@studenti.unina.it>,
	simon@mungewell.org, case@corpsmoderne.net,
	linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0/3] Fixes for multitouch / generic gamepads interaction
Date: Thu, 21 Nov 2013 13:38:30 +0100	[thread overview]
Message-ID: <528DFEC6.3050705@euromail.se> (raw)
In-Reply-To: <1384983141-31019-1-git-send-email-benjamin.tissoires@redhat.com>

Hi Benjamin,

> I have been reported recently a problem with the Sixaxis controller
> (http://www.spinics.net/lists/linux-input/msg28098.html).
> The root of the problem comes from hid-input, which maps unknown axis to
> ABS_MISC. However, when an event code is already in use, hid-input uses the one
> after, leading to uses of ABS_MISC + N, where N is the number of unknown axis.

Yes, and clearly we should not do that. :-)

> We are encountering a problem with the multitouch protocol here because if a
> device has more than 7 unknown axis (which is the case for the PS3 Sixaxis
> controller), then the unknown axis get maps to ABS_MT_SLOT and beyond.
> 
> This infers two problems:
> - the axis currently mapped on ABS_MT_SLOT is a special case in the kernel,
> and it is not updated
> - the axis after ABS_MT_SLOT are not filtered anymore, as the kernel things
> the device is using a multitouch protocol A.

The problem is generic, and ABS_MT_SLOT just happens to be the first value that
the hid logic hits. When sevenaxis comes out, we have to do this all over again.

> The patch 0001 solves the first problem, whereas the patches 0002 and 0003
> fix the second. Bonus point: the userspace is now correctly notified that one of
> the multitouch protocols is in used, so it does not have to rely on bad designed
> heuristics.

The bad heuristics are lines 918 and onwards in hid-input.c. I am sure we can
come up with a way to allocate those axes in a much less fragile way.

Thanks,
Henrik


      parent reply	other threads:[~2013-11-21 12:56 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-20 21:32 [PATCH 0/3] Fixes for multitouch / generic gamepads interaction Benjamin Tissoires
2013-11-20 21:32 ` [PATCH 1/3] Only process ABS_MT_SLOT where there are slots available Benjamin Tissoires
2013-11-21  1:45   ` simon
2013-11-21  4:56   ` Dmitry Torokhov
2013-11-21 10:25     ` Antonio Ospite
2013-11-21 15:53     ` Benjamin Tissoires
2013-11-20 21:32 ` [PATCH 2/3] input: Introduce INPUT_PROP_MT Benjamin Tissoires
2013-11-21  4:57   ` Dmitry Torokhov
2013-11-20 21:32 ` [PATCH 3/3] input: reintroduce filtering of mt axis when the device is not multitouch Benjamin Tissoires
2013-11-21 12:38 ` Henrik Rydberg [this message]

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=528DFEC6.3050705@euromail.se \
    --to=rydberg@euromail.se \
    --cc=benjamin.tissoires@gmail.com \
    --cc=benjamin.tissoires@redhat.com \
    --cc=case@corpsmoderne.net \
    --cc=dh.herrmann@gmail.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=jkosina@suse.cz \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ospite@studenti.unina.it \
    --cc=simon@mungewell.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).