Hi there!
I'm running the Angstrom distribution on top of Linux kernel 2.6.30 on a custom board equipped with a XGA (1024x768) display and touch screen.
Everything is working fine, but touch screen calibration via xtscal results in non-linear deviations in all directions. The cursor moves near the finger, but when moving from left to right, it switches from one side of the finger to the other.
Same thing happens using ts_calibrate, besides this program fails to return fully to the GPE desktop.
Does anyone have similar problems or a hint how to fix it?
It would help to know where the calibration parameters (from /etc/pointercal) are interpreted by the input handler. The Atmel driver doesn't care for it.
Following a few dumps for further information:
# cat /etc/profile.d/tslib.sh
export TSLIB_TSDEVICE=/dev/input/touchscreen0
export TSLIB_CALIBFILE=/etc/pointercal
export TSLIB_CONFFILE=/etc/ts.conf
export TSLIB_TSEVENTTYPE=INPUT
export TSLIB_CONSOLEDEVICE=none
export TSLIB_FBDEVICE=/dev/fb0
export TSLIB_PLUGINDIR=/usr/lib/ts
# xtscal -debug
Using XCALIBRATE
rotation conversion: (24,24) -> (24,24)
rotation conversion: (1000,24) -> (1000,24)
rotation conversion: (1000,744) -> (1000,744)
rotation conversion: (24,744) -> (24,744)
rotation conversion: (512,384) -> (512,384)
point 0: [379 341]
point 1: [301 697]
point 2: [730 744]
point 3: [677 293]
point 4: [520 523]
-699.914551 -0.052303 2.384885
-626.954590 1.916567 0.022434
constants are: -3427 156295 -45869600 125604 1470 -41088096 65536
# ts_calibrate
xres = 1024, yres = 768
Took 6 samples...
Top left : X = 379 Y = 358
Took 8 samples...
Top right : X = 318 Y = 689
Took 10 samples...
Bot right : X = 710 Y = 741
Took 13 samples...
Bot left : X = 667 Y = 305
Took 4 samples...
Center : X = 511 Y = 521
-697.012207 -0.052685 2.364675
-612.219971 1.917816 0.009009
Calibration constants: -45679392 -3452 154971 -40122448 125685 590 65536
# evtest /dev/input/event1
Input evdev.c(EVIOCGBIT): Suspicious buffer size 511, limiting output to 64 bytes. See
http://userweb.kernel.org/~dtor/eviocgbit-bug.htmldriver version is 1.0.0
Input device ID: bus 0x0 vendor 0x0 product 0x0 version 0x0
Input device name: "atmel touch screen controller"
Supported events:
Event type 0 (Reset)
Event code 0 (Reset)
Event code 1 (Key)
Event code 3 (Absolute)
Event type 1 (Key)
Event code 330 (Touch)
Event type 3 (Absolute)
Event code 0 (X)
Value 508
Min 0
Max 1023
Event code 1 (Y)
Value 439
Min 0
Max 1023
Event code 24 (Pressure)
Value 0
Min 0
Max 15000
Testing ... (interrupt to exit)
Event: time 1275613628.771390, type 3 (Absolute), code 0 (X), value 485
Event: time 1275613628.771432, type 3 (Absolute), code 1 (Y), value 529
Event: time 1275613628.771444, type 1 (Key), code 330 (Touch), value 1
Event: time 1275613628.771454, type 3 (Absolute), code 24 (Pressure), value 7500
Event: time 1275613628.771464, type 0 (Reset), code 0 (Reset), value 0
Event: time 1275613628.776630, type 3 (Absolute), code 1 (Y), value 528
Event: time 1275613628.776675, type 0 (Reset), code 0 (Reset), value 0
Event: time 1275613628.781858, type 3 (Absolute), code 0 (X), value 484
Event: time 1275613628.781919, type 0 (Reset), code 0 (Reset), value 0
Event: time 1275613628.787091, type 3 (Absolute), code 1 (Y), value 527
Event: time 1275613628.787141, type 0 (Reset), code 0 (Reset), value 0
Event: time 1275613628.802765, type 3 (Absolute), code 1 (Y), value 526
Event: time 1275613628.802818, type 0 (Reset), code 0 (Reset), value 0
Event: time 1275613628.808003, type 3 (Absolute), code 0 (X), value 483
Event: time 1275613628.808055, type 0 (Reset), code 0 (Reset), value 0
Event: time 1275613628.818450, type 3 (Absolute), code 0 (X), value 484
Event: time 1275613628.818503, type 0 (Reset), code 0 (Reset), value 0
Event: time 1275613628.823686, type 3 (Absolute), code 0 (X), value 483
Event: time 1275613628.823744, type 0 (Reset), code 0 (Reset), value 0
Event: time 1275613628.828923, type 3 (Absolute), code 1 (Y), value 525
Event: time 1275613628.828980, type 0 (Reset), code 0 (Reset), value 0
Event: time 1275613628.839367, type 3 (Absolute), code 0 (X), value 484
Event: time 1275613628.839421, type 0 (Reset), code 0 (Reset), value 0
Event: time 1275613628.844620, type 3 (Absolute), code 0 (X), value 485
Event: time 1275613628.844671, type 3 (Absolute), code 1 (Y), value 523
Event: time 1275613628.844688, type 0 (Reset), code 0 (Reset), value 0
Event: time 1275613628.849837, type 3 (Absolute), code 0 (X), value 895
Event: time 1275613628.849885, type 3 (Absolute), code 1 (Y), value 146
Event: time 1275613628.849903, type 0 (Reset), code 0 (Reset), value 0
Event: time 1275613628.851550, type 1 (Key), code 330 (Touch), value 0
Event: time 1275613628.851598, type 3 (Absolute), code 24 (Pressure), value 0
Event: time 1275613628.851607, type 0 (Reset), code 0 (Reset), value 0
# cat /proc/bus/input/devices
I: Bus=0019 Vendor=0001 Product=0001 Version=0100
N: Name="gpio-keys"
P: Phys=gpio-keys/input0
S: Sysfs=/class/input/input0
U: Uniq=
H: Handlers=kbd event0
B: EV=3
B: KEY=30000 0 0 0 0 1680 0 0 10000000
I: Bus=0000 Vendor=0000 Product=0000 Version=0000
N: Name="atmel touch screen controller"
P: Phys=atmel_tsadcc/input0
S: Sysfs=/class/input/input1
U: Uniq=
H: Handlers=mouse0 event1
B: EV=b
B: KEY=400 0 0 0 0 0 0 0 0 0 0
B: ABS=1000003