Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Need to fix sensors #1

Closed
RomzesRover opened this Issue · 9 comments

2 participants

@RomzesRover
Owner

We need to get sensors working and I think that the problem can be in permissions (ramdisk) or we need to write our own libsensors, to compile sensors.salsa
We use isl29018(light, proximity), and smb380 (accelerometer, orientation sensor)

@RomzesRover RomzesRover was assigned
@RomzesRover
Owner

on cm9 sensors works fine

@zabulus

Any logs for these problems?

@RomzesRover
Owner

I am so sorry but my current target cm9 and I only one person who works on this, so basecly I thint that we just need sensors.salsa source, but it impossible, cuz sensor isl29018 very old

@RomzesRover
Owner

drivers in our kernel 2.6.29 works fine I think, cuz im cm9 with this it works

it doesn't work in cm10+ cuz I think we need new sensors.salsa lib

@RomzesRover
Owner

D/SensorService( 385): nuSensorService starting...
E/SensorService( 385): couldn't open device for module sensors (Invalid argument)

@zabulus

Looks like sensors.salsa.lib uses deprecated sensors.h interface:
Here is callstack as it should be for that log you've provided:
SensorDevice::SensorDevice
sensors_open
module->methods->open
haldevice_open <--- here is yamaha hal library.
haldevice_open(const struct hw_module_t* module, const char* name,
struct hw_device_t** device)

methods->open has the same prototype, but in new versions it opens SENSORS_HARDWARE_POLL id, but in old (before GB) it opens SENSORS_HARDWARE_CONTROL or SENSORS_HARDWARE_DATA.

As for CM9 there should be some cruthes to open right things, or there should be wrapper to wrap old interface in new

Here is patch for old sensors, found on github:
teamgummy/frameworks_base@01f6664

References:
https://android.googlesource.com/platform/hardware/libhardware/+/gingerbread/include/hardware/sensors_deprecated.h
https://android.googlesource.com/platform/hardware/libhardware/+/gingerbread/include/hardware/sensors.h
https://github.com/AOKP-PASSION/device_htc_passion/blob/jb-mr1/libsensors/nusensors.cpp
https://www.codeaurora.org/cgit/external/thundersoft/qrd7225-ds-froyo/plain/hardware/yamaha/hal/sensors_hal.c?id=cf2880e06f7f20cb3f10f8ee386924e4d0fe6fc9

@RomzesRover
Owner

sensors now fixed
f1759d4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.