NOTICE: The Processors Wiki will End-of-Life in December of 2020. It is recommended to download any files or other content you may need that are hosted on processors.wiki.ti.com. The site is now set to read only.

Capacitive touch integration with android

From Texas Instruments Wiki
Jump to: navigation, search

Content is no longer maintained and is being kept for reference only!


Capacitive touch integration with Android - Flow & Trap[edit]

Introduction[edit]

Today more and more different fields are adopting touch screen or touch panels for application with human/machinery or human/computer interfaces. There are two types of touch panels are popular now a days.

  • Resistive touch
  • Capacitive touch

Resistive touch is simple, cheaper and easy to integrate. However with this touch level of calibration is required to be in place. There are various calibration algorithms available which can be use for this purpose.

Capacitive touch on other side has multi touch support and less prone to dust particle. Most capacitive touch controller has capability to support multiple configuration (x & y axis). According to configuration set for the touch one has to scale the inputs received from touch to the area of LCD. Kindly refer below figure.

Capacitive-scaling.png

As mentioned in above figure if touch screen having the same resolution as LCD on which it is mounted on then there is no question of scaling, but calibration might require to remove mechanical alignment error if introduce while mounting.

But as seen in second figure, where touch resolution is different than that of LCD’s. In such case every inputs coming from touch panel/screen has to be scaled or mapped to LCD’s visible resolution.

During integration phase, came across the problem - even after getting scaled input from touch driver, android screen does not show correct behavior. Very first thing of suspect is calibration issue, but after debugging and looking at the co-ordinate’s values from touch driver, found that values are getting re-scaled again at somewhere. To understand the cause; this document will briefly highlight on - input flow with respect to kernel and android interface and give solution for problem statement.

Touch Event Flow in brief[edit]

Below diagram explains top to bottom flow of touch event. Diagram has taken from the link {http://cjix.info/blog/misc/internal-input-event-handling-in-the-linux-kernel-and-the-android-userspace}.

Android-input-flow.png

Where does android do scaling?[edit]

Linux driver reports x and y axis’s information to input subsystem[edit]

Linux-driver-input.png

Android’s input layer read axis’s information[edit]

Android-reads-input.png

Android’s input layer scale co-ordinates before dispatch to window manager[edit]

Android-pass-input-to-windowmanager.png

Problem Statement[edit]

At time it happens that

  • Inside touch driver, function configures touch screen to get input based on lcd screen’s x & y parameters.
  • Also in other case; touch driver its self does the scaling of touch co-ordinates to lcd screen area.

In both case mentioned above, android layer has to be aware of this or else it will proceed with scaling based on axis information.

Solution:[edit]

To avoid mentioned problem, driver has to report axis’s information based on behavior. Ex. If driver configures touch screen to get 800x480 inputs for LCD 800x480 ( on which it is mounted on), then in probe function it has to be changed to 800x480 instead of maximum value. Or else put the value that has been defined in board file.

Capacitive-touch-androidintegrartion-flow.png

References[edit]

Technical Support and Product Updates[edit]

For further information or to report any problems, contact http://e2e.ti.com/android or http://support.ti.com.
For community support join http://groups.google.com/group/rowboat
For IRC #rowboat on irc.freenode.net

E2e.jpg {{
  1. switchcategory:MultiCore=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article Capacitive touch integration with android here.

Keystone=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article Capacitive touch integration with android here.

C2000=For technical support on the C2000 please post your questions on The C2000 Forum. Please post only comments about the article Capacitive touch integration with android here. DaVinci=For technical support on DaVincoplease post your questions on The DaVinci Forum. Please post only comments about the article Capacitive touch integration with android here. MSP430=For technical support on MSP430 please post your questions on The MSP430 Forum. Please post only comments about the article Capacitive touch integration with android here. OMAP35x=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article Capacitive touch integration with android here. OMAPL1=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article Capacitive touch integration with android here. MAVRK=For technical support on MAVRK please post your questions on The MAVRK Toolbox Forum. Please post only comments about the article Capacitive touch integration with android here. For technical support please post your questions at http://e2e.ti.com. Please post only comments about the article Capacitive touch integration with android here.

}}

Hyperlink blue.png Links

Amplifiers & Linear
Audio
Broadband RF/IF & Digital Radio
Clocks & Timers
Data Converters

DLP & MEMS
High-Reliability
Interface
Logic
Power Management

Processors

Switches & Multiplexers
Temperature Sensors & Control ICs
Wireless Connectivity