import libwacom-1.1-3.el8

This commit is contained in:
CentOS Sources 2020-11-03 07:06:47 -05:00 committed by Andrew Lukoshko
parent 7357a6c7d9
commit 1678932d54
6 changed files with 2603 additions and 1 deletions

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,113 @@
From bc47bc6188978bb6fa22b68a2c9e83a0dba22e91 Mon Sep 17 00:00:00 2001
From: Jason Gerecke <killertofu@gmail.com>
Date: Fri, 1 Nov 2019 15:25:42 -0700
Subject: [PATCH libwacom 14/17] test: Split EMR-specific stylus tests into
their own section
The ID and eraser tests currently performed by test-stylus-validity
are only relevant to EMR tools. To make implementing tests for AES
tools more clean, lets first move these into their own dedicated
function.
Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
(cherry picked from commit 5092098c68f2d5e6a7935e50efbad99d836135c9)
---
test/test-stylus-validity.c | 75 ++++++++++++++++++++-----------------
1 file changed, 40 insertions(+), 35 deletions(-)
diff --git a/test/test-stylus-validity.c b/test/test-stylus-validity.c
index 6582428..db628cb 100644
--- a/test/test-stylus-validity.c
+++ b/test/test-stylus-validity.c
@@ -202,6 +202,45 @@ _add_test(const WacomStylus *stylus, GTestDataFunc func, const char *funcname)
#define add_test(stylus, func_) \
_add_test(stylus, func_, #func_)
+static void
+setup_emr_tests(const WacomStylus *stylus)
+{
+ switch (libwacom_stylus_get_id(stylus)) {
+ case 0xffffd:
+ add_test(stylus, test_pressure);
+ add_test(stylus, test_no_distance);
+ add_test(stylus, test_no_tilt);
+ break;
+ case 0x006:
+ case 0x096:
+ case 0x097:
+ add_test(stylus, test_no_pressure);
+ add_test(stylus, test_distance);
+ add_test(stylus, test_no_tilt);
+ break;
+ case 0x007:
+ case 0x017:
+ case 0x094:
+ case 0x806:
+ add_test(stylus, test_no_pressure);
+ add_test(stylus, test_distance);
+ add_test(stylus, test_tilt);
+ break;
+ case 0x021:
+ case 0x8e2:
+ case 0x862:
+ add_test(stylus, test_pressure);
+ add_test(stylus, test_distance);
+ add_test(stylus, test_no_tilt);
+ break;
+ default:
+ add_test(stylus, test_pressure);
+ add_test(stylus, test_tilt);
+ add_test(stylus, test_distance);
+ break;
+ }
+}
+
static void
setup_tests(const WacomStylus *stylus)
{
@@ -228,41 +267,7 @@ setup_tests(const WacomStylus *stylus)
}
}
- /* Axes checks */
- switch (libwacom_stylus_get_id(stylus)) {
- case 0xffffd:
- add_test(stylus, test_pressure);
- add_test(stylus, test_no_distance);
- add_test(stylus, test_no_tilt);
- break;
- case 0x006:
- case 0x096:
- case 0x097:
- add_test(stylus, test_no_pressure);
- add_test(stylus, test_distance);
- add_test(stylus, test_no_tilt);
- break;
- case 0x007:
- case 0x017:
- case 0x094:
- case 0x806:
- add_test(stylus, test_no_pressure);
- add_test(stylus, test_distance);
- add_test(stylus, test_tilt);
- break;
- case 0x021:
- case 0x8e2:
- case 0x862:
- add_test(stylus, test_pressure);
- add_test(stylus, test_distance);
- add_test(stylus, test_no_tilt);
- break;
- default:
- add_test(stylus, test_pressure);
- add_test(stylus, test_tilt);
- add_test(stylus, test_distance);
- break;
- }
+ setup_emr_tests(stylus);
if (libwacom_stylus_has_eraser(stylus))
add_test(stylus, test_eraser);
--
2.26.2

View File

@ -0,0 +1,134 @@
From 4604bacdf65d35d000b67b6263114fde17df708d Mon Sep 17 00:00:00 2001
From: Jason Gerecke <killertofu@gmail.com>
Date: Fri, 1 Nov 2019 15:24:03 -0700
Subject: [PATCH libwacom 15/17] Introduce WSTYLUS_MOBILE type for AES devices
AES styli are distinct enough from the existing stylus classes to
deserve one of their own. This class is named WSTYLUS_MOBILE both to
reflect the fact that AES sensors are only found on tablet PCs and to
allow the potential inclusion of other similar sensors which may not
use AES tech.
Stylus test cases are added to cover the future addition of AES styli
to libwacom.
Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
(cherry picked from commit 36a22c884f3439fd72bfc2268afd1c29364ffee8)
---
libwacom/libwacom-database.c | 2 ++
libwacom/libwacom.c | 1 +
libwacom/libwacom.h | 1 +
test/test-stylus-validity.c | 32 +++++++++++++++++++++++++++++++-
4 files changed, 35 insertions(+), 1 deletion(-)
diff --git a/libwacom/libwacom-database.c b/libwacom/libwacom-database.c
index ebc0605..5448b90 100644
--- a/libwacom/libwacom-database.c
+++ b/libwacom/libwacom-database.c
@@ -98,6 +98,8 @@ type_from_str (const char *type)
return WSTYLUS_PUCK;
if (streq(type, "3D"))
return WSTYLUS_3D;
+ if (streq(type, "Mobile"))
+ return WSTYLUS_MOBILE;
return WSTYLUS_UNKNOWN;
}
diff --git a/libwacom/libwacom.c b/libwacom/libwacom.c
index c4a50a8..ce66ae2 100644
--- a/libwacom/libwacom.c
+++ b/libwacom/libwacom.c
@@ -1293,6 +1293,7 @@ libwacom_print_stylus_description (int fd, const WacomStylus *stylus)
case WSTYLUS_STROKE: type = "Stroke"; break;
case WSTYLUS_PUCK: type = "Puck"; break;
case WSTYLUS_3D: type = "3D"; break;
+ case WSTYLUS_MOBILE: type = "Mobile"; break;
default: g_assert_not_reached(); break;
}
diff --git a/libwacom/libwacom.h b/libwacom/libwacom.h
index 8035e17..8cf6c92 100644
--- a/libwacom/libwacom.h
+++ b/libwacom/libwacom.h
@@ -159,6 +159,7 @@ typedef enum {
WSTYLUS_STROKE,
WSTYLUS_PUCK,
WSTYLUS_3D,
+ WSTYLUS_MOBILE,
} WacomStylusType;
/**
diff --git a/test/test-stylus-validity.c b/test/test-stylus-validity.c
index db628cb..849c205 100644
--- a/test/test-stylus-validity.c
+++ b/test/test-stylus-validity.c
@@ -53,6 +53,7 @@ test_type(gconstpointer data)
case WSTYLUS_STROKE:
case WSTYLUS_PUCK:
case WSTYLUS_3D:
+ case WSTYLUS_MOBILE:
break;
case WSTYLUS_UNKNOWN:
default:
@@ -60,6 +61,14 @@ test_type(gconstpointer data)
}
}
+static void
+test_mobile(gconstpointer data)
+{
+ const WacomStylus *stylus = data;
+
+ g_assert_cmpint(libwacom_stylus_get_type(stylus), ==, WSTYLUS_MOBILE);
+}
+
static void
test_eraser(gconstpointer data)
{
@@ -202,6 +211,21 @@ _add_test(const WacomStylus *stylus, GTestDataFunc func, const char *funcname)
#define add_test(stylus, func_) \
_add_test(stylus, func_, #func_)
+static void
+setup_aes_tests(const WacomStylus *stylus)
+{
+ add_test(stylus, test_mobile);
+
+ add_test(stylus, test_pressure);
+ add_test(stylus, test_no_distance);
+
+ if (libwacom_stylus_get_id(stylus) < 0x8000) {
+ add_test(stylus, test_no_tilt);
+ } else {
+ add_test(stylus, test_tilt);
+ }
+}
+
static void
setup_emr_tests(const WacomStylus *stylus)
{
@@ -260,6 +284,7 @@ setup_tests(const WacomStylus *stylus)
default:
switch (libwacom_stylus_get_id(stylus)) {
case 0x885:
+ case 0x8051:
add_test(stylus, test_no_buttons);
break;
default:
@@ -267,7 +292,12 @@ setup_tests(const WacomStylus *stylus)
}
}
- setup_emr_tests(stylus);
+ /* Technology-specific tests */
+ if (libwacom_stylus_get_type(stylus) == WSTYLUS_MOBILE) {
+ setup_aes_tests(stylus);
+ } else {
+ setup_emr_tests(stylus);
+ }
if (libwacom_stylus_has_eraser(stylus))
add_test(stylus, test_eraser);
--
2.26.2

View File

@ -0,0 +1,269 @@
From 97bcccd2aeadaf541d55a62571e09743ce15d7ff Mon Sep 17 00:00:00 2001
From: Jason Gerecke <killertofu@gmail.com>
Date: Fri, 1 Nov 2019 11:51:20 -0700
Subject: [PATCH libwacom 16/17] Add multiple AES stylus definitions
Adds definitions for many different AES styli. The precise information
about supported features is hard to come by, but in general most pens
have two buttons (one of which is treated as an eraser) and can only
report pressure. A few exceptions are known or suspected and their
data has been set accordingly.
Most of the new entries have comments that list several pens for a single
ID. The individual tools could potentially be distinguished with the aid
of vendor ID information available in the HID reports, but this data is
not forwarded to userspace by the kernel.
For each pen I have included additional data in the comments that may or
may not be useful. The format of the comments are as follows:
OEM1 ; BT device VID | BT device PID [ | FLAGS] ("Model Name" / ModelNumber)
OEM2 ; BT device VID | BT device PID [ | FLAGS] ("Model Name" / ModelNumber)
etc.
For tools with a Bluetooth button, the VID:PID of the emulated keyboard
device is given. Tools without such a button use placeholder values of
VID_NONE and 0x0000. Additional flags provide further information:
* BAT_SWAP / BAT_CHRG: Whether the pen uses replaceable batteries or
has an internal rechargeable battery.
* BAT_HID / BAT_GATT: Whether the battery level for the Bluetooth button
is available through HID or through GATT.
* BAT_SHARED: Indicates the pen has a single battery powering both the
AES and Bluetooth portions of the pen.
* LONGPRESS: Bluetooth button supports the long-press gesture.
* PROX: Proximity sensing feature available for Bluetooth button.
Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
(cherry picked from commit a864679083c035eb08a75cf084a6564d589c0b1c)
---
data/libwacom.stylus | 205 +++++++++++++++++++++++++++++++++++++++++--
1 file changed, 198 insertions(+), 7 deletions(-)
diff --git a/data/libwacom.stylus b/data/libwacom.stylus
index 66f7e88..354cac1 100644
--- a/data/libwacom.stylus
+++ b/data/libwacom.stylus
@@ -20,6 +20,204 @@ Buttons=2
Axes=Pressure;
Type=General
+[0x1]
+# Lenovo ; VID_NONE | 0x0000 | BAT_SWAP
+Name=AES Pen
+Group=isdv4-aes
+Buttons=1
+IsEraser=true
+Axes=Pressure
+Type=Mobile
+
+[0x11]
+# Lenovo ; VID_NONE | 0x0000 | BAT_CHRG
+Name=AES Pen
+Group=isdv4-aes
+Buttons=1
+IsEraser=true
+Axes=Pressure
+Type=Mobile
+
+[0x19]
+# Lenovo ; VID_LENOVO | 0x60A8 | BAT_SWAP | BAT_HID
+Name=AES Pen
+Group=isdv4-aes
+Buttons=1
+IsEraser=true
+Axes=Pressure
+Type=Mobile
+
+[0x21]
+# HP ; VID_NONE | 0x0000 | BAT_SWAP
+# Huawei ; VID_NONE | 0x0000 | BAT_SWAP
+# Lenovo ; VID_NONE | 0x0000 | BAT_SWAP
+Name=AES Pen
+Group=isdv4-aes
+Buttons=1
+IsEraser=true
+Axes=Pressure
+Type=Mobile
+
+[0x31]
+# Dell ; VID_BROADCOM | 0x81B9 | BAT_SWAP
+# HP ; VID_CHICONY | 0xB4A3 | BAT_SWAP | BAT_HID
+Name=AES Pen
+Group=isdv4-aes
+Buttons=1
+IsEraser=true
+Axes=Pressure
+Type=Mobile
+
+[0x39]
+# Huawei ; VID_HUAWEI | 0x1091 | BAT_SWAP ("Huawei MatePen" / AF61)
+Name=AES Pen
+Group=isdv4-aes
+Buttons=1
+IsEraser=true
+Axes=Pressure
+Type=Mobile
+
+[0x49]
+# Wacom ; VID_WACOM | 0x035F | BAT_SWAP | BAT_GATT | BAT_SHARED | LONGPRESS ("Wacom Bamboo Ink" / CS321A)
+Name=Bamboo Ink
+Group=isdv4-aes
+Buttons=1
+IsEraser=true
+Axes=Pressure
+Type=Mobile
+
+[0x71]
+# Wacom ; VID_WACOM | 0x035F | BAT_SWAP | BAT_GATT | BAT_SHARED | LONGPRESS ("Wacom Bamboo Ink" / CS321A1)
+Name=Bamboo Ink
+Group=isdv4-aes
+Buttons=1
+IsEraser=true
+Axes=Pressure
+Type=Mobile
+
+[0x221]
+# HP ; VID_CHICONY | 0xB4A3 | BAT_SWAP | BAT_HID
+# Lenovo ; VID_NONE | 0x0000 | BAT_SWAP
+Name=AES Pen
+Group=isdv4-aes
+Buttons=1
+IsEraser=true
+Axes=Pressure
+Type=Mobile
+
+[0x231]
+# Dell ; VID_BROADCOM | 0x81C6 | BAT_SWAP | LONGPRESS (Dell PN557W)
+# HP ; VID_CHICONY | 0xB4A3 | BAT_SWAP | BAT_HID
+Name=AES Pen
+Group=isdv4-aes
+Buttons=1
+IsEraser=true
+Axes=Pressure
+Type=Mobile
+
+[0x271]
+# Wacom ; VID_NONE | 0x0000 | BAT_SWAP ("Wacom Bamboo Ink" / CS323A)
+Name=Bamboo Ink
+Group=isdv4-aes
+Buttons=1
+IsEraser=true
+Axes=Pressure
+Type=Mobile
+
+[0x421]
+# HP ; VID_NONE | 0x0000 | BAT_SWAP
+Name=AES Pen
+Group=isdv4-aes
+Buttons=1
+IsEraser=true
+Axes=Pressure
+Type=Mobile
+
+[0x431]
+# Dell ; VID_BROADCOM | 0x81B9 | BAT_SWAP
+Name=AES Pen
+Group=isdv4-aes
+Buttons=1
+IsEraser=true
+Axes=Pressure
+Type=Mobile
+
+[0x621]
+# Lenovo ; VID_NONE | 0x0000 | BAT_SWAP
+Name=AES Pen
+Group=isdv4-aes
+Buttons=1
+IsEraser=true
+Axes=Pressure
+Type=Mobile
+
+[0x631]
+# Dell ; VID_NONE | 0x0000 | BAT_SWAP | LONGPRESS (Dell PN557W)
+Name=AES Pen
+Group=isdv4-aes
+Buttons=1
+IsEraser=true
+Axes=Pressure
+Type=Mobile
+
+[0x8051]
+# Google ; VID_NONE | 0x0000 | BAT_SWAP ("Google Pixelbook Pen" / C0B)
+Name=AES Pen
+Group=isdv4-aes
+Buttons=0
+IsEraser=true
+Axes=Tilt;Pressure
+Type=Mobile
+
+[0x805B]
+# Dell ; VID_BROADCOM | 0x81D5 | BAT_SWAP | BAT_GATT | BAT_SHARED | LONGPRESS (Dell PN579X)
+# Lenovo ; VID_LENOVO | 0x60C5 | BAT_SWAP | BAT_GATT | BAT_SHARED
+# Toshiba; VID_NONE | 0x0000 | BAT_SWAP
+Name=AES Pen
+Group=isdv4-aes
+Buttons=1
+IsEraser=true
+Axes=Tilt;Pressure
+Type=Mobile
+
+[0x806B]
+# HP ; VID_CHICONY | 0x1728 | BAT_CHRG | BAT_PROX | BAT_SHARED | LONGPRESS | PROX ("HP Rechargeable Active Pen" / HP Active Pen G2 / 4KL69AA)
+# Huawei ; VID_NONE | 0x0000 | BAT_SWAP
+# Lenovo ; VID_LENOVO | 0x60C2 | BAT_CHRG | BAT_GATT | BAT_SHARED
+Name=AES Pen
+Group=isdv4-aes
+Buttons=1
+IsEraser=true
+Axes=Tilt;Pressure
+Type=Mobile
+
+[0x807B]
+# Wacom ; VID_WACOM | 0x0397 | BAT_CHRG | BAT_GATT | BAT_SHARED | LONGPRESS ("Wacom Bamboo Ink Plus" / CS322A)
+Name=Bamboo Ink Plus
+Group=isdv4-aes
+Buttons=1
+IsEraser=true
+Axes=Tilt;Pressure
+Type=Mobile
+
+[0x826B]
+# HP ; VID_CHICONY | 0x1728 | BAT_CHRG | BAT_PROX | BAT_SHARED | LONGPRESS | PROX
+Name=AES Pen
+Group=isdv4-aes
+Buttons=1
+IsEraser=true
+Axes=Tilt;Pressure
+Type=Mobile
+
+[0x846B]
+# HP ; VID_CHICONY | 0x1850 | BAT_CHRG | BAT_GATT | BAT_SHARED | LONGPRESS | PROX ("HP Rechargeable Active Pen G3" / HP Active Pen G3 / GSG43AA)
+Name=AES Pen
+Group=isdv4-aes
+Buttons=1
+IsEraser=true
+Axes=Tilt;Pressure
+Type=Mobile
+
# Inking pen have no eraser
[0x812]
# Intuos and Intuos2
@@ -548,10 +746,3 @@ Type=Puck
HasLens=false
HasWheel=true
Buttons=5
-
-[0x21]
-Name=Thinkpad Pro Pen
-Buttons=2
-HasEraser=false
-Axes=Pressure;Distance;
-Type=General
--
2.26.2

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
Name: libwacom
Version: 1.1
Release: 2%{?dist}
Release: 3%{?dist}
Summary: Tablet Information Client Library
Requires: %{name}-data
@ -10,6 +10,13 @@ URL: https://github.com/linuxwacom/libwacom
Source0: https://github.com/linuxwacom/libwacom/releases/download/%{name}-%{version}/%{name}-%{version}.tar.bz2
# Note: this one is 13 patches in one
Patch01: 0000-lenovo-isdv4-tablets.patch
Patch02: 0014-test-Split-EMR-specific-stylus-tests-into-their-own-.patch
Patch03: 0015-Introduce-WSTYLUS_MOBILE-type-for-AES-devices.patch
Patch04: 0016-Add-multiple-AES-stylus-definitions.patch
Patch05: 0017-Add-isdv4-aes-stylus-group-to-all-AES-sensors.patch
BuildRequires: meson gcc
BuildRequires: glib2-devel libgudev1-devel
BuildRequires: systemd systemd-devel
@ -87,6 +94,9 @@ install -d ${RPM_BUILD_ROOT}/%{_udevrulesdir}
%{_datadir}/libwacom/layouts/*.svg
%changelog
* Thu Jun 25 2020 Peter Hutterer <peter.hutterer@redhat.com> 1.1-3
- Add a set of Lenovo tablets and styli (#1850319)
* Thu Nov 07 2019 Peter Hutterer <peter.hutterer@redhat.com> 1.1-2
- Conflict with older libwacom