android 4.0 触摸

场景:: Android4.0触摸屏驱动正常但触摸无作用

求助: Android4.0触摸屏驱动正常但触摸无作用
同一硬件平台,从gingerbread上面移植了触摸屏驱动到ics上面, 查看kernel部分触摸屏上报的位置和状态都正常准确, 但是上层却没有触摸效果, 按键和鼠标输入都正常, getevent命令也可以获取到触摸屏事件. 有没哪位朋友能帮忙分析一下可能是那个地方有问题了, 万分感谢.......

------解决方案--------------------
很奇怪,刚调过没这样的现象
------解决方案--------------------
看一下EventHub相关的吧,Gingerbreak里面是这样的,不知道ICS有没有EventHub这个组件。
------解决方案--------------------
android4.0与android2.3的touch 计算方法有了修改,就是只要id track有数据,就认为这个触摸点是有效的,它记录当前有效点与上一次采集的有效点进行对比:如果新增的,就认为是新点DOWN,没有了就是UP
前后都有就是MOVE,你自己发的点动作(up/down/move)不会被采用

估计楼主的touch driver是支持多点的,并且不管其它点有没有触下,都再向上报数据,所以就会发生数据错乱,你可以在启动后的LOCK界面移动,如果那个锁会移动的话,就是这个问题,可修改kernel上传方法,或者inputReader.cpp,

另需要一个idc配置文件表时是touchsreen,对计算采样有帮助

最后一点,driver中ABS_MT_POSITION_X,ABS_MT_POSITION_Y属性中有个max,min参数一定要实现,如果无效的话,android4.0认为是无效设备,不予支持
------解决方案--------------------
idc文件配置好应该就没问题了。

支持多点就把 framework/base/data/etc中的多点feature加到系统中去
------解决方案--------------------
那就是driver中ABS_MT_POSITION_X,ABS_MT_POSITION_Y属性中max,min,这两个参数没有实现了
android4.0会认为是无效设备

探讨
引用:

android4.0与android2.3的touch 计算方法有了修改,就是只要id track有数据,就认为这个触摸点是有效的,它记录当前有效点与上一次采集的有效点进行对比:如果新增的,就认为是新点DOWN,没有了就是UP
前后都有就是MOVE,你自己发的点动作(up/down/move)不会被采用

估计楼主的touch driver是支持多……

------解决方案--------------------
可能是hal层出问题。
------解决方案--------------------
max,min都是0,这就是无效的意思,不是说你写了就是实现了,
android4.0发现这两个值都是0的话,认为是无效的值,就不会支持此设备了,
看来100%就是这个问题了

探讨
引用:
那就是driver中ABS_MT_POSITION_X,ABS_MT_POSITION_Y属性中max,min,这两个参数没有实现了
android4.0会认为是无效设备


引用:
引用:

android4.0与android2.3的touch 计算方法有了修改,就是只要id……

------解决方案--------------------
ouch device 'atmel-touchscreen' could not query the properties of its associated display 0. The device will be inoperable until the display size becomes available.

这是正常的,表示你的设备还没有报surface size上来,稍后它会自动报上来的,这是正常打印
------解决方案--------------------
哎, 我们的两款触摸屏,一款能用,一款表现很奇怪,有响应但不正确, 查了一天没啥进展, 看了下google的文档,原来要改驱动:

http://source.android.com/tech/input/touch-devices.html

14. As of Android Ice Cream Sandwich 4.0, touch screen drivers may need to be changed to comply with the Linux input protocol specification.

The following changes may be required:

When a tool becomes inactive (finger goes "up"), it should stop appearing in subsequent multi-touch sync reports. When all tools become inactive (all fingers go "up"), the driver should send an empty sync report packet, such as SYN_MT_REPORT followed by SYN_REPORT.

Previous versions of Android expected "up" events to be reported by sending a pressure value of 0. The old behavior was incompatible with the Linux input protocol specification and is no longer supported.

Physical pressure or signal strength information should be reported using ABS_MT_PRESSURE.

Previous versions of Android retrieved pressure information from ABS_MT_TOUCH_MAJOR. The old behavior was incompatible with the Linux input protocol specification and is no longer supported.

Touch size information should be reported using ABS_MT_TOUCH_MAJOR.

Previous versions of Android retrieved size information from ABS_MT_TOOL_MAJOR. The old behavior was incompatible with the Linux input protocol specification and is no longer supported.

Touch device drivers no longer need Android-specific customizations. By relying on the standard Linux input protocol, Android can support a wider variety of touch peripherals, such as external HID multi-touch touch screens, using unmodified drivers.


------解决方案--------------------
ICS和GR应该做了很多改进
http://source.android.com/tech/input/touch-devices.html

http://source.android.com/tech/input/touch-devices.html