summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Bateman <jetison.24@gmail.com>2012-03-29 22:35:47 -0500
committerrmcc@arcee-kang1 <cyanogenmod@cerqueira.org>2012-05-11 09:58:50 +0100
commit95844c3271a0423c1ea86614a5a568279c7eb60d (patch)
tree10c2b432c8b9f0bfb7acef42c5a17105a7e6f61d
parent4749c8d0721afdeca8a843eb018a0e610d6e420b (diff)
downloaddevice_samsung_aries-common-95844c3271a0423c1ea86614a5a568279c7eb60d.zip
device_samsung_aries-common-95844c3271a0423c1ea86614a5a568279c7eb60d.tar.gz
device_samsung_aries-common-95844c3271a0423c1ea86614a5a568279c7eb60d.tar.bz2
aries-common: Fix "tunnel voice" bug for Vibrant, possibly others.
Problem: During incoming calls, some users sound very echoey to the caller. Hypothesis: setCallClockSync() is being called even entering MODE_RINGTONE, when it makes sense that it should only be called when actually entering the call itself, this also supports why it doesn't happen on outgoing calls, i.e. instantly entering the call and activating the call clock sync rather than activating it at the ringtone. Solution: Restrict setCallClockSync() to only fire when prevMode != IN_CALL && mMode == IN_CALL. Change-Id: Ie6c923846e98bb8b7e42520b831dbaf7f671d4d1
-rw-r--r--libaudio/AudioHardware.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/libaudio/AudioHardware.cpp b/libaudio/AudioHardware.cpp
index 24f1202..9f04089 100644
--- a/libaudio/AudioHardware.cpp
+++ b/libaudio/AudioHardware.cpp
@@ -371,8 +371,8 @@ status_t AudioHardware::setMode(int mode)
status = AudioHardwareBase::setMode(mode);
LOGV("setMode() : new %d, old %d", mMode, prevMode);
if (status == NO_ERROR) {
- // activate call clock in radio when entering in call or ringtone mode
- if (prevMode == AudioSystem::MODE_NORMAL)
+ // activate call clock in radio when entering in call mode
+ if (mMode == AudioSystem::MODE_IN_CALL)
{
if ((!mActivatedCP) && (mSecRilLibHandle) && (connectRILDIfRequired() == OK)) {
setCallClockSync(mRilClient, SOUND_CLOCK_START);