Android-x86
Fork

  • R/O
  • HTTP
  • SSH
  • HTTPS

hardware-libsensors: コミット一覧

hardware/libsensors


RSS
Rev. 日時 作者
eebd90d nougat-x86 2022-03-17 18:25:27 Chih-Wei Huang

kbdsensor: fix parsing of input device name

Originally we use %s in sscanf to get the device name from the property.
However, %s only matches a sequence of non-white-space characters. That
means if the name contains space characters, it can't be parsed correctly.

The patch uses strsep to extract the substring before the first delimiter
as the device name.

168c15b android-x86-7.1-r3 android-x86-7.1-r4 android-x86-7.1-r5 2019-07-02 12:55:43 Chih-Wei Huang

kbdsensor: fix uninitialized error

Initialize the struct sensors_poll_device_1 to zero, otherwise some
members may have unexpected value which causes crashing.

9e79f82 android-x86-7.1-r2 2018-04-11 16:19:34 Chih-Wei Huang

kbdsensor: fix system_server high load issue

After the change 1f9a8a2e, if the sensor is invalid, the polling method
will return immediately without any way to throttle the number of
executions of the main sensor thread loop. That causes CPU high load.

Indeed the HAL should not set the pointer of struct hw_device_t if the
initialization fails. Then the SensorService won't enable and poll the
sensor device.

Fixes: 1f9a8a2e (kbdsensor: update HAL version to 1_3)
Tested-by: Michael Goffioul <michael.goffioul@gmail.com>

e2e9cff android-x86-7.1-r1 2018-02-06 18:41:04 Chih-Wei Huang

Add back old sensors.iio and rename it

Rename it to sensors.iio-old so it could be built again.
Some people still want to use it.

0a39d58 2018-01-30 15:04:53 Chih-Wei Huang

Add back the setDelay function

According to https://source.android.com/devices/sensors/versioning

"Implement the batch function

... It replaces setDelay. setDelay will not be called anymore."

However, it is wrong. The setDelay is still called sometimes
as show in the system_server crashing log:

01-26 18:36:11.536 27879 27879 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
01-26 18:36:11.536 27879 27879 F DEBUG : Build fingerprint: 'Android-x86/android_x86_64/x86_64:7.1.2/N2G48H/cwhuan01041741:userdebug/test-keys'
01-26 18:36:11.536 27879 27879 F DEBUG : Revision: '0'
01-26 18:36:11.537 27879 27879 F DEBUG : ABI: 'x86_64'
01-26 18:36:11.537 27879 27879 F DEBUG : pid: 24500, tid: 27162, name: Binder:24500_12 >>> system_server <<<
01-26 18:36:11.537 27879 27879 F DEBUG : signal 11 (SIGSEGV), code 128 (SI_KERNEL), fault addr 0x0
01-26 18:36:11.537 27879 27879 F DEBUG : rax 332f83dbf746df52 rbx 0000794e04c48500 rcx 0000000000000000 rdx 0000000001312d00
01-26 18:36:11.537 27879 27879 F DEBUG : rsi 0000000000000000 rdi 0000794e04d19000
01-26 18:36:11.537 27879 27879 F DEBUG : r8 0000794df0f4f7b0 r9 0000794e0c62d47a r10 000000000000006e r11 0000000000000246
01-26 18:36:11.537 27879 27879 F DEBUG : r12 0000794e04c1b938 r13 0000000001312d00 r14 0000794e04c48518 r15 0000000000000000
01-26 18:36:11.537 27879 27879 F DEBUG : cs 0000000000000033 ss 000000000000002b
01-26 18:36:11.537 27879 27879 F DEBUG : rip 0000794e0af228ca rbp 0000794e04c1b920 rsp 0000794decc04fc0 eflags 0000000000010206
01-26 18:36:11.542 27879 27879 F DEBUG :
01-26 18:36:11.542 27879 27879 F DEBUG : backtrace:
01-26 18:36:11.542 27879 27879 F DEBUG : #00 pc 00000000000128ca /system/lib64/libsensorservice.so
01-26 18:36:11.542 27879 27879 F DEBUG : #01 pc 000000000001e51b /system/lib64/libsensorservice.so
01-26 18:36:11.542 27879 27879 F DEBUG : #02 pc 00000000000151af /system/lib64/libsensorservice.so

9026bbd 2017-12-29 15:28:27 Chih-Wei Huang

Disable my sensors.iio

Switch to android-iio-sensors-hal of 01.org.

aacbecd 2017-11-23 15:18:27 Chih-Wei Huang

iio-sensors: avoid memset a dynamic class

A dynamic class doesn't support static initialization. The compiler
complains:

hardware/libsensors/iio-sensors.cpp:119:9: warning: destination for this 'memset' call is a pointer to dynamic class 'SensorBase'; vtable pointer will be overwritten [-Wdynamic-class-memaccess]
memset(this, 0, sizeof(SensorBase));
~~~~~~ ^

Move all data members of SensorBase to a trivial class which could be
statically initialized.

Refer: http://en.cppreference.com/w/cpp/types/is_trivial

40d6eb0 2017-11-23 12:59:29 Chih-Wei Huang

w500_sensor: update HAL version to 1_3

f9d71d9 2017-11-22 19:33:59 Chih-Wei Huang

s103t_sensor: update HAL version to 1_3

fde170e 2017-11-22 19:22:05 Chih-Wei Huang

hdaps: update HAL version to 1_3

03e8f68 2017-11-22 18:42:59 Chih-Wei Huang

iio-sensors: update HAL version to 1_3

1f9a8a2 2017-11-22 16:59:29 Chih-Wei Huang

kbdsensor: update HAL version to 1_3

ac738e6 marshmallow-x86 android-x86-6.0-r1 android-x86-6.0-r2 android-x86-6.0-r3 2016-07-25 17:07:20 Chih-Wei Huang

iio-sensors: add the missing closedir

083a638 2016-03-29 02:02:30 Mario Holzinger

iio-sensors: support conversion matrix gyroscope

With the prop hal.sensors.iio.anglvel.matrix=f1x,f1y,f1z,f2x,f2y,f2z,f3x,f3y,f3z
it is possible to manipulate the sensors directions and assignment to the
corresponding axes. The default is
hal.sensors.iio.anglvel.matrix=1,0,0,0,1,0,0,0,1

1586140 2016-03-29 01:56:04 Mario Holzinger

iio-sensors: support conversion matrix magnetic field

With the prop hal.sensors.iio.magn.matrix=f1x,f1y,f1z,f2x,f2y,f2z,f3x,f3y,f3z
it is possible to manipulate the sensors directions and assignment to the
corresponding axes. The default is
hal.sensors.iio.magn.matrix=1,0,0,0,1,0,0,0,1

43c3ffd 2016-03-29 01:50:25 Mario Holzinger

iio-sensors: support conversion matrix acceleration

With the prop hal.sensors.iio.accel.matrix=f1x,f1y,f1z,f2x,f2y,f2z,f3x,f3y,f3z
it is possible to manipulate accel sensors directions and assignment to the
corresponding axes. The default is
hal.sensors.iio.accel.matrix=-1,0,0,0,1,0,0,0,-1

7107b20 2015-12-30 02:30:23 Chih-Wei Huang

Fix iio sensors crashing

Fix the incorrect condition to end the loop of probing.

fdeb50e 2015-10-11 02:51:33 Chih-Wei Huang

Fix the building issues on Android 6.0

The stlport is gone.

cba8dc4 lollipop-x86 2015-06-06 08:37:15 Chih-Wei Huang

enable multiarch builds for iio-sensors

d26fccf 2015-06-06 08:37:08 Chih-Wei Huang

Merge remote-tracking branch 'x86/kitkat-x86' into lollipop-x86

42669af kitkat-x86 android-x86-4.4-r3 2015-06-06 08:36:27 Chih-Wei Huang

iio-sensors: initial porting for iio based sensors

ba9527e 2014-11-06 13:27:26 Chih-Wei Huang

enable multiarch builds

Convert LOCAL_MODULE_PATH to LOCAL_MODULE_RELATIVE_PATH
to support 64-bit targets.

0402f1e 2014-11-06 12:29:26 Chih-Wei Huang

kbdsensor: fix building issues on Android 5.0

More fields are added to struct sensor_t.

76cd154 android-x86-4.4-r1 android-x86-4.4-r2 2014-07-02 17:14:56 Tanguy Pruvot

hdaps: add support for ST LIS302DL (Acer 1425P/1825PTZ)

Allow also to tune axis signs and to swap axis like X<>Y

setprop hal.sensors.axis.revert "1,-1,1" # to revert Y axis
setprop hal.sensors.axis.order "1,0,2" # for Y,X,Z

This could be required for tablet pc with Accelerometers in Base
and not in Screen part (Acer 1425P has a rotative screen)

Signed-off-by: Tanguy Pruvot <tanguy.pruvot@gmail.com>

ae5ff17 2014-06-30 18:04:08 Chih-Wei Huang

kbdsensor: fix crashing if no device found

43c7fda 2014-06-24 00:58:10 Tanguy Pruvot

w500: fix loop segfault in input devices list

f2b9611 2014-05-02 17:27:24 Chih-Wei Huang

hdaps: support Pegatron Lucid Tablet Accelerometer

8766ae4 2013-12-19 23:58:39 Kyle Evans

add reverse button rotation

9f94c41 2013-12-19 23:58:39 Kyle Evans

allow one button rotation to be soft coded.

6453f9c 2013-11-02 01:45:46 Chih-Wei Huang

kbdsensor: fix kitkat-x86 building errors

旧リポジトリブラウザで表示