Fix record memory buffer allocation for legacy upmix/downmix
Bug: 22173057
Change-Id: I8f5056ff5a1252c71a3d3b354440551bcd9fd466
diff --git a/services/audioflinger/Threads.cpp b/services/audioflinger/Threads.cpp
index c360051..43dd53c 100644
--- a/services/audioflinger/Threads.cpp
+++ b/services/audioflinger/Threads.cpp
@@ -6651,7 +6651,7 @@
if (mResampler != NULL) {
mBufFrameSize = max(mSrcChannelCount, FCC_2)
* audio_bytes_per_sample(AUDIO_FORMAT_PCM_FLOAT);
- } else if ((mIsLegacyUpmix || mIsLegacyDownmix) && mDstFormat != AUDIO_FORMAT_PCM_FLOAT) {
+ } else if (mIsLegacyUpmix || mIsLegacyDownmix) { // legacy modes always float
mBufFrameSize = mDstChannelCount * audio_bytes_per_sample(AUDIO_FORMAT_PCM_FLOAT);
} else if (mSrcChannelMask != mDstChannelMask && mDstFormat != mSrcFormat) {
mBufFrameSize = mDstChannelCount * audio_bytes_per_sample(mSrcFormat);