frameworks: av: fix bug in the volume management

which can cause volume levels to be applied twice. After applying volume
in the effect chain, the remaining volume needs to be converted back to
floating point before providing to mAudioMixer.

Bug: 15583440
Change-Id: I3c884f95b0fa9ad1b554285b069601c850c54776
Signed-off-by: Glenn Kasten <gkasten@google.com>
diff --git a/services/audioflinger/Threads.cpp b/services/audioflinger/Threads.cpp
old mode 100644
new mode 100755
index d08c966..c0daa08
--- a/services/audioflinger/Threads.cpp
+++ b/services/audioflinger/Threads.cpp
@@ -3428,6 +3428,9 @@
             if (chain != 0 && chain->setVolume_l(&vl, &vr)) {
                 // Do not ramp volume if volume is controlled by effect
                 param = AudioMixer::VOLUME;
+                // Update remaining floating point volume levels
+                vlf = (float)vl / (1 << 24);
+                vrf = (float)vr / (1 << 24);
                 track->mHasVolumeController = true;
             } else {
                 // force no volume ramp when volume controller was just disabled or removed