diff options
author | Eric Laurent <elaurent@google.com> | 2011-02-09 14:39:11 -0800 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2011-02-09 14:39:11 -0800 |
commit | 2c9d4f757248cae8ac673930f6ed2126f4ec3362 (patch) | |
tree | a2dc161a0a5a2b648e452d46e2315bd4cf5cf976 /libaudio | |
parent | 3828e0b38b6cb6070f409d8a79e65450e1931bdf (diff) | |
parent | 303e0247b2248a5e1bbecfeb9cf8ce944ef03146 (diff) | |
download | device_samsung_crespo-2c9d4f757248cae8ac673930f6ed2126f4ec3362.zip device_samsung_crespo-2c9d4f757248cae8ac673930f6ed2126f4ec3362.tar.gz device_samsung_crespo-2c9d4f757248cae8ac673930f6ed2126f4ec3362.tar.bz2 |
am 303e0247: Merge "Fix issue 3436738." into gingerbread
* commit '303e0247b2248a5e1bbecfeb9cf8ce944ef03146':
Fix issue 3436738.
Diffstat (limited to 'libaudio')
-rw-r--r-- | libaudio/AudioHardware.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/libaudio/AudioHardware.cpp b/libaudio/AudioHardware.cpp index 99c38fa..45f0a2d 100644 --- a/libaudio/AudioHardware.cpp +++ b/libaudio/AudioHardware.cpp @@ -1241,16 +1241,18 @@ status_t AudioHardware::AudioStreamOutALSA::setParameters(const String8& keyValu if (param.getInt(String8(AudioParameter::keyRouting), device) == NO_ERROR) { - AutoMutex hwLock(mHardware->lock()); + if (device != 0) { + AutoMutex hwLock(mHardware->lock()); - if (mDevices != (uint32_t)device) { - mDevices = (uint32_t)device; - if (mHardware->mode() != AudioSystem::MODE_IN_CALL) { - doStandby_l(); + if (mDevices != (uint32_t)device) { + mDevices = (uint32_t)device; + if (mHardware->mode() != AudioSystem::MODE_IN_CALL) { + doStandby_l(); + } + } + if (mHardware->mode() == AudioSystem::MODE_IN_CALL) { + mHardware->setIncallPath_l(device); } - } - if (mHardware->mode() == AudioSystem::MODE_IN_CALL) { - mHardware->setIncallPath_l(device); } param.remove(String8(AudioParameter::keyRouting)); } |