From 73ad231ab65dcf85fc9f134a017a501a57a3c52c Mon Sep 17 00:00:00 2001 From: Henrik Rydberg Date: Sun, 29 Aug 2010 17:19:15 +0200 Subject: Improve bamboo touch resolution Increase the virtual resolution of the bamboo touch by a factor of 16, and trim the fuzz parameters for a better small-motion experience. Signed-off-by: Henrik Rydberg --- usr/src/dkms_source_tree/dkms.conf | 2 +- usr/src/dkms_source_tree/wacom_wac.c | 16 ++++++++++------ usr/src/dkms_source_tree/wacom_wac.h | 1 - 3 files changed, 11 insertions(+), 8 deletions(-) (limited to 'usr/src') diff --git a/usr/src/dkms_source_tree/dkms.conf b/usr/src/dkms_source_tree/dkms.conf index 219cfe0..9d2da13 100644 --- a/usr/src/dkms_source_tree/dkms.conf +++ b/usr/src/dkms_source_tree/dkms.conf @@ -1,5 +1,5 @@ NAME=wacom -VERSION=1.0.0 +VERSION=1.0.1 PACKAGE_NAME="$NAME" PACKAGE_VERSION="$VERSION" MAKE[0]="make -C ${kernel_source_dir} diff --git a/usr/src/dkms_source_tree/wacom_wac.c b/usr/src/dkms_source_tree/wacom_wac.c index 463d084..03a3fdc 100644 --- a/usr/src/dkms_source_tree/wacom_wac.c +++ b/usr/src/dkms_source_tree/wacom_wac.c @@ -869,8 +869,8 @@ static int wacom_bbt_irq(struct wacom_wac *wacom, size_t len) int p = data[9 * i + 2]; input_mt_slot(input, i); if (p) { - int x = get_unaligned_be16(&data[9 * i + 3]) & 0x7ff; - int y = get_unaligned_be16(&data[9 * i + 5]) & 0x7ff; + int x = get_unaligned_be16(&data[9 * i + 3]) << 4; + int y = get_unaligned_be16(&data[9 * i + 5]) << 4; input_report_abs(input, ABS_MT_PRESSURE, p); input_report_abs(input, ABS_MT_POSITION_X, x); input_report_abs(input, ABS_MT_POSITION_Y, y); @@ -1136,9 +1136,13 @@ void wacom_setup_input_capabilities(struct input_dev *input_dev, __set_bit(BTN_TOOL_FINGER, input_dev->keybit); __set_bit(BTN_TOOL_DOUBLETAP, input_dev->keybit); + input_set_abs_params(input_dev, ABS_X, 0, features->x_max, 32, 0); + input_set_abs_params(input_dev, ABS_Y, 0, features->y_max, 32, 0); + input_set_abs_params(input_dev, ABS_PRESSURE, 0, features->pressure_max, 16, 0); + input_mt_create_slots(input_dev, 2); - input_set_abs_params(input_dev, ABS_MT_POSITION_X, 0, features->x_max, 4, 0); - input_set_abs_params(input_dev, ABS_MT_POSITION_Y, 0, features->y_max, 4, 0); + input_set_abs_params(input_dev, ABS_MT_POSITION_X, 0, features->x_max, 32, 0); + input_set_abs_params(input_dev, ABS_MT_POSITION_Y, 0, features->y_max, 32, 0); input_set_abs_params(input_dev, ABS_MT_PRESSURE, 0, features->pressure_max, 16, 0); input_set_abs_params(input_dev, ABS_MT_TRACKING_ID, 0, MAX_TRACKING_ID, 0, 0); break; @@ -1280,9 +1284,9 @@ static const struct wacom_features wacom_features_0xE3 = static const struct wacom_features wacom_features_0x47 = { "Wacom Intuos2 6x8", WACOM_PKGLEN_INTUOS, 20320, 16240, 1023, 31, INTUOS }; static const struct wacom_features wacom_features_0xD0_0 = - { "Wacom Bamboo Touch", WACOM_PKGLEN_BBTOUCH, 480, 320, 255, 0, BAMBOO_TOUCH }; + { "Wacom Bamboo Touch", WACOM_PKGLEN_BBTOUCH, 7680, 5120, 255, 0, BAMBOO_TOUCH }; static const struct wacom_features wacom_features_0xD0_2 = - { "Wacom Bamboo Boot", WACOM_PKGLEN_BBFUN, 480, 320, 255, 0, BAMBOO_BOOT }; + { "Wacom Bamboo Boot", WACOM_PKGLEN_BBFUN, 14760, 9225, 511, 63, WACOM_MO }; #define USB_DEVICE_WACOM(prod) \ USB_DEVICE(USB_VENDOR_ID_WACOM, prod), \ diff --git a/usr/src/dkms_source_tree/wacom_wac.h b/usr/src/dkms_source_tree/wacom_wac.h index 770909c..0c5a35d 100644 --- a/usr/src/dkms_source_tree/wacom_wac.h +++ b/usr/src/dkms_source_tree/wacom_wac.h @@ -62,7 +62,6 @@ enum { TABLETPC, TABLETPC2FG, BAMBOO_TOUCH, - BAMBOO_BOOT, MAX_TYPE }; -- cgit v1.2.3