multi-touch-dev team mailing list archive
-
multi-touch-dev team
-
Mailing list archive
-
Message #00933
Ubuntu Multitouch Kernel Driver Development - Details and testing
Hi,
I'm developing a linux kernel driver for a multitouch device. I have
used as start point the usbtouchscreen driver included in linux-3.0
kernel source.
Altough I can already make my mouse pointer move with touch there still
a lot of questions that still arise:
- When properly configured will xinput list my device as mulitouch
device ou touchscreen? The only thing I got so far was listed in Virtual
Core Pointer category
- How should I properly configure and setup input device? This is how I
am making:
/* For single touch */
input_set_abs_params(input_dev, ABS_X, 0, 6300, 0, 0);
input_set_abs_params(input_dev, ABS_Y, 0, 6300, 0, 0);
/* For multi-touch */
input_mt_init_slots(input_dev, 6);
input_set_abs_params(input_dev, ABS_MT_TOUCH_MAJOR, 0, 0xff, 0, 0);
input_set_abs_params(input_dev, ABS_MT_POSITION_X, 0, 6300, 0, 0);
input_set_abs_params(input_dev, ABS_MT_POSITION_Y, 0, 6300, 0, 0);
- How should I properly inject touches? In linux multitouch input
protocol it says the following
The protocol is divided into two types, depending on the capabilities of
the hardware. For devices handling anonymous contacts (type A), the
protocol describes how to send the raw data for all contacts to the
receiver. For devices capable of tracking identifiable contacts (type
B), the protocoldescribes how to send updates for individual contacts
via event slots.
What means anonymous contacts? My device sends raw data and my tracking
is made on the kernel. By the time I'm about to inject touches in the
kernel subsystem I have already touches identified and tracked. What is
after all my device type?
Regardless, I have already tried the two types of reporting and non seem
to give me multitouch input. This is how i'm doing right now:
if(touchActive)
{
input_mt_slot(usbtouch->input, Touch->Id);
input_mt_report_slot_state(usbtouch->input, MT_TOOL_FINGER, true);
input_report_abs(usbtouch->input, ABS_MT_TOUCH_MAJOR, 128);
input_report_abs(usbtouch->input, ABS_MT_POSITION_X,
Touch->ReportedPosition.X);
input_report_abs(usbtouch->input, ABS_MT_POSITION_Y,
Touch->ReportedPosition.Y);
touch++;
}
if (touch>0)
{
input_report_key(usbtouch->input, BTN_TOUCH, true);
input_report_abs(usbtouch->input, ABS_X,
Touch->ReportedPosition.X);
input_report_abs(usbtouch->input, ABS_Y,
Touch->ReportedPosition.Y);
input_sync(usbtouch->input);
}
- How can I test user side multitouch input? I'm trying to see if xinput
lists my device as a multitouch device. No success. I'm also trying an
example from qt4-demos, finger paint which always gives me nothing. Is
there any "oficial" tool for ubuntu multitouch input testing?
I found this mailing list thru project utouch. I hope I'm doing this
questions in the right place.
With my best regards,
Nuno Santos
Follow ups