From: Ping Cheng on
The fool is smiling like a fool now :).

Ping

BTW, I didn't receive the updated "[PATCH 1/2] input: mt: Introduce MT
event slots (rev 5)". Maybe gmail filtered the file for me?

On Sat, May 22, 2010 at 3:30 PM, Henrik Rydberg <rydberg(a)euromail.se> wrote:
> This patch adds documentation for the ABS_MT_SLOT event and gives
> examples of how to use the event slot protocol.
>
> Reviewed-by: Ping Cheng <pingc(a)wacom.com>
> Signed-off-by: Henrik Rydberg <rydberg(a)euromail.se>
> ---
> Revision 4 incorporates the following changes:
> � � � � - Rename the slot event to ABS_MT_SLOT to keep all MT-related events
> � � � � � in the same namespace.
> � � � � - Fix typo, thanks to Ping Cheng.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Henrik Rydberg on
Ping Cheng wrote:
> The fool is smiling like a fool now :).

�The trouble ain't that there is too many fools, but that the lightning ain't
distributed right.�

> BTW, I didn't receive the updated "[PATCH 1/2] input: mt: Introduce MT
> event slots (rev 5)". Maybe gmail filtered the file for me?

Heh, the correspondence on these patches has taken somewhat spam-like
proportions, but it should calm down considerably now. Hopefully it was all for
the best.

Cheers!
Henrik

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Henrik Rydberg on
Randy Dunlap wrote:
[...]
>> +Protocol Usage
>> +--------------
>> +
>> +Contact details are sent sequentially as separate packets of ABS_MT
>> +events. Only the ABS_MT events are recognized as part of a contact
>> +packet. Since these events are ignored by current single-touch (ST)
>> +applications, the MT protocol can be implemented on top of the ST protocol
>> +in an existing driver.
>> +
>> +Drivers for type A devices mark the end of a packet by calling the
>
> end?
>
>> +input_mt_sync() function, which generates a SYN_MT_REPORT event. This
>> +instructs the receiver to accept the data for the current contact and
>> +prepare to receive another. Drivers for type B devices mark the beginning
>
> vs. beginning? Seems incongruous. And not just to the doc, but to
> producers and consumers as well.

Perhaps this modification makes it clearer?

Drivers for type A devices separate contact packets by calling
input_mt_sync() at the end of each packet. This generates a SYN_MT_REPORT
event, which instructs the receiver to accept the data for the current
contact and prepare to receive another.

Drivers for type B devices separate contact packets by calling
input_mt_slot(), with a slot as argument, at the beginning of each packet.
This generates an ABS_MT_SLOT event, which instructs the receiver to
prepare for updates of the given slot.

>> +of a packet by calling the input_mt_slot() function with a slot as
>> +argument, which generates an ABS_MT_SLOT event. This instructs the receiver
>> +to prepare for updates of the given slot.
>> +
>> +The end of a multi-touch transfer is marked by calling the usual
>
> The end method is done for Types A and B, right?

How about this line instead?

All drivers mark the end of a multi-touch transfer by calling the usual

> is

Changed, thanks.

Henrik

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Ping Cheng on
On Sun, May 23, 2010 at 3:27 PM, Henrik Rydberg <rydberg(a)euromail.se> wrote:
> Randy Dunlap wrote:
> [...]
>>> +Protocol Usage
>>> +--------------
>>> +
>>> +Contact details are sent sequentially as separate packets of ABS_MT
>>> +events. Only the ABS_MT events are recognized as part of a contact
>>> +packet. Since these events are ignored by current single-touch (ST)
>>> +applications, the MT protocol can be implemented on top of the ST protocol
>>> +in an existing driver.
>>> +
>>> +Drivers for type A devices mark the end of a packet by calling the
>>
>> end?

Since Randy brought this question up, I feel the urge to say
something. I know there are X drivers and clients using the type A
format so I am not suggesting that we need to change this format.

What I am thinking is that we only need one SYN_ call for both _MT_
and regular data combined, which is a call to input_sync() at the end
of the whole packet. The SYN_MT_ can be replaced by the following
example, which I think is more "client-friendly". This solution is
based on the fact that the major difference between type A and type B
is whether we need to filter the data or not:

ABS_MT_RANDOM 0
ABS_MT_POSITION_X x[0]
ABS_MT_POSITION_Y y[0]
ABS_MT_ RANDOM 1
ABS_MT_POSITION_X x[1]
ABS_MT_POSITION_Y y[1]
SYN_REPORT

input_set_abs_params(input_dev, ABS_MT_RANDOM, 0, 2, 0, 0);

would tell the clients that they can expect two random touches.


>>> +The end of a multi-touch transfer is marked by calling the usual
>>
>> The end method is done for Types A and B, right?
>
> How about this line instead?
>
> All drivers mark the end of a multi-touch transfer by calling the usual

If we use ABS_MT_RANDOM, there would be only one SYN_ event for the
whole packet at the end, regardless of what kind of data is included
before the SYN_ event.

Basically, ABS_MT_RANDOM indicates a non-filtered and non-tracked MT_
event; ABS_MT_SLOT indicates a filtered and tracked MT_ event/slot.

With all this said, I don't have a preference for type A since I do
not need it for my driver. Just to be active in the group if you
wonder if there is any positive rationale :).

Ping
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Henrik Rydberg on
Ping Cheng wrote:
> On Sun, May 23, 2010 at 3:27 PM, Henrik Rydberg <rydberg(a)euromail.se> wrote:
>> Randy Dunlap wrote:
>> [...]
>>>> +Protocol Usage
>>>> +--------------
>>>> +
>>>> +Contact details are sent sequentially as separate packets of ABS_MT
>>>> +events. Only the ABS_MT events are recognized as part of a contact
>>>> +packet. Since these events are ignored by current single-touch (ST)
>>>> +applications, the MT protocol can be implemented on top of the ST protocol
>>>> +in an existing driver.
>>>> +
>>>> +Drivers for type A devices mark the end of a packet by calling the
>>> end?
>
> Since Randy brought this question up, I feel the urge to say
> something. I know there are X drivers and clients using the type A
> format so I am not suggesting that we need to change this format.

It is tempting to try to make type B backwards compatible, but unfortunately,
that is not possible. A type A receiver will always expect all data, and a type
B device will never send all data.

>
> What I am thinking is that we only need one SYN_ call for both _MT_
> and regular data combined, which is a call to input_sync() at the end
> of the whole packet. The SYN_MT_ can be replaced by the following
> example, which I think is more "client-friendly". This solution is
> based on the fact that the major difference between type A and type B
> is whether we need to filter the data or not:
>
> ABS_MT_RANDOM 0
> ABS_MT_POSITION_X x[0]
> ABS_MT_POSITION_Y y[0]
> ABS_MT_ RANDOM 1
> ABS_MT_POSITION_X x[1]
> ABS_MT_POSITION_Y y[1]
> SYN_REPORT
>
> input_set_abs_params(input_dev, ABS_MT_RANDOM, 0, 2, 0, 0);
>
> would tell the clients that they can expect two random touches.

And if you do s/RANDOM/SLOT/, you end up with what? ;-)

Henrik

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/