policy_hal: remove VGS check for BT volume
-Currently voice volume is forced to MAX when VGS is set for BT.
But VGS parameter is not used anymore in BT stack so it never
set the value.
-Removed VGS check as this is deprecated and keep the behavior
same as default policy.
Change-Id: I69de60987835cc7bfbf26e6b89eb39447423fd9d
diff --git a/policy_hal/AudioPolicyManager.cpp b/policy_hal/AudioPolicyManager.cpp
index a6f0b0b..4501239 100644
--- a/policy_hal/AudioPolicyManager.cpp
+++ b/policy_hal/AudioPolicyManager.cpp
@@ -1076,19 +1076,11 @@
if (stream == AudioSystem::VOICE_CALL ||
stream == AudioSystem::BLUETOOTH_SCO) {
float voiceVolume;
-
- voiceVolume = (float)index/(float)mStreams[stream].mIndexMax;
-
- // Force voice volume to max when Vgs is set for bluetooth SCO as volume is managed by the headset
- if (stream == AudioSystem::BLUETOOTH_SCO) {
- String8 key ("bt_headset_vgs");
- mpClientInterface->getParameters(output,key);
- AudioParameter result(mpClientInterface->getParameters(0,key));
- int value;
- if (result.getInt(String8("isVGS"),value) == NO_ERROR) {
- ALOGV("Use BT-SCO Voice Volume");
- voiceVolume = 1.0;
- }
+ // Force voice volume to max for bluetooth SCO as volume is managed by the headset
+ if (stream == AudioSystem::VOICE_CALL) {
+ voiceVolume = (float)index/(float)mStreams[stream].mIndexMax;
+ } else {
+ voiceVolume = 1.0;
}
if (voiceVolume != mLastVoiceVolume && output == mPrimaryOutput) {