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

Commit 5bfdfd1e authored by Eric Laurent's avatar Eric Laurent Committed by Android Git Automerger
Browse files

am 969357e3: am 223995dc: Fix issue 4335692: HDMI media volume

* commit '969357e31c93e168e7a4cb3b41c33a6ec26f4a26':
  Fix issue 4335692: HDMI media volume
parents 7e0c6792 d9046e0a
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -1911,6 +1911,13 @@ float AudioPolicyManagerBase::computeVolume(int stream, int index, audio_io_hand
        device = outputDesc->device();
    }

    // if volume is not 0 (not muted), force media volume to max on digital output
    if (stream == AudioSystem::MUSIC &&
        index != mStreams[stream].mIndexMin &&
        device == AudioSystem::DEVICE_OUT_AUX_DIGITAL) {
        return 1.0;
    }

    volume = volIndexToAmpl(device, streamDesc, index);

    // if a headset is connected, apply the following rules to ring tones and notifications