summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorEric Laurent <elaurent@google.com>2011-04-25 13:34:51 -0700
committerEric Laurent <elaurent@google.com>2011-04-25 13:34:51 -0700
commit223995dcf28aca2399258951a59559a7ae318ceb (patch)
tree6c3e4b195c34ae4c5e164cde6432e7284c3cf698 /services
parentc84362a72ab958c4ffe34c16d8cf76883d48f0e8 (diff)
downloadframeworks_base-223995dcf28aca2399258951a59559a7ae318ceb.zip
frameworks_base-223995dcf28aca2399258951a59559a7ae318ceb.tar.gz
frameworks_base-223995dcf28aca2399258951a59559a7ae318ceb.tar.bz2
Fix issue 4335692: HDMI media volume
Forced music stream volume to max when not muted and output device is HDMI. Change-Id: Ibd287cea8ae1d3f36fea6651a113bd5cf2dbad13
Diffstat (limited to 'services')
-rw-r--r--services/audioflinger/AudioPolicyManagerBase.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/services/audioflinger/AudioPolicyManagerBase.cpp b/services/audioflinger/AudioPolicyManagerBase.cpp
index f653dc5..f5e7343 100644
--- a/services/audioflinger/AudioPolicyManagerBase.cpp
+++ b/services/audioflinger/AudioPolicyManagerBase.cpp
@@ -1911,6 +1911,13 @@ float AudioPolicyManagerBase::computeVolume(int stream, int index, audio_io_hand
device = outputDesc->device();
}
+ // if volume is not 0 (not muted), force media volume to max on digital output
+ if (stream == AudioSystem::MUSIC &&
+ index != mStreams[stream].mIndexMin &&
+ device == AudioSystem::DEVICE_OUT_AUX_DIGITAL) {
+ return 1.0;
+ }
+
volume = volIndexToAmpl(device, streamDesc, index);
// if a headset is connected, apply the following rules to ring tones and notifications