From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ping Cheng Subject: Re: [PATCH 2/2] input: mt: Document the MT event slot protocol (rev4) Date: Sun, 23 May 2010 16:47:47 -0700 Message-ID: References: <1274567437-2818-1-git-send-email-rydberg@euromail.se> <1274567437-2818-2-git-send-email-rydberg@euromail.se> <20100523102413.2fee3f4c.rdunlap@xenotime.net> <4BF9ABC7.9090208@euromail.se> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Return-path: Received: from mail-px0-f174.google.com ([209.85.212.174]:59933 "EHLO mail-px0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755622Ab0EWXrr (ORCPT ); Sun, 23 May 2010 19:47:47 -0400 In-Reply-To: <4BF9ABC7.9090208@euromail.se> Sender: linux-input-owner@vger.kernel.org List-Id: linux-input@vger.kernel.org To: Henrik Rydberg Cc: Randy Dunlap , Dmitry Torokhov , Andrew Morton , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, Mika Kuoppala , Peter Hutterer , Benjamin Tissoires , Stephane Chatty , Rafi Rubin , Michael Poole On Sun, May 23, 2010 at 3:27 PM, Henrik Rydberg 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