All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] input: mt: Add an envelope tool type
@ 2010-12-07 11:29 Henrik Rydberg
  2010-12-08 17:43 ` Chase Douglas
  0 siblings, 1 reply; 24+ messages in thread
From: Henrik Rydberg @ 2010-12-07 11:29 UTC (permalink / raw)
  To: Dmitry Torokhov; +Cc: Jiri Kosina, linux-input, linux-kernel, Henrik Rydberg

Some touch devices are capable of detecting the envelope or hull
of the touches, but not the touches themselves. This patch adds
the MT_TOOL_ENVELOPE touch type to be used for such devices.

Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
---
Hi all,

This patch represents an MT solution for those devices that can detect
and report some effects of dual touch, but cannot report individual
contacts. Synaptics and elantech are two examples. Having the drivers
report the bounding rectangle of the touches is useful in userland,
since the information makes it possible to implement zooming
gestures. At the same time, it would be confusing to send these
envelope points as fingers, since they clearly are not. As a remedy,
introduce MT_TOOL_ENVELOPE, which tells applications that care about
details that these are not real fingers, at the same time as it allows
gesture applications based on MT data to function without
modification.

Thanks,
Henrik

 Documentation/input/multi-touch-protocol.txt |    5 +++--
 include/linux/input.h                        |    2 ++
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/Documentation/input/multi-touch-protocol.txt b/Documentation/input/multi-touch-protocol.txt
index bdcba15..690dd11 100644
--- a/Documentation/input/multi-touch-protocol.txt
+++ b/Documentation/input/multi-touch-protocol.txt
@@ -240,7 +240,7 @@ ABS_MT_TOOL_TYPE
 The type of approaching tool. A lot of kernel drivers cannot distinguish
 between different tool types, such as a finger or a pen. In such cases, the
 event should be omitted. The protocol currently supports MT_TOOL_FINGER and
-MT_TOOL_PEN [2].
+MT_TOOL_PEN and MT_TOOL_ENVELOPE [2].
 
 ABS_MT_BLOB_ID
 
@@ -312,7 +312,8 @@ where examples can be found.
 [1] With the extension ABS_MT_APPROACH_X and ABS_MT_APPROACH_Y, the
 difference between the contact position and the approaching tool position
 could be used to derive tilt.
-[2] The list can of course be extended.
+[2] ABS_MT_ENVELOPE contacts represent an envelope of the contacts rather
+than the actual contacts. Used with older, not fully MT capable, devices.
 [3] Multitouch X driver project: http://bitmath.org/code/multitouch/.
 [4] See the section on event computation.
 [5] See the section on finger tracking.
diff --git a/include/linux/input.h b/include/linux/input.h
index dd7c0fc..329dc0e 100644
--- a/include/linux/input.h
+++ b/include/linux/input.h
@@ -848,6 +848,8 @@ struct input_keymap_entry {
  */
 #define MT_TOOL_FINGER		0
 #define MT_TOOL_PEN		1
+#define MT_TOOL_ENVELOPE	2
+#define MT_TOOL_MAX		2
 
 /*
  * Values describing the status of a force-feedback effect
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 24+ messages in thread

* Re: [PATCH] input: mt: Add an envelope tool type
  2010-12-07 11:29 [PATCH] input: mt: Add an envelope tool type Henrik Rydberg
@ 2010-12-08 17:43 ` Chase Douglas
  2010-12-08 18:23   ` Henrik Rydberg
  2010-12-08 23:43   ` Ping Cheng
  0 siblings, 2 replies; 24+ messages in thread
From: Chase Douglas @ 2010-12-08 17:43 UTC (permalink / raw)
  To: Henrik Rydberg; +Cc: Dmitry Torokhov, Jiri Kosina, linux-input, linux-kernel

On 12/07/2010 03:29 AM, Henrik Rydberg wrote:
> Some touch devices are capable of detecting the envelope or hull
> of the touches, but not the touches themselves. This patch adds
> the MT_TOOL_ENVELOPE touch type to be used for such devices.
> 
> Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
> ---
> Hi all,
> 
> This patch represents an MT solution for those devices that can detect
> and report some effects of dual touch, but cannot report individual
> contacts. Synaptics and elantech are two examples. Having the drivers
> report the bounding rectangle of the touches is useful in userland,
> since the information makes it possible to implement zooming
> gestures. At the same time, it would be confusing to send these
> envelope points as fingers, since they clearly are not. As a remedy,
> introduce MT_TOOL_ENVELOPE, which tells applications that care about
> details that these are not real fingers, at the same time as it allows
> gesture applications based on MT data to function without
> modification.

Is it assumed that the envelop has only two touches comprising it? Or is
it any number of touches? If it's any number of touches, how does one
know how many touches it is?

How are the envelop shape and position determined?

I think the idea is good, I just don't have enough information to
understand how the tool type is supposed to be used. This has been an
issue with many evdev properties, so I'm hoping we can provide more
detailed documentation this time around :).

-- Chase

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH] input: mt: Add an envelope tool type
  2010-12-08 17:43 ` Chase Douglas
@ 2010-12-08 18:23   ` Henrik Rydberg
  2010-12-08 18:38     ` Chase Douglas
  2010-12-08 23:43   ` Ping Cheng
  1 sibling, 1 reply; 24+ messages in thread
From: Henrik Rydberg @ 2010-12-08 18:23 UTC (permalink / raw)
  To: Chase Douglas; +Cc: Dmitry Torokhov, Jiri Kosina, linux-input, linux-kernel

>> This patch represents an MT solution for those devices that can detect

>> and report some effects of dual touch, but cannot report individual
>> contacts. Synaptics and elantech are two examples. Having the drivers
>> report the bounding rectangle of the touches is useful in userland,
>> since the information makes it possible to implement zooming
>> gestures. At the same time, it would be confusing to send these
>> envelope points as fingers, since they clearly are not. As a remedy,
>> introduce MT_TOOL_ENVELOPE, which tells applications that care about
>> details that these are not real fingers, at the same time as it allows
>> gesture applications based on MT data to function without
>> modification.
> 
> Is it assumed that the envelop has only two touches comprising it? Or is
> it any number of touches? If it's any number of touches, how does one
> know how many touches it is?


It could be any number of points, although, as you say, the exact semantics of
multiple points have not yet been defined/documented. Traditionally, a convex
hull is defined as a sequence of points, such that the last links to the first.
It makes sense to define the envelope points similarly. However, we can pass
that bridge as we get there. Right now, we have use for the two-point case. The
number is determined the same was as for fingers - count the number of active slots.

> How are the envelop shape and position determined?


I was imagining a convex polygon shape, but frankly, I see no immediate use for
anything but the bounding rectangle.

> I think the idea is good, I just don't have enough information to
> understand how the tool type is supposed to be used. This has been an
> issue with many evdev properties, so I'm hoping we can provide more
> detailed documentation this time around :).


Yes, it is a good point. The current patch at least documents the intended use,
and seems apt for the moment. We can always add more as the concept matures.

Thanks,
Henrik

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH] input: mt: Add an envelope tool type
  2010-12-08 18:23   ` Henrik Rydberg
@ 2010-12-08 18:38     ` Chase Douglas
  2010-12-08 18:52       ` Henrik Rydberg
  0 siblings, 1 reply; 24+ messages in thread
From: Chase Douglas @ 2010-12-08 18:38 UTC (permalink / raw)
  To: Henrik Rydberg; +Cc: Dmitry Torokhov, Jiri Kosina, linux-input, linux-kernel

On 12/08/2010 10:23 AM, Henrik Rydberg wrote:
>>> This patch represents an MT solution for those devices that can detect
> 
>>> and report some effects of dual touch, but cannot report individual
>>> contacts. Synaptics and elantech are two examples. Having the drivers
>>> report the bounding rectangle of the touches is useful in userland,
>>> since the information makes it possible to implement zooming
>>> gestures. At the same time, it would be confusing to send these
>>> envelope points as fingers, since they clearly are not. As a remedy,
>>> introduce MT_TOOL_ENVELOPE, which tells applications that care about
>>> details that these are not real fingers, at the same time as it allows
>>> gesture applications based on MT data to function without
>>> modification.
>>
>> Is it assumed that the envelop has only two touches comprising it? Or is
>> it any number of touches? If it's any number of touches, how does one
>> know how many touches it is?
> 
> 
> It could be any number of points, although, as you say, the exact semantics of
> multiple points have not yet been defined/documented. Traditionally, a convex
> hull is defined as a sequence of points, such that the last links to the first.
> It makes sense to define the envelope points similarly. However, we can pass
> that bridge as we get there. Right now, we have use for the two-point case. The
> number is determined the same was as for fingers - count the number of active slots.

Ahh. That leaves me with two thoughts:

1. A real convex hull would imply that the points given are correct.
This is the fundamental issue with these touchpads though, and I feel
envelope semantics would only help solve a different problem: touch
object shape.

As you noted, what we are really interested here is a bounding
rectangle. I think Ping has said that Wacom could provide something that
is similar to a real convex hull, and mixing the two concepts together
could cause another ambiguity like BTN_TOOL_DOUBLETAP :).

I suggest merely renaming this to MT_TOOL_RECT to avoid confusion.

2. We could provide for multiple simultaneous rects by using the value
of the MT_TOOL_RECT property. The first rect would have value 0, the
second would have value 1, etc. I don't know if this will ever be used
since most devices will have real MT soon enough, but it wouldn't hurt
to define this.

-- Chase

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH] input: mt: Add an envelope tool type
  2010-12-08 18:38     ` Chase Douglas
@ 2010-12-08 18:52       ` Henrik Rydberg
  2010-12-08 19:09         ` Chase Douglas
  0 siblings, 1 reply; 24+ messages in thread
From: Henrik Rydberg @ 2010-12-08 18:52 UTC (permalink / raw)
  To: Chase Douglas; +Cc: Dmitry Torokhov, Jiri Kosina, linux-input, linux-kernel

>> It could be any number of points, although, as you say, the exact semantics
>> of multiple points have not yet been defined/documented. Traditionally, a
>> convex hull is defined as a sequence of points, such that the last links to
>> the first. It makes sense to define the envelope points similarly. However,
>> we can pass that bridge as we get there. Right now, we have use for the
>> two-point case. The number is determined the same was as for fingers - count
>> the number of active slots.

>
> Ahh. That leaves me with two thoughts:
> 
> 1. A real convex hull would imply that the points given are correct.
> This is the fundamental issue with these touchpads though, and I feel
> envelope semantics would only help solve a different problem: touch
> object shape.


We have blobs for this case, which is a question in itself. Touch shape has some
basic properties, but common to them all is that all events apply to one touch
id. The envelope points, on the other hand, have different touch ids. Hence, I
think the chance of eventual mixup is still remote. Also, I am not necessarily
thinking of blobs as the first step towards more general shapes. (A pole
expansion might be more useful to applications, for instance.)

> As you noted, what we are really interested here is a bounding
> rectangle. I think Ping has said that Wacom could provide something that
> is similar to a real convex hull, and mixing the two concepts together
> could cause another ambiguity like BTN_TOOL_DOUBLETAP :).


True, we should work towards avoiding such ambiguities.

> I suggest merely renaming this to MT_TOOL_RECT to avoid confusion.
> 
> 2. We could provide for multiple simultaneous rects by using the value
> of the MT_TOOL_RECT property. The first rect would have value 0, the
> second would have value 1, etc. I don't know if this will ever be used
> since most devices will have real MT soon enough, but it wouldn't hurt
> to define this.


I do think this is an unnecessary complication.

Thanks,
Henrik

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH] input: mt: Add an envelope tool type
  2010-12-08 18:52       ` Henrik Rydberg
@ 2010-12-08 19:09         ` Chase Douglas
  2010-12-08 19:23           ` Henrik Rydberg
  0 siblings, 1 reply; 24+ messages in thread
From: Chase Douglas @ 2010-12-08 19:09 UTC (permalink / raw)
  To: Henrik Rydberg; +Cc: Dmitry Torokhov, Jiri Kosina, linux-input, linux-kernel

On 12/08/2010 10:52 AM, Henrik Rydberg wrote:
>> As you noted, what we are really interested here is a bounding
>> rectangle. I think Ping has said that Wacom could provide something that
>> is similar to a real convex hull, and mixing the two concepts together
>> could cause another ambiguity like BTN_TOOL_DOUBLETAP :).
> 
> 
> True, we should work towards avoiding such ambiguities.
> 
>> I suggest merely renaming this to MT_TOOL_RECT to avoid confusion.

This is really the main point I wanted to make, even though it was
hidden among other things :). Do you have thoughts here?

>> 2. We could provide for multiple simultaneous rects by using the value
>> of the MT_TOOL_RECT property. The first rect would have value 0, the
>> second would have value 1, etc. I don't know if this will ever be used
>> since most devices will have real MT soon enough, but it wouldn't hurt
>> to define this.
> 
> I do think this is an unnecessary complication.

It's not really any complication. I think we should define what the
valid values are for MT_TOOL_{RECT,ENVELOPE} even if only one envelope
is supported. Thus, I don't see why we shouldn't allow for multiple
values for multiple rects.

Hardware manufacturers always seem to surprise us with what they come up
with too :).

-- Chase

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH] input: mt: Add an envelope tool type
  2010-12-08 19:09         ` Chase Douglas
@ 2010-12-08 19:23           ` Henrik Rydberg
  2010-12-08 19:53               ` Mohamed Ikbel Boulabiar
                               ` (2 more replies)
  0 siblings, 3 replies; 24+ messages in thread
From: Henrik Rydberg @ 2010-12-08 19:23 UTC (permalink / raw)
  To: Chase Douglas; +Cc: Dmitry Torokhov, Jiri Kosina, linux-input, linux-kernel

>>> I suggest merely renaming this to MT_TOOL_RECT to avoid confusion.

> 
> This is really the main point I wanted to make, even though it was
> hidden among other things :). Do you have thoughts here?


I think envelope works fine - it is easier to associate with a single point that
the notion of a rectangle.

>>> 2. We could provide for multiple simultaneous rects by using the value
>>> of the MT_TOOL_RECT property. The first rect would have value 0, the
>>> second would have value 1, etc. I don't know if this will ever be used
>>> since most devices will have real MT soon enough, but it wouldn't hurt
>>> to define this.
>>
>> I do think this is an unnecessary complication.
> 
> It's not really any complication. I think we should define what the
> valid values are for MT_TOOL_{RECT,ENVELOPE} even if only one envelope
> is supported. Thus, I don't see why we shouldn't allow for multiple
> values for multiple rects.

> 
> Hardware manufacturers always seem to surprise us with what they come up
> with too :).


Yes, which is exciting per se. However, hardware seems to be moving towards more
individual (and tracked) contacts, and more granularity per contact. The idea of
supporting complex, non-connected boundaries (implication of your proposal),
which by construction contains less information that the individual contacts,
seems to be going against that trend. Since there are no current need for it,
and the indications point in a different direction, I suggest we put that in the
bag of possible "I told you so", and leave it open for now. ;-)

Cheers,
Henrik

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH] input: mt: Add an envelope tool type
  2010-12-08 19:23           ` Henrik Rydberg
@ 2010-12-08 19:53               ` Mohamed Ikbel Boulabiar
       [not found]             ` <AANLkTi=iw+7CDhbO4N9rMVSwS0t93BaaBVgoAwz-GeHo@mail.gmail.com>
  2010-12-08 20:44             ` Chase Douglas
  2 siblings, 0 replies; 24+ messages in thread
From: Mohamed Ikbel Boulabiar @ 2010-12-08 19:53 UTC (permalink / raw)
  To: linux-input, linux-kernel

I have seen this touchless touchpad hardware (huh?)
it detects finger/hand and it's better explained by a video:

http://www.youtube.com/watch?v=6SjMdtdhXlA

How it fit in the convex notion?


i

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH] input: mt: Add an envelope tool type
@ 2010-12-08 19:53               ` Mohamed Ikbel Boulabiar
  0 siblings, 0 replies; 24+ messages in thread
From: Mohamed Ikbel Boulabiar @ 2010-12-08 19:53 UTC (permalink / raw)
  To: linux-input, linux-kernel

I have seen this touchless touchpad hardware (huh?)
it detects finger/hand and it's better explained by a video:

http://www.youtube.com/watch?v=6SjMdtdhXlA

How it fit in the convex notion?


i
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH] input: mt: Add an envelope tool type
       [not found]             ` <AANLkTi=iw+7CDhbO4N9rMVSwS0t93BaaBVgoAwz-GeHo@mail.gmail.com>
@ 2010-12-08 20:02               ` Henrik Rydberg
  2010-12-08 20:17                 ` Mohamed Ikbel Boulabiar
  0 siblings, 1 reply; 24+ messages in thread
From: Henrik Rydberg @ 2010-12-08 20:02 UTC (permalink / raw)
  To: Mohamed Ikbel Boulabiar
  Cc: Chase Douglas, Dmitry Torokhov, Jiri Kosina, linux-input, linux-kernel

On 12/08/2010 08:51 PM, Mohamed Ikbel Boulabiar wrote:

> I have seen this touchless touchpad hardware (huh?)
> it detects finger/hand and it's better explained by a video:
> http://www.youtube.com/watch?v=6SjMdtdhXlA
> 
> How it fit in the convex notion?


This is precisely what the patch for ABS_MT_DISTANCE is for. Perhaps you meant
to comment on that email. This one is about support for hardware without
individual finger detection capabilities.

Henrik

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH] input: mt: Add an envelope tool type
  2010-12-08 20:02               ` Henrik Rydberg
@ 2010-12-08 20:17                 ` Mohamed Ikbel Boulabiar
  0 siblings, 0 replies; 24+ messages in thread
From: Mohamed Ikbel Boulabiar @ 2010-12-08 20:17 UTC (permalink / raw)
  To: Henrik Rydberg
  Cc: Chase Douglas, Dmitry Torokhov, Jiri Kosina, linux-input, linux-kernel

On Wed, Dec 8, 2010 at 9:02 PM, Henrik Rydberg <rydberg@euromail.se> wrote:
> This is precisely what the patch for ABS_MT_DISTANCE is for. Perhaps you meant
> to comment on that email. This one is about support for hardware without
> individual finger detection capabilities.

yes, I mixed up mails :)

i

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH] input: mt: Add an envelope tool type
  2010-12-08 19:23           ` Henrik Rydberg
  2010-12-08 19:53               ` Mohamed Ikbel Boulabiar
       [not found]             ` <AANLkTi=iw+7CDhbO4N9rMVSwS0t93BaaBVgoAwz-GeHo@mail.gmail.com>
@ 2010-12-08 20:44             ` Chase Douglas
  2 siblings, 0 replies; 24+ messages in thread
From: Chase Douglas @ 2010-12-08 20:44 UTC (permalink / raw)
  To: Henrik Rydberg; +Cc: Dmitry Torokhov, Jiri Kosina, linux-input, linux-kernel

On 12/08/2010 11:23 AM, Henrik Rydberg wrote:
>>>> I suggest merely renaming this to MT_TOOL_RECT to avoid confusion.
> 
>>
>> This is really the main point I wanted to make, even though it was
>> hidden among other things :). Do you have thoughts here?
> 
> 
> I think envelope works fine - it is easier to associate with a single point that
> the notion of a rectangle.

I thought we were talking specifically about two points? If I'm wrong,
the following won't make any sense either :).

There would be two slots with MT_TOOL_ENVELOPE set to 1. These define
the two possible combinations of touch points. I can't see how this
concept could be expanded any further than a rectangle without switcing
to full MT, thus I think it would be clearer to define it as such.

This all drives at the heart of the frustrations felt about evdev
property naming and documentation. The envelope tool, as you've
proposed, is only useful for defining rectangles. I think leaving it
named envelope is just begging for misuse, just as BTN_TOOL_DOUBLETAP
has been misused.

Perhaps it will be clearer to me why you like the name envelope if I
could read the formal documentation that would be merged along with the
new property name. The documentation added by the patch just isn't
enough to understand what it's for or how to use it, and the discussion
so far hasn't left me with the feeling that MT_TOOL_ENVELOPE is the best
name.

-- Chase

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH] input: mt: Add an envelope tool type
  2010-12-08 17:43 ` Chase Douglas
  2010-12-08 18:23   ` Henrik Rydberg
@ 2010-12-08 23:43   ` Ping Cheng
  2010-12-08 23:58     ` Dmitry Torokhov
  1 sibling, 1 reply; 24+ messages in thread
From: Ping Cheng @ 2010-12-08 23:43 UTC (permalink / raw)
  To: Chase Douglas
  Cc: Henrik Rydberg, Dmitry Torokhov, Jiri Kosina, linux-input, linux-kernel

On Wed, Dec 8, 2010 at 9:43 AM, Chase Douglas
<chase.douglas@canonical.com> wrote:
> On 12/07/2010 03:29 AM, Henrik Rydberg wrote:
>> Some touch devices are capable of detecting the envelope or hull
>> of the touches, but not the touches themselves. This patch adds
>> the MT_TOOL_ENVELOPE touch type to be used for such devices.
>>
>> Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
>> ---
>> Hi all,
>>
>> This patch represents an MT solution for those devices that can detect
>> and report some effects of dual touch, but cannot report individual
>> contacts. Synaptics and elantech are two examples. Having the drivers
>> report the bounding rectangle of the touches is useful in userland,
>> since the information makes it possible to implement zooming
>> gestures. At the same time, it would be confusing to send these
>> envelope points as fingers, since they clearly are not. As a remedy,
>> introduce MT_TOOL_ENVELOPE, which tells applications that care about
>> details that these are not real fingers, at the same time as it allows
>> gesture applications based on MT data to function without
>> modification.
>
> Is it assumed that the envelop has only two touches comprising it? Or is
> it any number of touches? If it's any number of touches, how does one
> know how many touches it is?

Those are good questions. Specifying how many touches are in the
envelop makes sense. It also covers rectangle as a special case of
envelop.

Ping

> How are the envelop shape and position determined?
>
> I think the idea is good, I just don't have enough information to
> understand how the tool type is supposed to be used. This has been an
> issue with many evdev properties, so I'm hoping we can provide more
> detailed documentation this time around :).
>
> -- Chase
> --
> To unsubscribe from this list: send the line "unsubscribe linux-input" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH] input: mt: Add an envelope tool type
  2010-12-08 23:43   ` Ping Cheng
@ 2010-12-08 23:58     ` Dmitry Torokhov
  2010-12-09  0:06       ` Ping Cheng
  2010-12-09  1:12       ` Henrik Rydberg
  0 siblings, 2 replies; 24+ messages in thread
From: Dmitry Torokhov @ 2010-12-08 23:58 UTC (permalink / raw)
  To: Ping Cheng
  Cc: Chase Douglas, Henrik Rydberg, Jiri Kosina, linux-input, linux-kernel

On Wed, Dec 08, 2010 at 03:43:51PM -0800, Ping Cheng wrote:
> On Wed, Dec 8, 2010 at 9:43 AM, Chase Douglas
> <chase.douglas@canonical.com> wrote:
> > On 12/07/2010 03:29 AM, Henrik Rydberg wrote:
> >> Some touch devices are capable of detecting the envelope or hull
> >> of the touches, but not the touches themselves. This patch adds
> >> the MT_TOOL_ENVELOPE touch type to be used for such devices.
> >>
> >> Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
> >> ---
> >> Hi all,
> >>
> >> This patch represents an MT solution for those devices that can detect
> >> and report some effects of dual touch, but cannot report individual
> >> contacts. Synaptics and elantech are two examples. Having the drivers
> >> report the bounding rectangle of the touches is useful in userland,
> >> since the information makes it possible to implement zooming
> >> gestures. At the same time, it would be confusing to send these
> >> envelope points as fingers, since they clearly are not. As a remedy,
> >> introduce MT_TOOL_ENVELOPE, which tells applications that care about
> >> details that these are not real fingers, at the same time as it allows
> >> gesture applications based on MT data to function without
> >> modification.
> >
> > Is it assumed that the envelop has only two touches comprising it? Or is
> > it any number of touches? If it's any number of touches, how does one
> > know how many touches it is?
> 
> Those are good questions. Specifying how many touches are in the
> envelop makes sense. It also covers rectangle as a special case of
> envelop.

I have a feeling that trying to accomodate non-rectangular, more than 2
point shapes without using native MT data is over-engineering the
problem... Do we have examples other than older generation Elantechs and
Synaptics that need envelope notion?

-- 
Dmitry

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH] input: mt: Add an envelope tool type
  2010-12-08 23:58     ` Dmitry Torokhov
@ 2010-12-09  0:06       ` Ping Cheng
  2010-12-09  1:18         ` Henrik Rydberg
  2010-12-09  1:38         ` Mohamed Ikbel Boulabiar
  2010-12-09  1:12       ` Henrik Rydberg
  1 sibling, 2 replies; 24+ messages in thread
From: Ping Cheng @ 2010-12-09  0:06 UTC (permalink / raw)
  To: Dmitry Torokhov
  Cc: Chase Douglas, Henrik Rydberg, Jiri Kosina, linux-input, linux-kernel

On Wed, Dec 8, 2010 at 3:58 PM, Dmitry Torokhov
<dmitry.torokhov@gmail.com> wrote:
> On Wed, Dec 08, 2010 at 03:43:51PM -0800, Ping Cheng wrote:
>> On Wed, Dec 8, 2010 at 9:43 AM, Chase Douglas
>> <chase.douglas@canonical.com> wrote:
>> > On 12/07/2010 03:29 AM, Henrik Rydberg wrote:
>> >> Some touch devices are capable of detecting the envelope or hull
>> >> of the touches, but not the touches themselves. This patch adds
>> >> the MT_TOOL_ENVELOPE touch type to be used for such devices.
>> >>
>> >> Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
>> >> ---
>> >> Hi all,
>> >>
>> >> This patch represents an MT solution for those devices that can detect
>> >> and report some effects of dual touch, but cannot report individual
>> >> contacts. Synaptics and elantech are two examples. Having the drivers
>> >> report the bounding rectangle of the touches is useful in userland,
>> >> since the information makes it possible to implement zooming
>> >> gestures. At the same time, it would be confusing to send these
>> >> envelope points as fingers, since they clearly are not. As a remedy,
>> >> introduce MT_TOOL_ENVELOPE, which tells applications that care about
>> >> details that these are not real fingers, at the same time as it allows
>> >> gesture applications based on MT data to function without
>> >> modification.
>> >
>> > Is it assumed that the envelop has only two touches comprising it? Or is
>> > it any number of touches? If it's any number of touches, how does one
>> > know how many touches it is?
>>
>> Those are good questions. Specifying how many touches are in the
>> envelop makes sense. It also covers rectangle as a special case of
>> envelop.
>
> I have a feeling that trying to accomodate non-rectangular,

No, we are not talking about non-rectangular shape here. Envelop is
always a rectangle. By rectangle above, I meant 2 touches.

An envelop that includes number of touches offers us more information
than a rectangle does.

Ping

> more than 2 point shapes without using native MT data is over-engineering the
> problem... Do we have examples other than older generation Elantechs and
> Synaptics that need envelope notion?
>
> --
> Dmitry
>

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH] input: mt: Add an envelope tool type
  2010-12-08 23:58     ` Dmitry Torokhov
  2010-12-09  0:06       ` Ping Cheng
@ 2010-12-09  1:12       ` Henrik Rydberg
  2010-12-09  1:17         ` Dmitry Torokhov
  2010-12-09  1:20         ` Ping Cheng
  1 sibling, 2 replies; 24+ messages in thread
From: Henrik Rydberg @ 2010-12-09  1:12 UTC (permalink / raw)
  To: Dmitry Torokhov
  Cc: Ping Cheng, Chase Douglas, Jiri Kosina, linux-input, linux-kernel

>>>

>>> Is it assumed that the envelop has only two touches comprising it? Or is
>>> it any number of touches? If it's any number of touches, how does one
>>> know how many touches it is?
>>
>> Those are good questions. Specifying how many touches are in the
>> envelop makes sense. It also covers rectangle as a special case of
>> envelop.
> 
> I have a feeling that trying to accomodate non-rectangular, more than 2
> point shapes without using native MT data is over-engineering the
> problem... Do we have examples other than older generation Elantechs and
> Synaptics that need envelope notion?
> 


Those are the ones targeted so far. Maybe appletouch could be added to the list
as well. I imagine all drivers will end up using zero, one and two envelope points.

Henrik

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH] input: mt: Add an envelope tool type
  2010-12-09  1:12       ` Henrik Rydberg
@ 2010-12-09  1:17         ` Dmitry Torokhov
  2010-12-09  1:24           ` Henrik Rydberg
  2010-12-09  1:20         ` Ping Cheng
  1 sibling, 1 reply; 24+ messages in thread
From: Dmitry Torokhov @ 2010-12-09  1:17 UTC (permalink / raw)
  To: Henrik Rydberg
  Cc: Ping Cheng, Chase Douglas, Jiri Kosina, linux-input, linux-kernel

On Thu, Dec 09, 2010 at 02:12:08AM +0100, Henrik Rydberg wrote:
> >>>
> 
> >>> Is it assumed that the envelop has only two touches comprising it? Or is
> >>> it any number of touches? If it's any number of touches, how does one
> >>> know how many touches it is?
> >>
> >> Those are good questions. Specifying how many touches are in the
> >> envelop makes sense. It also covers rectangle as a special case of
> >> envelop.
> > 
> > I have a feeling that trying to accomodate non-rectangular, more than 2
> > point shapes without using native MT data is over-engineering the
> > problem... Do we have examples other than older generation Elantechs and
> > Synaptics that need envelope notion?
> > 
> 
> 
> Those are the ones targeted so far. Maybe appletouch could be added to the list
> as well. I imagine all drivers will end up using zero, one and two envelope points.

Even ones that fully support independent finger tracking?

-- 
Dmitry

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH] input: mt: Add an envelope tool type
  2010-12-09  0:06       ` Ping Cheng
@ 2010-12-09  1:18         ` Henrik Rydberg
  2010-12-09  1:22           ` Ping Cheng
  2010-12-09  1:38         ` Mohamed Ikbel Boulabiar
  1 sibling, 1 reply; 24+ messages in thread
From: Henrik Rydberg @ 2010-12-09  1:18 UTC (permalink / raw)
  To: Ping Cheng
  Cc: Dmitry Torokhov, Chase Douglas, Jiri Kosina, linux-input, linux-kernel

>>> Those are good questions. Specifying how many touches are in the

>>> envelop makes sense. It also covers rectangle as a special case of
>>> envelop.
>>
>> I have a feeling that trying to accomodate non-rectangular,
> 
> No, we are not talking about non-rectangular shape here. Envelop is
> always a rectangle. By rectangle above, I meant 2 touches.
> 
> An envelop that includes number of touches offers us more information
> than a rectangle does.


All you need to do to know how many points there are is to count them. :-)

Henrik

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH] input: mt: Add an envelope tool type
  2010-12-09  1:12       ` Henrik Rydberg
  2010-12-09  1:17         ` Dmitry Torokhov
@ 2010-12-09  1:20         ` Ping Cheng
  2010-12-09  2:01           ` Henrik Rydberg
  1 sibling, 1 reply; 24+ messages in thread
From: Ping Cheng @ 2010-12-09  1:20 UTC (permalink / raw)
  To: Henrik Rydberg
  Cc: Dmitry Torokhov, Chase Douglas, Jiri Kosina, linux-input, linux-kernel

On Wed, Dec 8, 2010 at 5:12 PM, Henrik Rydberg <rydberg@euromail.se> wrote:
>>>>
>
>>>> Is it assumed that the envelop has only two touches comprising it? Or is
>>>> it any number of touches? If it's any number of touches, how does one
>>>> know how many touches it is?
>>>
>>> Those are good questions. Specifying how many touches are in the
>>> envelop makes sense. It also covers rectangle as a special case of
>>> envelop.
>>
>> I have a feeling that trying to accomodate non-rectangular, more than 2
>> point shapes without using native MT data is over-engineering the
>> problem... Do we have examples other than older generation Elantechs and
>> Synaptics that need envelope notion?
>>
>
>
> Those are the ones targeted so far. Maybe appletouch could be added to the list
> as well. I imagine all drivers will end up using zero, one and two envelope points.

What are the "points" here? Do you mean the points inside the envelope
or number of envelopes?

Ping

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH] input: mt: Add an envelope tool type
  2010-12-09  1:18         ` Henrik Rydberg
@ 2010-12-09  1:22           ` Ping Cheng
  0 siblings, 0 replies; 24+ messages in thread
From: Ping Cheng @ 2010-12-09  1:22 UTC (permalink / raw)
  To: Henrik Rydberg
  Cc: Dmitry Torokhov, Chase Douglas, Jiri Kosina, linux-input, linux-kernel

On Wed, Dec 8, 2010 at 5:18 PM, Henrik Rydberg <rydberg@euromail.se> wrote:
>>>> Those are good questions. Specifying how many touches are in the
>
>>>> envelop makes sense. It also covers rectangle as a special case of
>>>> envelop.
>>>
>>> I have a feeling that trying to accomodate non-rectangular,
>>
>> No, we are not talking about non-rectangular shape here. Envelop is
>> always a rectangle. By rectangle above, I meant 2 touches.
>>
>> An envelop that includes number of touches offers us more information
>> than a rectangle does.
>
>
> All you need to do to know how many points there are is to count them. :-)

Yeah, you are right. What if the client does not have the information
to count them if we do not pass them over?

Ping

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH] input: mt: Add an envelope tool type
  2010-12-09  1:17         ` Dmitry Torokhov
@ 2010-12-09  1:24           ` Henrik Rydberg
  0 siblings, 0 replies; 24+ messages in thread
From: Henrik Rydberg @ 2010-12-09  1:24 UTC (permalink / raw)
  To: Dmitry Torokhov
  Cc: Ping Cheng, Chase Douglas, Jiri Kosina, linux-input, linux-kernel

On 12/09/2010 02:17 AM, Dmitry Torokhov wrote:

> On Thu, Dec 09, 2010 at 02:12:08AM +0100, Henrik Rydberg wrote:
>>>>>
>>
>>>>> Is it assumed that the envelop has only two touches comprising it? Or is
>>>>> it any number of touches? If it's any number of touches, how does one
>>>>> know how many touches it is?
>>>>
>>>> Those are good questions. Specifying how many touches are in the
>>>> envelop makes sense. It also covers rectangle as a special case of
>>>> envelop.
>>>
>>> I have a feeling that trying to accomodate non-rectangular, more than 2
>>> point shapes without using native MT data is over-engineering the
>>> problem... Do we have examples other than older generation Elantechs and
>>> Synaptics that need envelope notion?
>>>
>>
>>
>> Those are the ones targeted so far. Maybe appletouch could be added to the list
>> as well. I imagine all drivers will end up using zero, one and two envelope points.
> 
> Even ones that fully support independent finger tracking?
> 


No, sorry, that should read "all drivers in that list". The ones that can detect
individual fingers in space are fine as they are.

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH] input: mt: Add an envelope tool type
  2010-12-09  0:06       ` Ping Cheng
  2010-12-09  1:18         ` Henrik Rydberg
@ 2010-12-09  1:38         ` Mohamed Ikbel Boulabiar
  2010-12-09  1:51           ` Henrik Rydberg
  1 sibling, 1 reply; 24+ messages in thread
From: Mohamed Ikbel Boulabiar @ 2010-12-09  1:38 UTC (permalink / raw)
  To: Ping Cheng
  Cc: Dmitry Torokhov, Chase Douglas, Henrik Rydberg, Jiri Kosina,
	linux-input, linux-kernel

On Thu, Dec 9, 2010 at 1:06 AM, Ping Cheng <pinglinux@gmail.com> wrote:
> No, we are not talking about non-rectangular shape here. Envelop is
> always a rectangle. By rectangle above, I meant 2 touches.
>
> An envelop that includes number of touches offers us more information
> than a rectangle does

Can we have more information that just a rect ? An ellipse for exemple.
Can we get this information at least from synaptics touchpads?


i

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH] input: mt: Add an envelope tool type
  2010-12-09  1:38         ` Mohamed Ikbel Boulabiar
@ 2010-12-09  1:51           ` Henrik Rydberg
  0 siblings, 0 replies; 24+ messages in thread
From: Henrik Rydberg @ 2010-12-09  1:51 UTC (permalink / raw)
  To: Mohamed Ikbel Boulabiar
  Cc: Ping Cheng, Dmitry Torokhov, Chase Douglas, Jiri Kosina,
	linux-input, linux-kernel

On 12/09/2010 02:38 AM, Mohamed Ikbel Boulabiar wrote:

> On Thu, Dec 9, 2010 at 1:06 AM, Ping Cheng <pinglinux@gmail.com> wrote:
>> No, we are not talking about non-rectangular shape here. Envelop is
>> always a rectangle. By rectangle above, I meant 2 touches.
>>
>> An envelop that includes number of touches offers us more information
>> than a rectangle does
> 
> Can we have more information that just a rect ? An ellipse for exemple.
> Can we get this information at least from synaptics touchpads?


Unfortunately not. Chris Bagwell and myself have been experimenting with quite a
few different approaches to extract touch information from the synaptics pads.
The present approach, to extract the bounding rectangle, is the best we can do,
I am afraid - at least with the information unveiled in Takashi's original
patch. In particular, rotation information is not reliably extractable.

Henrik

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH] input: mt: Add an envelope tool type
  2010-12-09  1:20         ` Ping Cheng
@ 2010-12-09  2:01           ` Henrik Rydberg
  0 siblings, 0 replies; 24+ messages in thread
From: Henrik Rydberg @ 2010-12-09  2:01 UTC (permalink / raw)
  To: Ping Cheng
  Cc: Dmitry Torokhov, Chase Douglas, Jiri Kosina, linux-input, linux-kernel

>

> What are the "points" here? Do you mean the points inside the envelope
> or number of envelopes?


Oh well, I take this and Chase's comments as a hint that the documentation
should have a section of MT_TOOL types, and each tool type should be explained,
in particular the new MT_TOOL_ENVELOPE. It should also help when/if converting
the Pen&Touch logic to MT.

Thanks.
Henrik

^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2010-12-09  2:02 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-07 11:29 [PATCH] input: mt: Add an envelope tool type Henrik Rydberg
2010-12-08 17:43 ` Chase Douglas
2010-12-08 18:23   ` Henrik Rydberg
2010-12-08 18:38     ` Chase Douglas
2010-12-08 18:52       ` Henrik Rydberg
2010-12-08 19:09         ` Chase Douglas
2010-12-08 19:23           ` Henrik Rydberg
2010-12-08 19:53             ` Mohamed Ikbel Boulabiar
2010-12-08 19:53               ` Mohamed Ikbel Boulabiar
     [not found]             ` <AANLkTi=iw+7CDhbO4N9rMVSwS0t93BaaBVgoAwz-GeHo@mail.gmail.com>
2010-12-08 20:02               ` Henrik Rydberg
2010-12-08 20:17                 ` Mohamed Ikbel Boulabiar
2010-12-08 20:44             ` Chase Douglas
2010-12-08 23:43   ` Ping Cheng
2010-12-08 23:58     ` Dmitry Torokhov
2010-12-09  0:06       ` Ping Cheng
2010-12-09  1:18         ` Henrik Rydberg
2010-12-09  1:22           ` Ping Cheng
2010-12-09  1:38         ` Mohamed Ikbel Boulabiar
2010-12-09  1:51           ` Henrik Rydberg
2010-12-09  1:12       ` Henrik Rydberg
2010-12-09  1:17         ` Dmitry Torokhov
2010-12-09  1:24           ` Henrik Rydberg
2010-12-09  1:20         ` Ping Cheng
2010-12-09  2:01           ` Henrik Rydberg

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.