USB HID: Add ID for eGalax Multitouch used in JooJoo tablet
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH RESEND 1/1 USB HID: Add ID for eGalax Multitouch used in JooJoo tablet
The JooJoo tablet (http://thejoojoo.com/) contains an "eGalax Inc. USB TouchController", and this patch hooks it up to the egalax-touch driver. Without the patch we don't get any cursor motion, since it comes through Z/RX rather than X/Y.
--- drivers/hid/hid-egalax.c | 2 ++ drivers/hid/hid-ids.h | 1 + 2 files changed, 3 insertions(+), 0 deletions(-)
drivers/hid/hid-egalax.c +2 -0
@@ -246,6 +246,8 @@ static void egalax_remove(struct hid_device *hdev)static const struct hid_device_id egalax_devices[] = { {HID_USB_DEVICE (USB_VENDOR_ID_DWAV ,USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH ) }, + {HID_USB_DEVICE (USB_VENDOR_ID_DWAV , +USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH1 ) }, { } };MODULE_DEVICE_TABLE (hid, egalax_devices);
drivers/hid/hid-ids.h +1 -0
@@ -185,6 +185,7 @@#define USB_VENDOR_ID_DWAV 0x0eef#define USB_DEVICE_ID_EGALAX_TOUCHCONTROLLER 0x0001#define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH 0x480d +#define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH1 0x720c#define USB_VENDOR_ID_ELO 0x04E7#define USB_DEVICE_ID_ELO_TS2700 0x0020
Signature · 5 lines
1.6.6.1 -- Chris Ball <[email protected]> One Laptop Per Child
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 29 lines · Chris Ball
The JooJoo tablet (http://thejoojoo.com/) contains an "eGalax Inc. USB TouchController", and this patch hooks it up to the egalax-touch driver. Without the patch we don't get any cursor motion, since it comes through Z/RX rather than X/Y.
Signed-off-by Chris Ball <[email protected]>--- drivers/hid/hid-egalax.c | 2 ++ drivers/hid/hid-ids.h | 1 + 2 files changed, 3 insertions(+), 0 deletions(-)drivers/hid/hid-egalax.c +2
-0@@ -246,6 +246,8 @@ static void egalax_remove(struct hid_device *hdev)static const struct hid_device_id egalax_devices[] = { {HID_USB_DEVICE (USB_VENDOR_ID_DWAV ,USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH ) }, + {HID_USB_DEVICE (USB_VENDOR_ID_DWAV , +USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH1 ) }, { } };MODULE_DEVICE_TABLE (hid, egalax_devices);drivers/hid/hid-ids.h +0
-0
drivers/hid/hid-ids.h line 191
Quoted 7 lines
drivers/hid/hid-ids.h +1
-0@@ -185,6 +185,7 @@#define USB_VENDOR_ID_DWAV 0x0eef#define USB_DEVICE_ID_EGALAX_TOUCHCONTROLLER 0x0001#define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH 0x480d +#define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH1 0x720c#define USB_VENDOR_ID_ELO 0x04E7#define USB_DEVICE_ID_ELO_TS2700 0x0020
Hi Chris,
has this patch been really tested?
I am almost certain that we need to have the device ID to be added to hid_blacklist[] in drivers/hid/hid-core.c as well. Otherwise the hid-egalax driver wouldn't bind to the device automatically in a proper way.
Thanks,
Signature · 6 lines
Jiri Kosina SUSE Labs, Novell Inc. -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 10 lines · Jiri Kosina
i Chris,
has this patch been really tested?
I am almost certain that we need to have the device ID to be added to hid_blacklist[] in
drivers/hid/hid-core.cas well. Otherwise the hid-egalax driver wouldn't bind to the device automatically in a proper
way.
Guys,
I happen to have gathered information about this during the last five days:
- Mathieu Virbel, author of PyMT, has reported that with the above
patch (and probably the corresponding change to hid-core.c) the multitouch panel of the Joojoo kind of works, but with a strange
behaviour: SYNC messages are inserted between fingers.
- after checking HID report descriptors, it appears that the
protocol used by this device is fairly different from that of the eGalax found in the T101MT. Basically, it uses what Microsoft describes as 'serial' multitouch events instead of the 'parallel' multitouch events we ususally see. This means that each finger is reported in a message of its own.
- after checking with the maker of these panels, it appears that
they have two independent product lines. One, with product IDs 48xx, is resistive and has a classical 'parallel' protocol. The other, with product IDs 72xx, is capacitive and has an unusual 'serial' protocol. The Joojoo has the latter.
In summary this is a new kind of panel with an unusual HID prototol and the hid-egalax driver fails at producing a proper event sequence. The major issue here is that the key to resolving the problem does *not* lie in the driver: SYNC messages are produced in hid-input.c and drivers cannot block them. To address this, one would need to make the <HID event> -> <input event> + <sync> mapping less systematic. This could converge with the efforts required if we were to have a more generic management of multitouch devices (we need one driver for each device because hid-core.c was not designed with this kind of device in mind).
My suggestions:
- accept the patch, after adding a few comments in the code about
this device requiring future care for its 'serial' protocol.
- start thinking about what changes are required in hid-input and/
or hid-core for a more generic management of multitouch devices.
Cheers,
St.
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi,
Quoted 6 lines · Jiri
has this patch been really tested?
I am almost certain that we need to have the device ID to be added to hid_blacklist[] in
drivers/hid/hid-core.cas well. Otherwise the hid-egalax driver wouldn't bind to the device automatically in a proper way.
Thanks for noticing that; you're right, it's necessary. I only tested CONFIG_HID_EGALAX=y, which doesn't seem to require the blacklist entry. I've tested that using the blacklist with =m works now.
Quoted 5 lines · Stéphane
My suggestions:
- accept the patch, after adding a few comments in the code about
this device requiring future care for its 'serial' protocol.
- start thinking about what changes are required in hid-input and/
or hid-core for a more generic management of multitouch devices.
I've added a comment, feel free to reword it if you'd like to. Thanks for the excellent research!
From: Chris Ball <[email protected]>
Subject: [PATCH] USB HID: Add ID for eGalax Multitouch used in JooJoo tablet
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
The JooJoo tablet (http://thejoojoo.com/) contains an "eGalax Inc. USB TouchController", and this patch hooks it up to the egalax-touch driver. Without the patch we don't get any cursor motion, since it comes through Z/RX rather than X/Y.
(The egalax-touch driver does not yet generate a correct event sequence for the "serial" protocol used by this device, though -- see the note added to the code, which comes from research by Stéphane Chatty.)
--- drivers/hid/hid-core.c | 1 + drivers/hid/hid-egalax.c | 9 +++++++++ drivers/hid/hid-ids.h | 1 + 3 files changed, 11 insertions(+), 0 deletions(-)
drivers/hid/hid-core.c +1 -0
@@ -1299,6 +1299,7 @@ static const struct hid_device_id hid_blacklist[] = { { HID_USB_DEVICE(USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_MOUSE) }, { HID_USB_DEVICE(USB_VENDOR_ID_DRAGONRISE, 0x0006) }, { HID_USB_DEVICE(USB_VENDOR_ID_DWAV, USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH) }, + { HID_USB_DEVICE(USB_VENDOR_ID_DWAV, USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH1) }, { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_ELECOM, USB_DEVICE_ID_ELECOM_BM084) }, { HID_USB_DEVICE(USB_VENDOR_ID_EZKEY, USB_DEVICE_ID_BTC_8193) }, { HID_USB_DEVICE(USB_VENDOR_ID_GAMERON, USB_DEVICE_ID_GAMERON_DUAL_PSX_ADAPTOR) },
drivers/hid/hid-egalax.c +9 -0
@@ -159,6 +159,13 @@ static int egalax_event(struct hid_device *hid, struct hid_field *field, {struct egalax_data *td =hid_get_drvdata (hid); +/* Note, eGalax has two product lines: the first is resistive and +* uses a standard parallel multitouch protocol (product ID == +* 48xx). The second is capacitive and uses an unusual "serial" +* protocol with a different message for each multitouch finger +* (product ID == 72xx). We do not yet generate a correct event +* sequence for the capacitive/serial protocol. +*/ if (hid->claimed &HID_CLAIMED_INPUT ) {struct input_dev *input = field->hidinput->input;
@@ -246,6 +253,8 @@ static void egalax_remove(struct hid_device *hdev)static const struct hid_device_id egalax_devices[] = { {HID_USB_DEVICE (USB_VENDOR_ID_DWAV ,USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH ) }, + {HID_USB_DEVICE (USB_VENDOR_ID_DWAV , +USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH1 ) }, { } };MODULE_DEVICE_TABLE (hid, egalax_devices);
drivers/hid/hid-ids.h +1 -0
@@ -188,6 +188,7 @@#define USB_VENDOR_ID_DWAV 0x0eef#define USB_DEVICE_ID_EGALAX_TOUCHCONTROLLER 0x0001#define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH 0x480d +#define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH1 0x720c#define USB_VENDOR_ID_ELECOM 0x056e#define USB_DEVICE_ID_ELECOM_BM084 0x0061
Signature · 5 lines
1.6.2.5 -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 12 lines · Chris Ball
Quoted 6 lines
has this patch been really tested?
I am almost certain that we need to have the device ID to be added to hid_blacklist[] in
drivers/hid/hid-core.cas well. Otherwise the hid-egalax driver wouldn't bind to the device automatically in a proper way.Thanks for noticing that; you're right, it's necessary. I only tested
CONFIG_HID_EGALAX=y, which doesn't seem to require the blacklist entry. I've tested that using the blacklist with =m works now.Stéphane wrote:
Quoted 8 lines
Quoted 5 lines
My suggestions:
- accept the patch, after adding a few comments in the code about
this device requiring future care for its 'serial' protocol.
- start thinking about what changes are required in hid-input and/
or hid-core for a more generic management of multitouch devices.I've added a comment, feel free to reword it if you'd like to. Thanks for the excellent research!
Thanks indeed.
I have now applied the patch.
Signature · 6 lines
Jiri Kosina SUSE Labs, Novell Inc. -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 10 lines · Stéphane Chatty
In summary this is a new kind of panel with an unusual HID prototol and the hid-egalax driver fails at producing a proper event sequence. The major issue here is that the key to resolving the problem does *not* lie in the driver:
SYNC messages are produced inhid-input.cand drivers cannot block them. To address this, one would need to make the <HID event> -> <input event> + <sync> mapping less systematic. This could converge with the efforts required if we were to have a more generic management of multitouch devices (we need one driver for each device becausehid-core.cwas not designed with this kind of device in mind).
Quoted 5 lines
My suggestions:
- accept the patch, after adding a few comments in the code about this device requiring future care for its 'serial' protocol.
- start thinking about what changes are required in hid-input and/or hid-core for a more generic management of multitouch devices.
Hi Stephane,
thanks for the analysis. How do devices in their report descriptor describe the fact whether the events should be interleaved by sync or not?
We definitely could create a specialized version of hidinput_report_event() for certain reports, which wouldn't issue the input_sync() call, but I wonder what is the distinguishing factor.
Signature · 6 lines
Jiri Kosina SUSE Labs, Novell Inc. -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 5 lines · Jiri Kosina
thanks for the analysis. How do devices in their report descriptor describe the fact whether the events should be interleaved by sync or not?
As far as I know, they don't. I know of two multitouch devices that send groups of fingers over several HID messages:
- the 3M 22" panel, when there are more than 6 fingers on the
panel. You know there are more messages coming when the number of fingers (reported through ContactCount in the first message) is greater than 6.
- the eGalax 72xx series, that adds a second message whenever there
are two fingers; I am not sure yet how one knows when to wait for a second message. Mathieu might be able to tell us.
The short term solution could be to add a .sync hook similar to .event. Each specific driver could override the call to input_sync () based on its knowledge of the device.
Quoted 4 lines
We definitely could create a specialized version of
hidinput_report_event()for certain reports, which wouldn't issue theinput_sync()call, but I wonder what is the distinguishing factor.
Yes, for months now I have wondered what the generic multitouch HID driver in Windows 7 might look like :-) I suspect that we now have a sufficient sample of devices (about 10 different ones, all claiming to be Win7 compliant) to extrapolate from their behaviour.
Cheers
St.
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 9 lines · Stéphane Chatty
Quoted 5 lines · Jiri Kosina
thanks for the analysis. How do devices in their report descriptor describe the fact whether the events should be interleaved by sync or not?
Quoted 10 lines
As far as I know, they don't. I know of two multitouch devices that send groups of fingers over several HID messages:
- the 3M 22" panel, when there are more than 6 fingers on the
panel. You know there are more messages coming when the number of fingers (reported through ContactCount in the first message) is greater than 6.
- the eGalax 72xx series, that adds a second message whenever
there are two fingers; I am not sure yet how one knows when to wait for a second message. Mathieu might be able to tell us.
Oops... as usual, publishing an opinion is a good way of finding out how it be can wrong :-) I just figured that if ContactMax is available for all devices as well as ContactCount, then there is a way of knowing:
- if ContactMax is greater than the number of fingers in the report
descriptors, then you know that sometimes you'll get multiple messages.
- if ContactCount in a message is greater than the number of
fingers in the report descriptors, then you know you'll need to read more messages after this one.
We'll need to check this with all the known devices...
Cheers,
St.
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): F35B802E-C47A-47BF-A350-8F57250D4394-rXV5z7KbLFk@public.gmane.org
Hi everyone,
Quoted 9 lines · Stéphane Chatty
Quoted 5 lines · Jiri Kosina
thanks for the analysis. How do devices in their report descriptor describe the fact whether the events should be interleaved by sync or not?
Quoted 9 lines
As far as I know, they don't. I know of two multitouch devices that send groups of fingers over several HID messages:
- the 3M 22" panel, when there are more than 6 fingers on the
panel. You know there are more messages coming when the number of fingers (reported through ContactCount in the first message) is greater than 6.
- the eGalax 72xx series, that adds a second message whenever there
are two fingers; I am not sure yet how one knows when to wait for a second message. Mathieu might be able to tell us.
Well, i've actually the problem, i can't known :)
So for my case, i dispatch event - 1, not current event, and doing the merge on userland size by checking old event contact id. Since i known that the screen is doing only one or two touches, it's kind of easy to do the "sync" ourself... except when touch UP. With event - 1, i can't known if it's finished or not...
It cannot be resolved until the kernel send correct sync message...
Quoted 3 lines
The short term solution could be to add a .sync hook similar to .event. Each specific driver could override the call to
input_sync()based on its knowledge of the device.
That would solve this case :)
Mathieu