[Gta04-owner] Replicant 4.2 upstream status

Paul Kocialkowski contact at paulk.fr
Wed Apr 30 20:17:54 CEST 2014


> > * bq27x00 polls more often (1 minute)
> > * bq27x00 changes that I'll detail in separate threads (always report
> > charge, avoid inconsistent states, twl4030 supplicant)
> 
> We've had pretty good results, by using the userspace interface (e.g.
> /sys/module/bq27x00_battery/parameters/poll_interval). Maybe you can
> have a look at this, to avoid (not mainline-able) kernel changes.

I thought this wasn't available when the module is builtin, though I
didn't bother to check. I reckon it's cleaner to do it from userspace
that way. I'll check that once I can access the device (not in the right
location currently).

> > Regarding the missing user-space features, I have decided to go with the
> > following schedule, more or less in that precise order:
> > * GPS
> > * Full audio (including headset detection and routing)
> > * Wi-Fi (ready on the Goldelico version)
> > * Bluetooth (including audio)
> > * Sensors
> > * Modem (don't forget bluetooth routing)
> > * Camera
> >
> > A few other details are also left:
> > * SELinux
> > * Power profile
> 
> I'm mostly working on sensors right now. So should easily be able to
> import each others changes, once ready. :)

I've seen your work, accelerometer seems to be working well, but the
values are not in proper units, which causes the device to not rotate
automatically as it should. The normal range of the accelerometer should
be [-g;+g], so there is some calculation to do on the raw values to get
m/s^2 values. You can find those transfer functions on the datasheet
usually (X g/LSB or so) or find it on other (free) implementations for
the same chip.

Note that I have a lot of experience with sensors, especially
undocumented ones, so I could help if there are grey areas!

> > On the kernel side, there is a lot to do as well:
> > * ADB crash, rndis not working
> 
> Having a new look at the android-3.10 kernel might help. At the time
> when I imported ADB that kernel tree was still marked experimental, so
> things might have changed.

Good idea indeed, I'll look at it. Having reliable poweroff/reboot would
be good (currently, I have to remove the USB cable every time it reboots
or powers down, else it messes with my host USB interfaces and causes a
kernel panic on the host).

> > * don't fully suspend if wakelocks are held
> 
> Hmm this sort of works, e.g. if you do:
>   echo test > /sys/power/wake_lock
> 
> The system (CPU) will stay on, but the display will turn off if you
> click the PWR button.
> If you enter:
>   echo test > /sys/power/wake_unlock
> 
> The system will suspend normally again. Also apps like OSMand keep the
> display+CPU on. We have to check why some apps are not able to grab
> wakelocks. Maybe they expect a different name of the "wake_lock" node,
> or the permissions are not sufficient?

At first, I thought the mainline implementation of wakelocks was
incomplete, since earlysuspend/earlyresume was missing, but it turns out
using wakeup_source the way it does is a perfectly valid approach. It'll
just be slightly less effective without earlysuspend regarding power
consumption, but that's a small detail.

Actually, the wakeup_source/autosleep-based implementation (the one in
mainline) is fully supported by Android 4.2 and the Nexus 10 tablet is
even using it too, instead of earlysuspend and traditional wakelocks.

I'll investigate why it doesn't hold a wakelock properly when playing
music. Your suggestions are all relevant.

Also, I think we could add a few in-kernel wakelocks (actually
wakeup_source) for convenience, for instance, when USB is connected, so
that the device doesn't go to sleep when the user is using ADB.

The alaram clock issue seems more problematic though.

> > Still regarding the kernel, I tried to move the current draw limit from
> > 100mA to 250mA in the code and that makes USB storage sticks work with
> > OTG. Since that's a pretty nice feature to have and given that
> > apparently, it works properly and doesn't make the line collapse,
> > perhaps we should consider it. Most of these devices seem to report
> > 200mA max consumption.
> 
> That's nice! But I can't find this commit anywhere, could you please
> point me to it, so I can import it into the Goldelico 3.12-replicant4
> kernel?

Well, I didn't make a patch and just tried that as a change on my local
tree. If you think it's okay to have that integrated, I'll make a patch
and push it. In my opinion, it's a good thing to have as it makes it
very convenient to access files from USB storage sticks.

-- 
Paul Kocialkowski, Replicant developer

Replicant is a fully free Android distribution

Website: http://www.replicant.us/
Redmine: http://redmine.replicant.us/

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://lists.goldelico.com/pipermail/gta04-owner/attachments/20140430/3cc1d018/attachment.asc>


More information about the Gta04-owner mailing list