Light sensor fixup
I have been working on fixing up the light sensor readings and I need somebody to test the results. Once I hear it is working for others I will submit it to Gerrit.
What this does: fixes light sensor values reported to the system
What this doesn't do: adjust any of the ranges that trigger the ranges or the screen brightness values (you have to use the custom light levels until I submit that fix)
The kernel driver has the light level values as follows:
3, 7, 12, 57, 114, 279, 366, 453, 540, 1023
Switched these values in place of the ones in LightSensor.cpp and a couple of other changes.
Now I am getting the full range of readings. The Upper light sensor levels (in Cyanogenmod settings > Display > Automatic Backlight > Use custom , Edit other levels) still need to be adjusted to the above levels, then you can customize the screen and button brightness to your desire.
Here is a zip that can be flashed or you can extract the file /system/lib/hw/sensors.supersonic.so to the same directory on the phone using root explorer or adb.
As far as I can tell it should work with stable CM7 and most gingerbread roms.