On Thursday, February 20, 2014 2:19:54 AM UTC+5:30, petr....@gmail.com 
wrote:
>
> Hi there,
>
> I need to calibrate screen (move coordinates to right, basically add some
> margin to left). Where is the best place to adjust the code? In kernel 
> driver?
> Or would it be possible and easier in user space libraries? Or is there a 
> some 
> boot parameter? (something like disp.screen0_output_mode from
> http://linux-sunxi.org/Kernel_arguments)?
>
> I'm using Allwinner A31.
>
> Thanks for any advice.
>

Refer to the AOSP documentation:
http://s.android.com/devices/tech/input/touch-devices.html#touch-device-driver-requirements

As per point 5, you need to supply the min and max values for the x and y 
axes corresponding to the edges of the actual display area. Android 
framework then takes care of calibration.

As an example, in the rowboat kernel for AM335x, the x-min, x-max, y-min, 
y-max corresponding to the display corners are set up as platform data to 
be supplied to the Touch driver, which in turn sends it to the Android 
framework using the input subsystem of the kernel.

https://gitorious.org/rowboat/kernel/source/03f2a1e9ea7f8b11ff6809f5a75b614011f8adb6:arch/arm/mach-omap2/board-am335xevm.c#L270

https://gitorious.org/rowboat/kernel/source/03f2a1e9ea7f8b11ff6809f5a75b614011f8adb6:drivers/input/touchscreen/ti_tsc.c#L392

To obtain the min/max values you can use the getevent utility in android
http://s.android.com/devices/tech/input/getevent.html

-Vishveshwar


> Regards,
> Petr
>

-- 
-- 
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: http://groups.google.com/group/android-porting

--- 
You received this message because you are subscribed to the Google Groups 
"android-porting" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-porting+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to