Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 571ef96c authored by Eric Laurent's avatar Eric Laurent
Browse files

audio policy: remove log spam for voice and sco volumes

Do not return an error in checkAndSetVolume() when SCO volume is modified
while SCO is not active as AudioService will always set both voice call
and SCO volumes at the same time regardless of SCO activity.

Test: Use call screening to check downlink mute.
Change-Id: I7501b28266ec4d591378d7bc4453bb5840e03af1
parent 04698a34
Loading
Loading
Loading
Loading
+3 −1
Original line number Original line Diff line number Diff line
@@ -6157,7 +6157,9 @@ status_t AudioPolicyManager::checkAndSetVolume(IVolumeCurves &curves,
             (isBtScoVolSrc && forceUseForComm != AUDIO_POLICY_FORCE_BT_SCO))) {
             (isBtScoVolSrc && forceUseForComm != AUDIO_POLICY_FORCE_BT_SCO))) {
        ALOGV("%s cannot set volume group %d volume with force use = %d for comm", __func__,
        ALOGV("%s cannot set volume group %d volume with force use = %d for comm", __func__,
             volumeSource, forceUseForComm);
             volumeSource, forceUseForComm);
        return INVALID_OPERATION;
        // Do not return an error here as AudioService will always set both voice call
        // and bluetooth SCO volumes due to stream aliasing.
        return NO_ERROR;
    }
    }
    if (deviceTypes.empty()) {
    if (deviceTypes.empty()) {
        deviceTypes = outputDesc->devices().types();
        deviceTypes = outputDesc->devices().types();