Fix the wrong volume setting on HFP call am: 122b241e6b
am: 005e48c599
Change-Id: I2be0c93bacc8d5cd57c50673d6175ba488447a43
diff --git a/hal/audio_extn/hfp.c b/hal/audio_extn/hfp.c
index ebc0fd2..0ac01f1 100644
--- a/hal/audio_extn/hfp.c
+++ b/hal/audio_extn/hfp.c
@@ -79,6 +79,8 @@
ALOGV("%s: entry", __func__);
ALOGD("%s: (%f)\n", __func__, value);
+ hfpmod.hfp_volume = value;
+
if (value < 0.0) {
ALOGW("%s: (%f) Under 0.0, assuming 0.0\n", __func__, value);
value = 0.0;
@@ -87,7 +89,6 @@
ALOGW("%s: Volume brought with in range (%f)\n", __func__, value);
}
vol = lrint((value * 0x2000) + 0.5);
- hfpmod.hfp_volume = value;
if (!hfpmod.is_hfp_running) {
ALOGV("%s: HFP not active, ignoring set_hfp_volume call", __func__);