The refactoring of the audio thread in this commit
-----------------------------------------------
commit 5857c44017
Author: Michael Sevakis <jethead71@rockbox.org>
Date: Fri May 31 02:41:02 2013 -0400
Refactor audio thread to run both recording and playback.
-----------------------------------------------
moved pcm_init() next to dsp_init() in apps/main.c:init().
Before that pcm_init() was called by audio_init().
Unfortunately the maemo init code didn't properly
wait until the maemo thread was fully initialized,
leading to dangling pointers when the code called
by pcm_init() tried to access maemo's variables.
Fix it by refactoring the "very fast shutdown" semaphore
to wait until maemo is initialized in any case.
This should also fix very rare rockbox crashes
on startup that I got once a year or so.
The new code has been tested by a script that
starts and kills rockbox after one second.
Change-Id: I464efce5f2b71ca869c72a5bc578555b8022e459