summaryrefslogtreecommitdiffstats
path: root/services/audiopolicy
diff options
context:
space:
mode:
authorRalph Nathan <ralphnathan@google.com>2015-10-09 14:39:00 -0700
committerSteve Kondik <steve@cyngn.com>2015-11-07 01:57:10 -0800
commit45c06ec4ffad8f5a602db37b28537267f687c3ef (patch)
tree34819973fbca5bbb16ecbcb60702347b8e2de6a5 /services/audiopolicy
parentd831e2ea5e74c06bd6fb9e8b61d710f466a507cc (diff)
downloadframeworks_av-45c06ec4ffad8f5a602db37b28537267f687c3ef.zip
frameworks_av-45c06ec4ffad8f5a602db37b28537267f687c3ef.tar.gz
frameworks_av-45c06ec4ffad8f5a602db37b28537267f687c3ef.tar.bz2
audio: Change the default init value for StreamDescriptor
Currently, audio doesn't play on Brillo because the policy manager's default value for all streams is set to 0. In Android, this value is changed by calls from AudioService.java. If we set the default value to 1 in Brillo, then even if there are no calls, we will have audio. BUG=none TEST=manual Change-Id: I1418c9ecfb4f1c81c9c0946eee11deed3c65b358
Diffstat (limited to 'services/audiopolicy')
-rw-r--r--services/audiopolicy/common/managerdefinitions/src/StreamDescriptor.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/services/audiopolicy/common/managerdefinitions/src/StreamDescriptor.cpp b/services/audiopolicy/common/managerdefinitions/src/StreamDescriptor.cpp
index b682e2c..4ca27c2 100644
--- a/services/audiopolicy/common/managerdefinitions/src/StreamDescriptor.cpp
+++ b/services/audiopolicy/common/managerdefinitions/src/StreamDescriptor.cpp
@@ -35,7 +35,10 @@ namespace android {
StreamDescriptor::StreamDescriptor()
: mIndexMin(0), mIndexMax(1), mCanBeMuted(true)
{
- mIndexCur.add(AUDIO_DEVICE_OUT_DEFAULT, 0);
+ // Initialize the current stream's index to mIndexMax so volume isn't 0 in
+ // cases where the Java layer doesn't call into the audio policy service to
+ // set the default volume.
+ mIndexCur.add(AUDIO_DEVICE_OUT_DEFAULT, mIndexMax);
}
int StreamDescriptor::getVolumeIndex(audio_devices_t device) const