summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGiulio Cervera <giulio.cervera@gmail.com>2012-09-15 12:31:48 +0200
committerGiulio Cervera <giulio.cervera@gmail.com>2012-09-15 13:53:05 +0200
commit8953deaa2e439b053d58c700630966db2b344bc0 (patch)
tree8bf848444b0b262638898516266a95669b606217
parentfa119b4c70b213cae775ffa04bfe86703479e4fe (diff)
downloadandroid_hardware_qcom_audio-8953deaa2e439b053d58c700630966db2b344bc0.tar.gz
android_hardware_qcom_audio-8953deaa2e439b053d58c700630966db2b344bc0.tar.bz2
android_hardware_qcom_audio-8953deaa2e439b053d58c700630966db2b344bc0.zip
audio/msm: fix 7x30 and 8660 voice call volume
Change-Id: Ic47fe957eda23c202ef23fed0a88ffb6f2a95145
-rw-r--r--msm7x30/AudioPolicyManager.cpp4
-rw-r--r--msm8660/AudioPolicyManager.cpp4
2 files changed, 6 insertions, 2 deletions
diff --git a/msm7x30/AudioPolicyManager.cpp b/msm7x30/AudioPolicyManager.cpp
index 5b3c3f9c..1b206d49 100644
--- a/msm7x30/AudioPolicyManager.cpp
+++ b/msm7x30/AudioPolicyManager.cpp
@@ -694,7 +694,9 @@ status_t AudioPolicyManager::checkAndSetVolume(int stream, int index, audio_io_h
// offset value to reflect actual hardware volume that never reaches 0
// 1% corresponds roughly to first step in VOICE_CALL stream volume setting (see AudioService.java)
volume = 0.01 + 0.99 * volume;
- if (stream == AudioSystem::BLUETOOTH_SCO) {
+ if (stream == AudioSystem::VOICE_CALL) {
+ voiceVolume = (float)index/(float)mStreams[stream].mIndexMax;
+ } else if (stream == AudioSystem::BLUETOOTH_SCO) {
voiceVolume = 1.0;
}
if (voiceVolume >= 0 && output == mPrimaryOutput) {
diff --git a/msm8660/AudioPolicyManager.cpp b/msm8660/AudioPolicyManager.cpp
index 03a308b0..befe6e4c 100644
--- a/msm8660/AudioPolicyManager.cpp
+++ b/msm8660/AudioPolicyManager.cpp
@@ -704,7 +704,9 @@ status_t AudioPolicyManager::checkAndSetVolume(int stream, int index, audio_io_h
// offset value to reflect actual hardware volume that never reaches 0
// 1% corresponds roughly to first step in VOICE_CALL stream volume setting (see AudioService.java)
volume = 0.01 + 0.99 * volume;
- if (stream == AudioSystem::BLUETOOTH_SCO) {
+ if (stream == AudioSystem::VOICE_CALL) {
+ voiceVolume = (float)index/(float)mStreams[stream].mIndexMax;
+ } else if (stream == AudioSystem::BLUETOOTH_SCO) {
voiceVolume = 1.0;
}
if (voiceVolume >= 0 && output == mPrimaryOutput) {