Skip to content

ts_uinput: MT type A / without pressure event from touchscreen / doesn't work #120

@vpeter4

Description

@vpeter4

I'm using touchscreen on Udoo Quad board
https://shop.udoo.org/eu/quad-dual/udoo-quad.html
https://shop.udoo.org/eu/video-kit-15-6-lvds-for-quaddual.html
but I think other displays can have same problem.

LibreELEC:~ # evtest /dev/input/event2
Input driver version is 1.0.1
Input device ID: bus 0x3 vendor 0x596 product 0x1 version 0x410
Input device name: "3M 3M USB Touchscreen - EX II"
Supported events:
  Event type 0 (EV_SYN)
  Event type 1 (EV_KEY)
    Event code 330 (BTN_TOUCH)
  Event type 3 (EV_ABS)
    Event code 0 (ABS_X)
      Value   6252
      Min        0
      Max    16384
    Event code 1 (ABS_Y)
      Value   3993
      Min        0
      Max    16384
Properties:
Testing ... (interrupt to exit)
Event: time 1512410518.959193, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 1
Event: time 1512410518.959193, type 3 (EV_ABS), code 0 (ABS_X), value 4213
Event: time 1512410518.959193, type 3 (EV_ABS), code 1 (ABS_Y), value 2989
Event: time 1512410518.959193, -------------- SYN_REPORT ------------
Event: time 1512410518.961182, type 3 (EV_ABS), code 0 (ABS_X), value 4216
Event: time 1512410518.961182, type 3 (EV_ABS), code 1 (ABS_Y), value 2984
Event: time 1512410518.961182, -------------- SYN_REPORT ------------
Event: time 1512410518.963175, type 3 (EV_ABS), code 0 (ABS_X), value 4218
Event: time 1512410518.963175, type 3 (EV_ABS), code 1 (ABS_Y), value 2983
Event: time 1512410518.991192, -------------- SYN_REPORT ------------
Event: time 1512410518.993170, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 0
Event: time 1512410518.993170, -------------- SYN_REPORT ------------

As visible it doesn't support pressure event. My ts_uinput_touch daemon supports pressure events but I think this is not really important. More important is that it sends button touch event correctly and Kodi reacts like it should.

LibreELEC:~ # evtest /dev/input/event3
Input driver version is 1.0.1
Input device ID: bus 0x3 vendor 0x34a5 product 0x67b8 version 0x1
Input device name: "tslib to uinput daemon"
Supported events:
  Event type 0 (EV_SYN)
  Event type 1 (EV_KEY)
    Event code 330 (BTN_TOUCH)
  Event type 3 (EV_ABS)
    Event code 0 (ABS_X)
      Value    197
      Min        0
      Max     1360
    Event code 1 (ABS_Y)
      Value    371
      Min        0
      Max      768
    Event code 24 (ABS_PRESSURE)
      Value      0
      Min        0
      Max      255
Properties:
Testing ... (interrupt to exit)
Event: time 1512410405.472672, type 3 (EV_ABS), code 0 (ABS_X), value 89
Event: time 1512410405.472672, type 3 (EV_ABS), code 1 (ABS_Y), value 122
Event: time 1512410405.472672, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 255
Event: time 1512410405.472672, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 1
Event: time 1512410405.472672, -------------- SYN_REPORT ------------
Event: time 1512410405.486680, type 3 (EV_ABS), code 1 (ABS_Y), value 121
Event: time 1512410405.486680, -------------- SYN_REPORT ------------
Event: time 1512410405.494672, type 3 (EV_ABS), code 0 (ABS_X), value 88
Event: time 1512410405.494672, -------------- SYN_REPORT ------------
Event: time 1512410405.508694, type 3 (EV_ABS), code 0 (ABS_X), value 89
Event: time 1512410405.508694, -------------- SYN_REPORT ------------
Event: time 1512410405.516665, type 3 (EV_ABS), code 1 (ABS_Y), value 122
Event: time 1512410405.584688, -------------- SYN_REPORT ------------
Event: time 1512410405.584738, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 0
Event: time 1512410405.584738, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 0
Event: time 1512410405.584738, -------------- SYN_REPORT ------------

But ts_uinput daemon is not sending button touch event correctly. Probably because it doesn't get pressure events from touchscreen?

LibreELEC:~ # evtest /dev/input/event3
Input driver version is 1.0.1
Input device ID: bus 0x6 vendor 0x0 product 0x0 version 0x0
Input device name: "ts_uinput"
Supported events:
  Event type 0 (EV_SYN)
  Event type 1 (EV_KEY)
    Event code 330 (BTN_TOUCH)
  Event type 3 (EV_ABS)
    Event code 0 (ABS_X)
      Value      0
      Min        0
      Max     1359
    Event code 1 (ABS_Y)
      Value      0
      Min        0
      Max      767
Properties:
Testing ... (interrupt to exit)
Event: time 1512411351.653637, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 1
Event: time 1512411351.653637, type 3 (EV_ABS), code 0 (ABS_X), value 65
Event: time 1512411351.653637, type 3 (EV_ABS), code 1 (ABS_Y), value 120
Event: time 1512411351.653637, -------------- SYN_REPORT ------------
Event: time 1512411351.671282, type 3 (EV_ABS), code 0 (ABS_X), value 64
Event: time 1512411351.671282, -------------- SYN_REPORT ------------
Event: time 1512411351.675308, type 3 (EV_ABS), code 1 (ABS_Y), value 121
Event: time 1512411351.675308, -------------- SYN_REPORT ------------
Event: time 1512411351.683307, type 3 (EV_ABS), code 1 (ABS_Y), value 122
Event: time 1512411351.683307, -------------- SYN_REPORT ------------
Event: time 1512411351.689299, type 3 (EV_ABS), code 1 (ABS_Y), value 124
Event: time 1512411351.689299, -------------- SYN_REPORT ------------
Event: time 1512411351.691309, type 3 (EV_ABS), code 0 (ABS_X), value 65
Event: time 1512411351.691309, type 3 (EV_ABS), code 1 (ABS_Y), value 126
Event: time 1512411351.691309, -------------- SYN_REPORT ------------
Event: time 1512411351.693302, type 3 (EV_ABS), code 0 (ABS_X), value 71
Event: time 1512411351.693302, type 3 (EV_ABS), code 1 (ABS_Y), value 134
Event: time 1512411351.693302, -------------- SYN_REPORT ------------
...........
Event: time 1512411362.851355, type 3 (EV_ABS), code 0 (ABS_X), value 179
Event: time 1512411362.851355, type 3 (EV_ABS), code 1 (ABS_Y), value 315
Event: time 1512411362.851355, -------------- SYN_REPORT ------------

..... missing BTN_TOUCH with value 0

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions