summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorEric Laurent <elaurent@google.com>2010-08-11 05:20:11 -0700
committerEric Laurent <elaurent@google.com>2010-08-11 05:20:11 -0700
commit571d49c1c316f5e07b74ed7b5df6bdec7cbc1a14 (patch)
tree1d9ea67e8cb754435b6b9e262f90b52010287e9e /services
parentdef871da284aa51f129943a86d44ba9ee9d68d28 (diff)
downloadframeworks_av-571d49c1c316f5e07b74ed7b5df6bdec7cbc1a14.zip
frameworks_av-571d49c1c316f5e07b74ed7b5df6bdec7cbc1a14.tar.gz
frameworks_av-571d49c1c316f5e07b74ed7b5df6bdec7cbc1a14.tar.bz2
Fix issue 2909189: System property ro.audio.silent no longer mutes system.
Fixed regression introduced by commit 2a6b80bc65c4782b5a7168b300e1dc5ec9f617ee: master mute was not working if no effect chains were present on session 0. Change-Id: I66d107e045d159cb94d29c7476fa1e12d92f2ae7
Diffstat (limited to 'services')
-rw-r--r--services/audioflinger/AudioFlinger.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/services/audioflinger/AudioFlinger.cpp b/services/audioflinger/AudioFlinger.cpp
index 1c7faa4..6e7633e 100644
--- a/services/audioflinger/AudioFlinger.cpp
+++ b/services/audioflinger/AudioFlinger.cpp
@@ -1675,6 +1675,9 @@ uint32_t AudioFlinger::MixerThread::prepareTracks_l(const SortedVector< wp<Track
float masterVolume = mMasterVolume;
bool masterMute = mMasterMute;
+ if (masterMute) {
+ masterVolume = 0;
+ }
#ifdef LVMX
bool tracksConnectedChanged = false;
bool stateChanged = false;
@@ -1696,10 +1699,7 @@ uint32_t AudioFlinger::MixerThread::prepareTracks_l(const SortedVector< wp<Track
// Delegate master volume control to effect in output mix effect chain if needed
sp<EffectChain> chain = getEffectChain_l(AudioSystem::SESSION_OUTPUT_MIX);
if (chain != 0) {
- uint32_t v = 0;
- if (!masterMute) {
- v = (uint32_t)(masterVolume * (1 << 24));
- }
+ uint32_t v = (uint32_t)(masterVolume * (1 << 24));
chain->setVolume_l(&v, &v);
masterVolume = (float)((v + (1 << 23)) >> 24);
chain.clear();