summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWeiyin Jiang <wjiang@codeaurora.org>2016-02-26 18:07:49 +0800
committerSteve Kondik <steve@cyngn.com>2016-04-03 00:29:53 -0700
commite5c901e16fdb7ed1d37bd7aa1232973588692a91 (patch)
tree9b2bb3f802b267a68ee4538f0d15add4a95b12cb
parentaf76b10d0bce63c7e5896ddbe6fe897ed0110186 (diff)
downloadframeworks_av-e5c901e16fdb7ed1d37bd7aa1232973588692a91.zip
frameworks_av-e5c901e16fdb7ed1d37bd7aa1232973588692a91.tar.gz
frameworks_av-e5c901e16fdb7ed1d37bd7aa1232973588692a91.tar.bz2
audio: use offload standby delay for direct pcm
Default standby delay for legacy direct is too aggressive for track offloaded use case. Using offload standby delay instead, which allows sufficient time for track transition before standby the output. CRs-Fixed: 982822 Change-Id: Ifd0e39c5b3fe4a4af9f444dbbad21ef1e1a5edfa
-rw-r--r--services/audioflinger/Threads.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/services/audioflinger/Threads.cpp b/services/audioflinger/Threads.cpp
index 6f223af..e1e4980 100644
--- a/services/audioflinger/Threads.cpp
+++ b/services/audioflinger/Threads.cpp
@@ -4987,6 +4987,8 @@ void AudioFlinger::DirectOutputThread::cacheParameters_l()
mStandbyDelayNs = 0;
} else if ((mType == OFFLOAD) && !audio_is_linear_pcm(mFormat)) {
mStandbyDelayNs = kOffloadStandbyDelayNs;
+ } else if (mType == DIRECT && mIsDirectPcm) {
+ mStandbyDelayNs = kOffloadStandbyDelayNs;
} else {
mStandbyDelayNs = microseconds(mActiveSleepTimeUs*2);
}