由于Android4.0 的输入子系统的改变,导致touch screen的输入,上层无法使用。
这个时候必需修改驱动跟上层对应起来,驱动改好后,输入的事件上层发现了,但是很奇怪有一个圆点,后来研究和查资料才发现原来现在上层认到的Touch 设备不是Touch Screen, 原来是 Touch Pad, 以前2.3是没有这个问题的,找了很久,终于找到问题的根源:
现在touch screen 必需指定 touch.deviceType = touchScreen 要不然系统会认为是 touchPad 导致touch Screen 无法正常使用
而touch.deviceType的指定是放在系统的ystem/usr/idc/ 下面的.idc 文件,以注册的输入系统的名字作为文件名的( input->name = client->name;),跟以前的按键映射表差不多
现修改如下: device/samsung/smdk4x12/device.mk 添加自己TP的配置文件
PRODUCT_COPY_FILES += \ //该指令个含义编译的时候是把:前的文件拷贝到后面的目录中
device/common/gps/gps.conf_US:system/etc/gps.conf \
device/honmax/PAD1103/init.rc:root/init.freescale.rc \
device/honmax/PAD1103/init.usb.rc:root/init.freescale.usb.rc \
device/honmax/PAD1103/vold.fstab:system/etc/vold.fstab \
device/honmax/PAD1103/gpsreset.sh:system/etc/gpsreset.sh \
device/honmax/PAD1103/eGalax_Touch_Screen.idc:system/usr/idc/eGalax_Touch_Screen.idc \
device/honmax/PAD1103/eGalax_Touch_Screen.idc:system/usr/idc/HannStar_P1003_Touchscreen.idc
device/honmax/product/Honmax_Touch_Screen.idc:system/usr/idc/Honmax_Touch_Screen.idc \
device/honmax/product/Honmax_Touch_Screen.idc:system/usr/idc/ilitek_Touch_Screen.idc \
pixcir_ts.idc配置文件参考
# Copyright (C) 2010 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Input Device Calibration File for the touch screen.
#
# Basic Parameters
touch.deviceType = touchScreen
touch.orientationAware = 1
# Size
# Based on empirical measurements, we estimate the size of the contact
# using size = sqrt(area) * 43 + 0.
touch.size.calibration = area
touch.size.scale = 43
touch.size.bias = 0
touch.size.isSummed = 0
# Pressure
# Driver reports signal strength as pressure.
#
# A normal thumb touch typically registers about 80 signal strength
# units although we don't expect these values to be accurate.
touch.pressure.calibration = amplitude
touch.pressure.scale = 0.0125
# Orientation
touch.orientation.calibration = none
由于Android4.0 的输入子系统的改变,导致touch screen的输入,上层无法使用。
这个时候必需修改驱动跟上层对应起来,驱动改好后,输入的事件上层发现了,但是很奇怪有一个圆点,后来研究和查资料才发现原来现在上层认到的Touch 设备不是Touch Screen, 原来是 Touch Pad, 以前2.3是没有这个问题的,找了很久,终于找到问题的根源:
现在touch screen 必需指定 touch.deviceType = touchScreen 要不然系统会认为是 touchPad 导致touch Screen 无法正常使用
而touch.deviceType的指定是放在系统的ystem/usr/idc/ 下面的.idc 文件,以注册的输入系统的名字作为文件名的( input->name = client->name;),跟以前的按键映射表差不多
现修改如下: device/samsung/smdk4x12/device.mk 添加自己TP的配置文件
PRODUCT_COPY_FILES += \ //该指令个含义编译的时候是把:前的文件拷贝到后面的目录中 device/common/gps/gps.conf_US:system/etc/gps.conf \ device/honmax/PAD1103/init.rc:root/init.freescale.rc \ device/honmax/PAD1103/init.usb.rc:root/init.freescale.usb.rc \ device/honmax/PAD1103/vold.fstab:system/etc/vold.fstab \ device/honmax/PAD1103/gpsreset.sh:system/etc/gpsreset.sh \ device/honmax/PAD1103/eGalax_Touch_Screen.idc:system/usr/idc/eGalax_Touch_Screen.idc \ device/honmax/PAD1103/eGalax_Touch_Screen.idc:system/usr/idc/HannStar_P1003_Touchscreen.idc device/honmax/product/Honmax_Touch_Screen.idc:system/usr/idc/Honmax_Touch_Screen.idc \ device/honmax/product/Honmax_Touch_Screen.idc:system/usr/idc/ilitek_Touch_Screen.idc \ |
pixcir_ts.idc配置文件参考
# Copyright (C) 2010 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Input Device Calibration File for the touch screen.
#
# Basic Parameters
touch.deviceType = touchScreen
touch.orientationAware = 1
# Size
# Based on empirical measurements, we estimate the size of the contact
# using size = sqrt(area) * 43 + 0.
touch.size.calibration = area
touch.size.scale = 43
touch.size.bias = 0
touch.size.isSummed = 0
# Pressure
# Driver reports signal strength as pressure.
#
# A normal thumb touch typically registers about 80 signal strength
# units although we don't expect these values to be accurate.
touch.pressure.calibration = amplitude
touch.pressure.scale = 0.0125
# Orientation
touch.orientation.calibration = none