Need to fix sensors #1

Closed
RomzesRover opened this Issue Jun 14, 2013 · 9 comments

Comments

Projects
None yet
2 participants
Owner

RomzesRover commented Jun 14, 2013

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)

@ghost ghost assigned RomzesRover Jun 14, 2013

Owner

RomzesRover commented Jul 29, 2013

on cm9 sensors works fine

zabulus commented Aug 3, 2013

Any logs for these problems?

Owner

RomzesRover commented Aug 3, 2013

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

Owner

RomzesRover commented Aug 3, 2013

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

Owner

RomzesRover commented Aug 4, 2013

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

zabulus commented Aug 13, 2013

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

Owner

RomzesRover commented Aug 13, 2013

sensors now fixed
f1759d4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment