disable audio balance in voip call for mono channel

When modifying "Audio balance" to Right, the mMasterBalanceLeft
will be set to 0.0.  The action will cause no sound on earpiece
in voip calls.

For mono sound, we think the master audio balance should be disabled
when voip for earpiece.

Test: make
Bug: 275733423
Change-Id: I1ae010d7cd352bf7a9be251775d62c78fc15e1b0
Signed-off-by: zhangjincheng <zhangjincheng@xiaomi.com>
diff --git a/services/audioflinger/Threads.cpp b/services/audioflinger/Threads.cpp
index 661550a..d9fdc3e 100644
--- a/services/audioflinger/Threads.cpp
+++ b/services/audioflinger/Threads.cpp
@@ -6486,9 +6486,13 @@
         if (right > GAIN_FLOAT_UNITY) {
             right = GAIN_FLOAT_UNITY;
         }
-
-        left *= v * mMasterBalanceLeft; // DirectOutputThread balance applied as track volume
-        right *= v * mMasterBalanceRight;
+        left *= v;
+        right *= v;
+        if (mAudioFlinger->getMode() != AUDIO_MODE_IN_COMMUNICATION
+                || audio_channel_count_from_out_mask(mChannelMask) > 1) {
+            left *= mMasterBalanceLeft; // DirectOutputThread balance applied as track volume
+            right *= mMasterBalanceRight;
+        }
     }
 
     track->processMuteEvent_l(mAudioFlinger->getOrCreateAudioManager(),