audioflinger: Fix to release wakelock after closeoutput

-In DirectTrack destructor, closeOutput is called after
releaseWakelock is done. This may sometimes result in
power collapse happening even before actual close
sequence of Audio path is completed and will result
in high power consumption.
-Release wakelock only after closeOutput is done
in directtrack destructor.

(cherry picked from commit fb48938f73e335ac66c83e6adba96431e050ec94)

Change-Id: Ib8d05a38f28d7e2f0bdf9e420e5db526cf874bc6
CRs-Fixed: 430786
Merge "audioflinger: Fix to release wakelock after closeoutput" into jellybean
Merge remote-tracking branch 'cyanogen/jellybean' into jellybean
av: add support for ST-ERICSSON audio

- add inputClientId
- Add support for update of audio output latency

Change-Id: Ia56a051b77343fc8b30e090c0530ebb75ec6b164
av:  add support for ST-ERICSSON media

- ST-Ericsson audio support for multimedia
- Add support for ST-Ericsson native pixel formats and conversion
- ST-Ericsson video support for multimedia

ported from
https://github.com/CyanogenMod/android_frameworks_base/commit/a22b34c43efb805e5ec10230b1b089c781366120
https://github.com/CyanogenMod/android_frameworks_base/commit/95961de8a87534381756eefcbaa6fce8e9047467

Change-Id: I2b0dd8c4ab6623ef0dbad43912dbc3e6c41255fd
Merge remote-tracking branch 'cyanogen/jellybean' into jellybean
Update scene modes for 4.1 tamsui camera blobs

Change-Id: I93aa07f6f7e1cdd54c337f7fd6d68c7d250bb44e
Merge remote-tracking branch 'cyanogen/jellybean' into jellybean
libcamera_client: Add missing camera keys required by Samsung STE devices

Change-Id: I88281ce765326d43d97e82507c37274da135545f
Merge remote-tracking branch 'cyanogen/jellybean' into jellybean
av: Missing changes for STE OMX multimedia

Change-Id: Id5064e2785e43969372d699bea155d5b88668ebe
Merge remote-tracking branch 'cyanogen/jellybean' into jellybean
camera: Fix preview on SEMC msm7x30 devices

Signed-off-by: Michael Bestas <mikeioannina@gmail.com>

Change-Id: I79039636ae188131b491c90cfe7894ff32d8ef2a
Merge remote-tracking branch 'cyanogen/jellybean' into jellybean