diff options
author | Eric Laurent <elaurent@google.com> | 2011-03-18 14:58:51 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2011-03-18 14:58:51 -0700 |
commit | 50e4ee89c4876de0e5ad6a9bd2486cb63d38edd4 (patch) | |
tree | 0d81698b99ce9c6f4b8553a5d51324e7dbc0ebaf /libaudio | |
parent | 0cadb586ddf99030a953ec63b5eb3837c64b8352 (diff) | |
parent | f127e46304c21af95f3e17e70db4581b40d46e02 (diff) | |
download | device_samsung_crespo-50e4ee89c4876de0e5ad6a9bd2486cb63d38edd4.zip device_samsung_crespo-50e4ee89c4876de0e5ad6a9bd2486cb63d38edd4.tar.gz device_samsung_crespo-50e4ee89c4876de0e5ad6a9bd2486cb63d38edd4.tar.bz2 |
am f127e463: am 2aedd44b: Merge "Fix issue 4126225: setMicMute() execution time" into gingerbread
* commit 'f127e46304c21af95f3e17e70db4581b40d46e02':
Fix issue 4126225: setMicMute() execution time
Diffstat (limited to 'libaudio')
-rw-r--r-- | libaudio/AudioHardware.cpp | 29 |
1 files changed, 20 insertions, 9 deletions
diff --git a/libaudio/AudioHardware.cpp b/libaudio/AudioHardware.cpp index 865ca05..eee5f17 100644 --- a/libaudio/AudioHardware.cpp +++ b/libaudio/AudioHardware.cpp @@ -1126,12 +1126,16 @@ status_t AudioHardware::AudioStreamOutALSA::standby() { if (mHardware == NULL) return NO_INIT; - AutoMutex lock(mLock); + mSleepReq = true; + { + AutoMutex lock(mLock); + mSleepReq = false; - { // scope for the AudioHardware lock - AutoMutex hwLock(mHardware->lock()); + { // scope for the AudioHardware lock + AutoMutex hwLock(mHardware->lock()); - doStandby_l(); + doStandby_l(); + } } return NO_ERROR; @@ -1243,9 +1247,10 @@ status_t AudioHardware::AudioStreamOutALSA::setParameters(const String8& keyValu if (mHardware == NULL) return NO_INIT; + mSleepReq = true; { AutoMutex lock(mLock); - + mSleepReq = false; if (param.getInt(String8(AudioParameter::keyRouting), device) == NO_ERROR) { if (device != 0) { @@ -1493,12 +1498,16 @@ status_t AudioHardware::AudioStreamInALSA::standby() { if (mHardware == NULL) return NO_INIT; - AutoMutex lock(mLock); + mSleepReq = true; + { + AutoMutex lock(mLock); + mSleepReq = false; - { // scope for AudioHardware lock - AutoMutex hwLock(mHardware->lock()); + { // scope for AudioHardware lock + AutoMutex hwLock(mHardware->lock()); - doStandby_l(); + doStandby_l(); + } } return NO_ERROR; } @@ -1630,8 +1639,10 @@ status_t AudioHardware::AudioStreamInALSA::setParameters(const String8& keyValue if (mHardware == NULL) return NO_INIT; + mSleepReq = true; { AutoMutex lock(mLock); + mSleepReq = false; if (param.getInt(String8(AudioParameter::keyInputSource), value) == NO_ERROR) { AutoMutex hwLock(mHardware->lock()); |