Increase kFastTrackMultiplier from 1 to 2

Change-Id: I158f147295eebcea96e4047d7618069bc48bdd7d
update offloaded audio track sampling rate

AudioPlayer must read the sampling rate from offloaded audio sinks
whenever a new time position is computed as the decoder can update
the sampling rate on the fly.

Change-Id: I997e5248cfd4017aeceb4e11689324ded2a5bc88
AudioTrack: fix position callback after restore

When restoring an AudioTrack, the next position callback point
should not be modified and set ahead of current buffer head.
Otherwise, as frames are dropped, the new position is never reached
and an application relying on position callbacks to reload the buffer
would be stalled.

Bug: 11868603.
Change-Id: I93b2a311642a0c89944b78bcc0482d4ceed98ae4
audioflinger: check for condition before waiting

AsyncCallbackThread must check for any condition that
has already been satisfied before waiting.

Bug: 11824817
Change-Id: Ic8c2090d521ecd6a30b76ee75635258d35eb1eff
libstagefright: Delay release of wakelock in TimedEventQueue

Delay release of wakelock in the TimedEventQueue to
after an event has been processed.
This ensures AP shutdown does not happen while an event
is ready but hasn't been processed yet.

Bug: 11976087.

Change-Id: I71a5f3ac4a57e1d05dd5d9ab5c6f91ed7bb64c87
Merge remote-tracking branch 'kitkatpurity/kitkat' into HEAD