summaryrefslogtreecommitdiffstats
path: root/services/audiopolicy
diff options
context:
space:
mode:
authorAndy Hung <hunga@google.com>2015-06-11 22:52:12 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-06-11 22:52:12 +0000
commitbd1c3e36767d08813b912028e69a8b7fed315ea2 (patch)
tree3f17b24476b5ddd1d82d2be38b7a0d1765a7e9a7 /services/audiopolicy
parentad9ef61e770c0751a9983aa5c9844dfeb9ed665b (diff)
parent439e4ed408c21bd65711d279bd5251cef7e83440 (diff)
downloadframeworks_av-bd1c3e36767d08813b912028e69a8b7fed315ea2.zip
frameworks_av-bd1c3e36767d08813b912028e69a8b7fed315ea2.tar.gz
frameworks_av-bd1c3e36767d08813b912028e69a8b7fed315ea2.tar.bz2
Merge "audiopolicy: use deep buffer output by default for music streams" into mnc-dev
Diffstat (limited to 'services/audiopolicy')
-rw-r--r--services/audiopolicy/managerdefault/AudioPolicyManager.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/services/audiopolicy/managerdefault/AudioPolicyManager.cpp b/services/audiopolicy/managerdefault/AudioPolicyManager.cpp
index 0adaac9..6befb8d 100644
--- a/services/audiopolicy/managerdefault/AudioPolicyManager.cpp
+++ b/services/audiopolicy/managerdefault/AudioPolicyManager.cpp
@@ -789,6 +789,11 @@ audio_io_handle_t AudioPolicyManager::getOutputForDevice(
// only allow deep buffering for music stream type
if (stream != AUDIO_STREAM_MUSIC) {
flags = (audio_output_flags_t)(flags &~AUDIO_OUTPUT_FLAG_DEEP_BUFFER);
+ } else if (/* stream == AUDIO_STREAM_MUSIC && */
+ flags == AUDIO_OUTPUT_FLAG_NONE &&
+ property_get_bool("audio.deep_buffer.media", false /* default_value */)) {
+ // use DEEP_BUFFER as default output for music stream type
+ flags = (audio_output_flags_t)AUDIO_OUTPUT_FLAG_DEEP_BUFFER;
}
if (stream == AUDIO_STREAM_TTS) {
flags = AUDIO_OUTPUT_FLAG_TTS;