summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--hal/Android.mk4
-rw-r--r--hal/voice.c4
-rw-r--r--hal/voice_extn/compress_voip.c4
3 files changed, 8 insertions, 4 deletions
diff --git a/hal/Android.mk b/hal/Android.mk
index c7d1a8a2..e5125f27 100644
--- a/hal/Android.mk
+++ b/hal/Android.mk
@@ -171,6 +171,10 @@ ifeq ($(strip $(AUDIO_FEATURE_ENABLED_AUXPCM_BT)),true)
LOCAL_CFLAGS += -DAUXPCM_BT_ENABLED
endif
+ifeq ($(BOARD_USES_ES705),true)
+ LOCAL_CFLAGS += -DUSE_ES705
+endif
+
LOCAL_COPY_HEADERS_TO := mm-audio
LOCAL_COPY_HEADERS := audio_extn/audio_defs.h
diff --git a/hal/voice.c b/hal/voice.c
index 94afa47c..d5dcc19b 100644
--- a/hal/voice.c
+++ b/hal/voice.c
@@ -326,12 +326,12 @@ int voice_set_volume(struct audio_device *adev, float volume)
}
vol = lrint(volume * 100.0);
-
+#ifndef USE_ES705
// Voice volume levels from android are mapped to driver volume levels as follows.
// 0 -> 5, 20 -> 4, 40 ->3, 60 -> 2, 80 -> 1, 100 -> 0
// So adjust the volume to get the correct volume index in driver
vol = 100 - vol;
-
+#endif
err = platform_set_voice_volume(adev->platform, vol);
}
if (adev->mode == AUDIO_MODE_IN_COMMUNICATION)
diff --git a/hal/voice_extn/compress_voip.c b/hal/voice_extn/compress_voip.c
index 348170a7..408d59a6 100644
--- a/hal/voice_extn/compress_voip.c
+++ b/hal/voice_extn/compress_voip.c
@@ -688,13 +688,13 @@ int voice_extn_compress_voip_set_volume(struct audio_device *adev, float volume)
}
vol = lrint(volume * 100.0);
-
+#ifndef USE_ES705
/* Voice volume levels from android are mapped to driver volume levels as follows.
* 0 -> 5, 20 -> 4, 40 ->3, 60 -> 2, 80 -> 1, 100 -> 0
* So adjust the volume to get the correct volume index in driver
*/
vol = 100 - vol;
-
+#endif
err = voip_set_volume(adev, vol);
ALOGV("%s: exit: status(%d)", __func__, err);