policy_hal: update custom policy for SCO volume against AOSP

Update custom policy for SCO volume against below AOSP update.

audiopolicy: keep BT SCO vol at 0 dB on VoIP

The BT SCO volume of VoIP is set as the value computed with the volume
index, while that of voice call keeps constant (0 dB). It causes the
output sound of VoIP being multiplied by a gain computed with the
volume index, then the sound hears different if the volume index has
been changed before. Therefore, the volume of VoIP on BT SCO should keep
at 0 dB as well.

Bug:78206701
commit: da7581eca3523a21142a3d259531c938f8dc717c
Change-Id: I888b2f7c0869902dd5e0adf77f711e7b9fd7e108

CRs-Fixed: 2703382
Change-Id: Ie4f8bd1ac5defdadf7501ba84026daa46cda842f
diff --git a/policy_hal/AudioPolicyManager.cpp b/policy_hal/AudioPolicyManager.cpp
index b290aec..3056a2c 100644
--- a/policy_hal/AudioPolicyManager.cpp
+++ b/policy_hal/AudioPolicyManager.cpp
@@ -1340,7 +1340,11 @@
     }
 
     float volumeDb = computeVolume(curves, volumeSource, index, deviceTypes);
-    if (outputDesc->isFixedVolume(deviceTypes)) {
+    if (outputDesc->isFixedVolume(deviceTypes)||
+            // Force VoIP volume to max for bluetooth SCO
+
+            ((isVoiceVolSrc || isBtScoVolSrc) &&
+                    isSingleDeviceType(deviceTypes, audio_is_bluetooth_out_sco_device))) {
         volumeDb = 0.0f;
     }