summaryrefslogtreecommitdiffstats
path: root/libaudio
diff options
context:
space:
mode:
authorEric Laurent <elaurent@google.com>2011-02-10 13:53:12 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2011-02-10 13:53:12 -0800
commit999c3783bc18816cfa05506f319d382686c54290 (patch)
treed2bee1417767713dac50779430069fc7adb6e1e8 /libaudio
parent1802403a41a032f412b53f11da56278dcd4f6774 (diff)
parent2c9d4f757248cae8ac673930f6ed2126f4ec3362 (diff)
downloaddevice_samsung_crespo-999c3783bc18816cfa05506f319d382686c54290.zip
device_samsung_crespo-999c3783bc18816cfa05506f319d382686c54290.tar.gz
device_samsung_crespo-999c3783bc18816cfa05506f319d382686c54290.tar.bz2
am 2c9d4f75: am 303e0247: Merge "Fix issue 3436738." into gingerbread
* commit '2c9d4f757248cae8ac673930f6ed2126f4ec3362': Fix issue 3436738.
Diffstat (limited to 'libaudio')
-rw-r--r--libaudio/AudioHardware.cpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/libaudio/AudioHardware.cpp b/libaudio/AudioHardware.cpp
index e5c1e60..5261860 100644
--- a/libaudio/AudioHardware.cpp
+++ b/libaudio/AudioHardware.cpp
@@ -1238,16 +1238,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));
}