summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMisael Lopez Cruz2013-11-11 16:55:34 -0600
committerMisael Lopez Cruz2013-11-11 18:09:59 -0600
commitca99e510fdc0e704f9f0d1d9a6b29f9530c99def (patch)
treec58476efde1e13a0d4eb62a91237c3a738be7205
parent861c79838ff3b85ac4ab700d9e1728d458327429 (diff)
downloaddevice-ti-common-open-ca99e510fdc0e704f9f0d1d9a6b29f9530c99def.tar.gz
device-ti-common-open-ca99e510fdc0e704f9f0d1d9a6b29f9530c99def.tar.xz
device-ti-common-open-ca99e510fdc0e704f9f0d1d9a6b29f9530c99def.zip
audio: policy: Don't force volume to max for BT SCO
Do not force the volume to max for bluetooth SCO since now the roles are inverted and the Android device is on the headset side. Change-Id: Idbf0c0e29a57cb21ff52fe593629de5205887ae3 Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
-rw-r--r--audio/policy/multizone/AudioPolicyManager.cpp10
1 files changed, 1 insertions, 9 deletions
diff --git a/audio/policy/multizone/AudioPolicyManager.cpp b/audio/policy/multizone/AudioPolicyManager.cpp
index 4ad097f..b5de6f3 100644
--- a/audio/policy/multizone/AudioPolicyManager.cpp
+++ b/audio/policy/multizone/AudioPolicyManager.cpp
@@ -2783,15 +2783,7 @@ status_t AudioPolicyManager::setStreamVolume(int stream,
2783 2783
2784 if (stream == AudioSystem::VOICE_CALL || 2784 if (stream == AudioSystem::VOICE_CALL ||
2785 stream == AudioSystem::BLUETOOTH_SCO) { 2785 stream == AudioSystem::BLUETOOTH_SCO) {
2786 // Force voice volume to max for bluetooth SCO as volume is managed by 2786 float voiceVolume = (float)index/(float)mStreams[stream].mIndexMax;
2787 // the headset
2788 float voiceVolume;
2789 if (stream == AudioSystem::VOICE_CALL) {
2790 voiceVolume = (float)index/(float)mStreams[stream].mIndexMax;
2791 } else {
2792 voiceVolume = 1.0;
2793 }
2794
2795 if (voiceVolume != mLastVoiceVolume && output == mPrimaryOutput) { 2787 if (voiceVolume != mLastVoiceVolume && output == mPrimaryOutput) {
2796 mpClientInterface->setVoiceVolume(voiceVolume, delayMs); 2788 mpClientInterface->setVoiceVolume(voiceVolume, delayMs);
2797 mLastVoiceVolume = voiceVolume; 2789 mLastVoiceVolume = voiceVolume;