summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorJean-Michel Trivi <jmtrivi@google.com>2011-02-27 16:41:21 -0800
committerJean-Michel Trivi <jmtrivi@google.com>2011-02-27 16:41:21 -0800
commit043b22dbe3b98a8fdd6b0ea77df4089ff44b6539 (patch)
tree89c89d943b159a8f9d6c1c98379ff54f42767337 /services
parent60181854194007eef9471c2774a9912ce8c42cfa (diff)
downloadframeworks_av-043b22dbe3b98a8fdd6b0ea77df4089ff44b6539.zip
frameworks_av-043b22dbe3b98a8fdd6b0ea77df4089ff44b6539.tar.gz
frameworks_av-043b22dbe3b98a8fdd6b0ea77df4089ff44b6539.tar.bz2
Fix bug 3376700 Volume too loud at lowest setting
Change volume attenuation curve to provide more attenuation at low volume settings, and finer steps at high volume. See bug entry for link to doc with curve values. Change-Id: I750548b2161a4c550ef982ba793156e4518119e8
Diffstat (limited to 'services')
-rw-r--r--services/audioflinger/AudioPolicyManagerBase.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/services/audioflinger/AudioPolicyManagerBase.cpp b/services/audioflinger/AudioPolicyManagerBase.cpp
index 3082d45..bfc80db 100644
--- a/services/audioflinger/AudioPolicyManagerBase.cpp
+++ b/services/audioflinger/AudioPolicyManagerBase.cpp
@@ -1889,7 +1889,15 @@ void AudioPolicyManagerBase::initializeVolumeCurves() {
mStreams[i].mVolDbAtt[StreamDescriptor::VOLMAX] = 0.0f;
}
- // TODO add modifications for music to have finer steps below knee1 and above knee2
+ // Modification for music: more attenuation for lower volumes, finer steps at high volumes
+ mStreams[AudioSystem::MUSIC].mVolIndex[StreamDescriptor::VOLMIN] = 1;
+ mStreams[AudioSystem::MUSIC].mVolDbAtt[StreamDescriptor::VOLMIN] = -58.0f;
+ mStreams[AudioSystem::MUSIC].mVolIndex[StreamDescriptor::VOLKNEE1] = 20;
+ mStreams[AudioSystem::MUSIC].mVolDbAtt[StreamDescriptor::VOLKNEE1] = -40.0f;
+ mStreams[AudioSystem::MUSIC].mVolIndex[StreamDescriptor::VOLKNEE2] = 60;
+ mStreams[AudioSystem::MUSIC].mVolDbAtt[StreamDescriptor::VOLKNEE2] = -17.0f;
+ mStreams[AudioSystem::MUSIC].mVolIndex[StreamDescriptor::VOLMAX] = 100;
+ mStreams[AudioSystem::MUSIC].mVolDbAtt[StreamDescriptor::VOLMAX] = 0.0f;
}
float AudioPolicyManagerBase::computeVolume(int stream, int index, audio_io_handle_t output, uint32_t device)