[Gta04-owner] Wakelocks working on GTA04/Replicant

Paul Kocialkowski contact at paulk.fr
Sun May 11 11:22:02 CEST 2014


> I've reached another step in improving the suspend/wakelock behavior of
> Replicant on the GTA04. The mainline implementation of wakelocks, which
> is used in our kernel was already working in theory, but the Android
> userspace was not able to acquire any locks, due to insufficient
> permissions and process capabilities.

Well, I have already fixed that last week, see:
https://gitorious.org/replicant/kernel_goldelico_gta04/commit/4741b20879962d6838b0925fa0680891e2b7c86d

Did I forget to mention that on the list? I so, then same on me. It's a
waste of time solving the same issues the same way separately!

Perhaps take a look at the tree so we avoid such a mix-up next time!
https://gitorious.org/replicant/kernel_goldelico_gta04/commits/bdb7dbfe8039225429584f294233a909daedf69f

The commits to have USB gadget properly working are there too, along
with some other things as I explained in my message on the thread
"Replicant 4.2 upstream status" from the 3rd of May.

Since then, I've also worked on better headphones/headset/button
detection. Getting a raw value from twl4030 seems to provide reliably
constant values (without it, the threshold between mic/nomic was
sometimes ~700 and sometimes ~300).

On the user-space side, headset detection is now fully working and I've
corrected the configuration for all the scenarios as well (currently,
only earpiece/speaker/headphones/headset are supported for output and
main mic/headset mic for input, that is, no bluetooth yet).

See:
https://gitorious.org/replicant/device_goldelico_gta04/commits/0bcd90da87361c7109d02e02950b5fb87674e10d

> The solution was to change the permissions of the needed files in sysfs
> (/sys/power/wake_[un]lock) [1] and to disable the process capabilities
> check in the kernel [2]. The later is actually a workarround and the
> process capabilities (i.e. CAP_BLOCK_SUSPEND) should be set correctly,
> which I think is done in Android's libcore [3]. Our version of libcore
> doesn't set CAP_BLOCK_SUSPEND, though. And as I don't want to fork
> libcore, I disabled the capabilities check in the kernel. As soon as we
> have a userspace, which sets correct capabilities, we can remove this
> workaround.

I agree and came to the same conclusion.

-- 
Paul Kocialkowski, Replicant developer

Replicant is a fully free Android distribution

Website:        http://www.replicant.us/
Wiki/Tracker:   http://redmine.replicant.us/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
URL: <http://lists.goldelico.com/pipermail/gta04-owner/attachments/20140511/abf35017/attachment.asc>


More information about the Gta04-owner mailing list