summaryrefslogtreecommitdiffstats
path: root/services/audioflinger/Threads.cpp
diff options
context:
space:
mode:
authorAndy Hung <hunga@google.com>2015-05-19 23:42:25 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-05-19 23:42:25 +0000
commit8ef66c6662002279a606df70f41651491a349126 (patch)
tree9c49cfce7c271b0e7ff8ba0c2f24c6adb447bfdc /services/audioflinger/Threads.cpp
parent9f7eddb757d84640786174e8ce78a3221e829cd4 (diff)
parent1f439e1cf16a29347288ba9ddd06c0b6d086a145 (diff)
downloadframeworks_av-8ef66c6662002279a606df70f41651491a349126.zip
frameworks_av-8ef66c6662002279a606df70f41651491a349126.tar.gz
frameworks_av-8ef66c6662002279a606df70f41651491a349126.tar.bz2
Merge "Update FastTrack channel conversion check" into mnc-dev
Diffstat (limited to 'services/audioflinger/Threads.cpp')
-rw-r--r--services/audioflinger/Threads.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/services/audioflinger/Threads.cpp b/services/audioflinger/Threads.cpp
index 40bf349..93ba74d 100644
--- a/services/audioflinger/Threads.cpp
+++ b/services/audioflinger/Threads.cpp
@@ -1585,10 +1585,12 @@ sp<AudioFlinger::PlaybackThread::Track> AudioFlinger::PlaybackThread::createTrac
) &&
// PCM data
audio_is_linear_pcm(format) &&
- // identical channel mask to sink, or mono in and stereo sink
+ // TODO: extract as a data library function that checks that a computationally
+ // expensive downmixer is not required: isFastOutputChannelConversion()
(channelMask == mChannelMask ||
- (channelMask == AUDIO_CHANNEL_OUT_MONO &&
- mChannelMask == AUDIO_CHANNEL_OUT_STEREO)) &&
+ mChannelMask != AUDIO_CHANNEL_OUT_STEREO ||
+ (channelMask == AUDIO_CHANNEL_OUT_MONO
+ /* && mChannelMask == AUDIO_CHANNEL_OUT_STEREO */)) &&
// hardware sample rate
(sampleRate == mSampleRate) &&
// normal mixer has an associated fast mixer