diff options
author | Ralph Nathan <ralphnathan@google.com> | 2015-10-09 14:39:00 -0700 |
---|---|---|
committer | Steve Kondik <steve@cyngn.com> | 2015-11-07 01:57:10 -0800 |
commit | 45c06ec4ffad8f5a602db37b28537267f687c3ef (patch) | |
tree | 34819973fbca5bbb16ecbcb60702347b8e2de6a5 | |
parent | d831e2ea5e74c06bd6fb9e8b61d710f466a507cc (diff) | |
download | frameworks_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
-rw-r--r-- | services/audiopolicy/common/managerdefinitions/src/StreamDescriptor.cpp | 5 |
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 |