audio policy: fix BT SCO volume issue
SwAudioOutputDescriptor::setVolume has a provision to
duplicate stream BT SCO volume changes to stream VOICE_CALL.
But this was done wihtout updating the current set volume for the voice
call volume source causing further updates to voice call volume to be
ignored if they happened to have the same value as the stored value.
Bug: 293241158
Test: repro steps in bug
Change-Id: I978ff03ffd4ff07306176bb98f41388761305185
diff --git a/services/audiopolicy/managerdefault/AudioPolicyManager.cpp b/services/audiopolicy/managerdefault/AudioPolicyManager.cpp
index b17177d..8717083 100644
--- a/services/audiopolicy/managerdefault/AudioPolicyManager.cpp
+++ b/services/audiopolicy/managerdefault/AudioPolicyManager.cpp
@@ -7836,8 +7836,8 @@
volumeDb = 0.0f;
}
const bool muted = (index == 0) && (volumeDb != 0.0f);
- outputDesc->setVolume(
- volumeDb, muted, volumeSource, curves.getStreamTypes(), deviceTypes, delayMs, force);
+ outputDesc->setVolume(volumeDb, muted, volumeSource, curves.getStreamTypes(),
+ deviceTypes, delayMs, force, isVoiceVolSrc);
if (outputDesc == mPrimaryOutput && (isVoiceVolSrc || isBtScoVolSrc)) {
float voiceVolume;