summa input driver problem
RUMI Szabolcs
rumi_ml at rtfm.hu
Sun Mar 22 20:00:10 PDT 2009
Hello!
I've got a Genius/KYE 1212HR tablet which seems to work well
with the summa driver BUT there are some options that are not
recognized, namely ActiveArea and ActiveOffset.
I got the following in /etc/X11/xorg.conf:
-----8<----------
Section "InputDevice"
Identifier "Tablet0"
Driver "summa"
Option "Vendor" "Genius"
Option "Name" "NewSketch 1212HRII"
Option "Device" "/dev/ttyS0"
Option "InputFashion" "Tablet"
Option "Protocol" "Auto"
Option "Compatible" "True"
Option "SendCoreEvents" "True"
Option "Cursor" "Stylus"
Option "Mode" "Absolute"
Option "Resolution" "500"
Option "ActiveArea" "12 9"
Option "ActiveOffset" "12 1.5"
Option "DebugLevel" "9"
EndSection
-----8<----------
Here is the relevant Xorg log snippet (with "Xorg -verbose 9"):
-----8<----------
xf86SumInit allocating...
xf86SumInit CollectInputOptions... done.
(**) Option "SendCoreEvents"
(**) Tablet0: always reports core events
(**) Tablet0: serial device is /dev/ttyS0
(**) Option "DebugLevel" "9"
(**) Summa: debug level set to 9
(**) Tablet0: resolution given 500
(**) Tablet0: set for absolute mode
(**) Tablet0: will not query firmware ID.
(**) Tablet0: cursor mode is cursor
(II) XINPUT: Adding extended input device "Tablet0" (type: SummaSketch Tablet)
(II) XINPUT: Adding extended input device "Keyboard0" (type: KEYBOARD)
(II) XINPUT: Adding extended input device "Mouse0" (type: MOUSE)
BEGIN xf86SumProc dev=0x9fb5ff8 priv=0x9fb5978 what=0
xf86SumProc pSum=0x9fb5ff8 fd = -1, what=INIT
xf86SumControlProc
opening /dev/ttyS0
(**) Option "Device" "/dev/ttyS0"
(**) Option "BaudRate" "9600"
(**) Option "StopBits" "1"
(**) Option "DataBits" "8"
(**) Option "Parity" "Odd"
(**) Option "Vmin" "1"
(**) Option "Vtime" "10"
(**) Option "FlowControl" "Xoff"
/dev/ttyS0 opened as fd 7
initializing SummaSketch tablet
setting up resolution
reading max coordinates
(==) Tablet0: tablet size is 12.00in. x 12.00in., 6000x6000 lines of resolution
(==) Tablet0: using tablet area 6000 by 6000, at res 500 lpi
(==) Tablet0: Using increment value of 3
END xf86SumProc Success what=0 dev=0x9fb5ff8 priv=0x9fb5978
(--) Mouse0: PnP-detected protocol: "ExplorerPS/2"
(II) Mouse0: ps2EnableDataReporting: succeeded
BEGIN xf86SumProc dev=0x9fb5ff8 priv=0x9fb5978 what=1
xf86SumProc pSum=0x9fb5ff8 fd = 7, what=ON
END xf86SumProc Success what=1 dev=0x9fb5ff8 priv=0x9fb5978
xf86SumReadInput BEGIN device=/dev/ttyS0 fd=7
prox=true x=1549 y=436 z=0 buttons=0
Adjusted coords x=413 y=87
prox=true x=1549 y=436 z=0 buttons=0
xf86SumReadInput END device=0x9fb5ff8 priv=0x9fb5978
-----8<----------
Please note that the options ActiveArea and ActiveOffset seem
to be totally ignored although they seem to be fully implemented
in xf86Summa.c:
-----8<----------
static SymTabRec SumTab[] = {
{ENDSUBSECTION, "endsubsection"},
{PORT, "port"},
{DEVICENAME, "devicename"},
{THE_MODE, "mode"},
{CURSOR, "cursor"},
{INCREMENT, "increment"},
{BORDER, "border"},
{DEBUG_LEVEL, "debuglevel"},
{HISTORY_SIZE, "historysize"},
{ALWAYS_CORE, "alwayscore"},
{ACTIVE_AREA, "activearea"},
{ACTIVE_OFFSET, "activeoffset"},
{COMPATIBLE, "compatible"},
{RESOLUTION, "resolution"},
{HITACHI_1217D, "hitachi_1217d"},
{-1, ""}
};
[...]
case ACTIVE_AREA:
if (xf86GetToken(NULL) != NUMBER)
xf86ConfigError("Option number expected");
priv->sumXSize = val->realnum * 100;
if (xf86GetToken(NULL) != NUMBER)
xf86ConfigError("Option number expected");
priv->sumYSize = val->realnum * 100;
if (xf86Verbose)
ErrorF("%s SummaSketch active area: %d.%02dx%d.%02d"
" inches\n", XCONFIG_GIVEN, priv->sumXSize / 100,
priv->sumXSize % 100, priv->sumYSize / 100,
priv->sumYSize % 100);
break;
case ACTIVE_OFFSET:
if (xf86GetToken(NULL) != NUMBER)
xf86ConfigError("Option number expected");
priv->sumXOffset = val->realnum * 100;
if (xf86GetToken(NULL) != NUMBER)
xf86ConfigError("Option number expected");
priv->sumYOffset = val->realnum * 100;
if (xf86Verbose)
ErrorF("%s SummaSketch active offsets: %d.%02d %d.%02d"
" inches\n", XCONFIG_GIVEN, priv->sumXOffset / 100,
priv->sumXOffset % 100, priv->sumYOffset / 100,
priv->sumYOffset % 100);
break;
-----8<--------------
Apparently the above code is implementing the SubSection "SummaSketch"
type of configuration. I don't understand how the new xorg format
configuration gets parsed by this code, and the log output is also
different than what one would expect by looking at xf86Summa.c...
I really don't understand what's going on here... Is there some
wrapper code somewhere else that is processing the new xorg type
of configuration and then injecting it somehow?
Anyway, without being able to set ActiveArea and ActiveOffset correctly
one cannot maintain the correct aspect ratio from the stylus moves to
the drawing because it maps a 1:1 aspect tablet (12x12in) surface to
a 4:3 (or whatever) aspect screen which results in a vertical distortion
of every hand move and consequently a distortion of everything drawn.
Please advise how to fix that!
Thanks,
Sab
More information about the xorg
mailing list