From 05f67ffe45268807d2782a9d1c0cf212956fa925 Mon Sep 17 00:00:00 2001 From: vivek mehta Date: Tue, 24 Nov 2015 00:30:39 -0800 Subject: libaudioflinger: avoid s/w effect processing in case of Direct PCM - Check Direct PCM usecase with Offload - do not process s/w effect when direct PCM is enabled Change-Id: I2eb843b17558e60cf36daff0c5fbdf50dccf99ca --- services/audioflinger/Threads.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'services/audioflinger/Threads.cpp') diff --git a/services/audioflinger/Threads.cpp b/services/audioflinger/Threads.cpp index bc7b7dc..71673c3 100644 --- a/services/audioflinger/Threads.cpp +++ b/services/audioflinger/Threads.cpp @@ -2914,7 +2914,8 @@ bool AudioFlinger::PlaybackThread::threadLoop() } // only process effects if we're going to write - if (mSleepTimeUs == 0 && mType != OFFLOAD) { + if (mSleepTimeUs == 0 && mType != OFFLOAD && + !(mType == DIRECT && mIsDirectPcm)) { for (size_t i = 0; i < effectChains.size(); i ++) { effectChains[i]->process_l(); } @@ -2924,7 +2925,7 @@ bool AudioFlinger::PlaybackThread::threadLoop() // was read from audio track: process only updates effect state // and thus does have to be synchronized with audio writes but may have // to be called while waiting for async write callback - if (mType == OFFLOAD) { + if ((mType == OFFLOAD) || (mType == DIRECT && mIsDirectPcm)) { for (size_t i = 0; i < effectChains.size(); i ++) { effectChains[i]->process_l(); } -- cgit v1.1