From: Jason Gerecke <hidden> Date: 2011-07-07 21:05:32
Android (at least up to Gingerbread) does not understand the 'B' protocol
first made available in 2.6.36. As a workaround until this is fixed, we
drop back to using the 'A' protocol.
Signed-off-by: Jason Gerecke <redacted>
---
Now being sent upstream to LKML at the behest of Google.
drivers/input/touchscreen/wacom_w8001.c | 33 ++++++++++++++++++++++++++----
1 files changed, 28 insertions(+), 5 deletions(-)
@@ -163,9 +161,14 @@ static void parse_multi_touch(struct w8001 *w8001)input_report_abs(dev,ABS_MT_POSITION_X,x);input_report_abs(dev,ABS_MT_POSITION_Y,y);+input_report_abs(dev,ABS_MT_TOOL_TYPE,MT_TOOL_FINGER);count++;++input_mt_sync(dev);}}+if(count==0)+input_mt_sync(dev);/* emulate single touch events when stylus is out of proximity.*Thisistomakesingletouchbackwardsupportconsistent
From: Jason Gerecke <hidden> Date: 2011-07-07 21:05:33
Android (begining with Gingerbread) ignores all single-touch events
from multi-touch capable devices. This patch augments the pen and
single-touch handlers to emit MT events for Android's consumption.
Signed-off-by: Jason Gerecke <redacted>
---
Now being sent upstream to LKML at the behest of Google.
drivers/input/touchscreen/wacom_w8001.c | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
From: Jason Gerecke <hidden> Date: 2011-07-07 21:05:35
As of Gingerbread, Android does not pay attention to if the pen
is in contact with the screen, or merely in proximity. Since the
Xorg Wacom driver does not make use of MT pen events, we simply
do not emit MT data while hovering.
Signed-off-by: Jason Gerecke <redacted>
---
Now being sent upstream to LKML at the behest of Google.
drivers/input/touchscreen/wacom_w8001.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
From: Jason Gerecke <hidden> Date: 2011-07-07 21:05:38
Don't bother evaluating multi-touch packets from the hardware
when the pen is in range. Single-touch is already filtered, but
not MT.
Signed-off-by: Jason Gerecke <redacted>
---
Now being sent upstream to LKML at the behest of Google.
drivers/input/touchscreen/wacom_w8001.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
On Thu, Jul 07, 2011 at 02:04:57PM -0700, Jason Gerecke wrote:
Android (at least up to Gingerbread) does not understand the 'B' protocol
first made available in 2.6.36. As a workaround until this is fixed, we
drop back to using the 'A' protocol.
Well, fix Android then. Same goes for patches 2 & 3.
Thanks.
--
Dmitry
Agreed. The next version will correctly use protocol B. When I briefly
(too briefly clearly :-( ) looked at the original patches, I thought
they were driver bug fixes. If it's just workarounds for stuff android
doesn't do, then we should fix our framework.
Jason, do any of these patches fix actual driver bugs or make the
driver more robust?
--Dima
On Thu, Jul 7, 2011 at 2:35 PM, Dmitry Torokhov
[off-list ref] wrote:
On Thu, Jul 07, 2011 at 02:04:57PM -0700, Jason Gerecke wrote:
quoted
Android (at least up to Gingerbread) does not understand the 'B' protocol
first made available in 2.6.36. As a workaround until this is fixed, we
drop back to using the 'A' protocol.
Well, fix Android then. Same goes for patches 2 & 3.
Thanks.
--
Dmitry
From: Jason Gerecke <hidden> Date: 2011-07-07 22:32:57
On Thu, Jul 7, 2011 at 2:52 PM, Dima Zavin [off-list ref] wrote:
Agreed. The next version will correctly use protocol B. When I briefly
(too briefly clearly :-( ) looked at the original patches, I thought
they were driver bug fixes. If it's just workarounds for stuff android
doesn't do, then we should fix our framework.
Jason, do any of these patches fix actual driver bugs or make the
driver more robust?
The only patch which *may* be a bugfix is number 4 ("Only report
multi-touch when pen is out of range"). I can only reproduce
multi-touch + pen oddities under Android, but that could be due to
some kind of filtering from the xf86-input-wacom driver.
The remaining patches are absolutely specific to Android (though still
compatible with desktop distros).
Jason
---
Day xee-nee-svsh duu-'ushtlh-ts'it;
nuu-wee-ya' duu-xan' 'vm-nvshtlh-ts'it.
Huu-chan xuu naa~-gha.
On Fri, Jul 8, 2011 at 5:04 AM, Jason Gerecke [off-list ref] wrote:
As of Gingerbread, Android does not pay attention to if the pen
is in contact with the screen, or merely in proximity. Since the
Xorg Wacom driver does not make use of MT pen events, we simply
do not emit MT data while hovering.
Hi Jason,
It would be nice if you could CC me next time. I would like to be
aware of the changes to the driver I wrote and use.
I guess the change below is ok, but it changes existing behavior. It
doesn't affect my apps (be aware that Xorg and Android may be the well
known users, but there are other custom apps).
Thanks,
jaya
quoted hunk
Signed-off-by: Jason Gerecke <redacted>
---
Now being sent upstream to LKML at the behest of Google.
drivers/input/touchscreen/wacom_w8001.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
input_report_key(dev, BTN_STYLUS, coord->f1);
input_report_key(dev, w8001->type, coord->rdy);
- input_report_abs(dev, ABS_MT_POSITION_X, coord->x);
- input_report_abs(dev, ABS_MT_POSITION_Y, coord->y);
- input_report_abs(dev, ABS_MT_PRESSURE, coord->pen_pressure);
- input_report_abs(dev, ABS_MT_TOOL_TYPE, MT_TOOL_PEN);
+ if (coord->pen_pressure > 0) {
+ input_report_abs(dev, ABS_MT_POSITION_X, coord->x);
+ input_report_abs(dev, ABS_MT_POSITION_Y, coord->y);
+ input_report_abs(dev, ABS_MT_PRESSURE, coord->pen_pressure);
+ input_report_abs(dev, ABS_MT_TOOL_TYPE, MT_TOOL_PEN);
+ }
input_mt_sync(dev);
input_sync(dev);
--
1.7.5.2
--
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
--
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
From: Jason Gerecke <hidden> Date: 2011-07-08 21:04:50
On Thu, Jul 7, 2011 at 6:13 PM, Jaya Kumar [off-list ref] wrote:
On Fri, Jul 8, 2011 at 5:04 AM, Jason Gerecke [off-list ref] wrote:
quoted
As of Gingerbread, Android does not pay attention to if the pen
is in contact with the screen, or merely in proximity. Since the
Xorg Wacom driver does not make use of MT pen events, we simply
do not emit MT data while hovering.
Hi Jason,
It would be nice if you could CC me next time. I would like to be
aware of the changes to the driver I wrote and use.
I guess the change below is ok, but it changes existing behavior. It
doesn't affect my apps (be aware that Xorg and Android may be the well
known users, but there are other custom apps).
Thanks,
jaya
Thanks for the heads-up. Since I had originally intended the patches
to go against the Android tree, I wasn't thinking too hard about how
other things would react to the changes. I figured I'd make them
Xorg-compatible in case they were rejected by Google, but didn't
consider custom applications.
Based on the replies to the first patch though, I may be withdrawing
these patches anyway... We need to wait and see if my Android
rejection is reversed or not.
Jason
---
Day xee-nee-svsh duu-'ushtlh-ts'it;
nuu-wee-ya' duu-xan' 'vm-nvshtlh-ts'it.
Huu-chan xuu naa~-gha.
From: Jeffrey Brown <hidden> Date: 2011-07-09 06:15:50
On Thu, Jul 7, 2011 at 2:04 PM, Jason Gerecke [off-list ref] wrote:
As of Gingerbread, Android does not pay attention to if the pen
is in contact with the screen, or merely in proximity. Since the
Xorg Wacom driver does not make use of MT pen events, we simply
do not emit MT data while hovering.
I'd rather not change the behavior of the upstream driver because that
would break other things. It would be better to just fix the Android
framework code for the device you are shipping.
What is it about Gingerbread that causes problems with hover? Is it
the fact it isn't checking BTN_TOUCH or the fact that it doesn't care
when ABS_MT_PRESSURE == 0? (Is BTN_TOUCH still relevant to the MT
protocol or only in single-touch?)
I have already added hover support to Android. It will appear in an
upcoming release, along with support for the MT slots protocol "B".
Sending a non-zero ABS_MT_DISTANCE is also a good robust hint for
hover. Zero pressure can be ambiguous sometimes.
Who did you talk to at Google about this?
Jeff.
On Fri, Jul 8, 2011 at 2:04 PM, Jason Gerecke [off-list ref] wrote:
On Thu, Jul 7, 2011 at 6:13 PM, Jaya Kumar [off-list ref] wrote:
quoted
On Fri, Jul 8, 2011 at 5:04 AM, Jason Gerecke [off-list ref] wrote:
quoted
As of Gingerbread, Android does not pay attention to if the pen
is in contact with the screen, or merely in proximity. Since the
Xorg Wacom driver does not make use of MT pen events, we simply
do not emit MT data while hovering.
Hi Jason,
It would be nice if you could CC me next time. I would like to be
aware of the changes to the driver I wrote and use.
I guess the change below is ok, but it changes existing behavior. It
doesn't affect my apps (be aware that Xorg and Android may be the well
known users, but there are other custom apps).
Thanks,
jaya
Thanks for the heads-up. Since I had originally intended the patches
to go against the Android tree, I wasn't thinking too hard about how
other things would react to the changes. I figured I'd make them
Xorg-compatible in case they were rejected by Google, but didn't
consider custom applications.
Based on the replies to the first patch though, I may be withdrawing
these patches anyway... We need to wait and see if my Android
rejection is reversed or not.
It will not be. We do not want to carry non-essential patches in our
tree. Our userspace now implements the B protocol, so things should
work fine in the next release.
--Dima
Jason
---
Day xee-nee-svsh duu-'ushtlh-ts'it;
nuu-wee-ya' duu-xan' 'vm-nvshtlh-ts'it.
Huu-chan xuu naa~-gha.
From: Jeffrey Brown <hidden> Date: 2011-07-09 06:20:11
I don't see why we should filter out multitouch while the pen is in
range. There are many reasons why it might be useful to support
simultaneous pen and touch.
For example, use one finger to select a color to draw with and use the
pen in the other hand to draw.
Jeff.
On Thu, Jul 7, 2011 at 2:05 PM, Jason Gerecke [off-list ref] wrote:
quoted hunk
Don't bother evaluating multi-touch packets from the hardware
when the pen is in range. Single-touch is already filtered, but
not MT.
Signed-off-by: Jason Gerecke <redacted>
---
Now being sent upstream to LKML at the behest of Google.
drivers/input/touchscreen/wacom_w8001.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
/* 2 finger touch packet */
case W8001_PKTLEN_TOUCH2FG - 1:
w8001->idx = 0;
- parse_multi_touch(w8001);
+ if (w8001->type != BTN_TOOL_PEN &&
+ w8001->type != BTN_TOOL_RUBBER) {
+ parse_multi_touch(w8001);
+ }
break;
}
--
1.7.5.2
--
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
--
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
Jason spoke with me. I pushed back because I did not want to carry any
patches for this in our kernel tree and asked Jason to send them
upstream. I, unfortunately, did not take a close look to see what the
patches were doing. As mentioned, these android-specific changes
shouldn't be accepted.
--Dima
On Fri, Jul 8, 2011 at 11:15 PM, Jeffrey Brown [off-list ref] wrote:
On Thu, Jul 7, 2011 at 2:04 PM, Jason Gerecke [off-list ref] wrote:
quoted
As of Gingerbread, Android does not pay attention to if the pen
is in contact with the screen, or merely in proximity. Since the
Xorg Wacom driver does not make use of MT pen events, we simply
do not emit MT data while hovering.
I'd rather not change the behavior of the upstream driver because that
would break other things. It would be better to just fix the Android
framework code for the device you are shipping.
What is it about Gingerbread that causes problems with hover? Is it
the fact it isn't checking BTN_TOUCH or the fact that it doesn't care
when ABS_MT_PRESSURE == 0? (Is BTN_TOUCH still relevant to the MT
protocol or only in single-touch?)
I have already added hover support to Android. It will appear in an
upcoming release, along with support for the MT slots protocol "B".
Sending a non-zero ABS_MT_DISTANCE is also a good robust hint for
hover. Zero pressure can be ambiguous sometimes.
Who did you talk to at Google about this?
Jeff.
--
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
Hi Dima,
Could you tell when will android support protocol B ?
I'm using android honeycomb mr2 release, I found it not support Protocol B yet.
Best regards,
Zhang Jiejing
2011/7/8 Dima Zavin [off-list ref]:
Agreed. The next version will correctly use protocol B. When I briefly
(too briefly clearly :-( ) looked at the original patches, I thought
they were driver bug fixes. If it's just workarounds for stuff android
doesn't do, then we should fix our framework.
Jason, do any of these patches fix actual driver bugs or make the
driver more robust?
--Dima
On Thu, Jul 7, 2011 at 2:35 PM, Dmitry Torokhov
[off-list ref] wrote:
quoted
On Thu, Jul 07, 2011 at 02:04:57PM -0700, Jason Gerecke wrote:
quoted
Android (at least up to Gingerbread) does not understand the 'B' protocol
first made available in 2.6.36. As a workaround until this is fixed, we
drop back to using the 'A' protocol.
Well, fix Android then. Same goes for patches 2 & 3.
Thanks.
--
Dmitry
--
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
--
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