Browse files

Fix audio volume in call

  • Loading branch information...
1 parent dd1710f commit f6f4ad5434a7cf0c995216c8917b90a8823125d7 @Kra1o5 Kra1o5 committed with Jun 10, 2013
Showing with 6 additions and 4 deletions.
  1. +6 −2 audio/AudioHardware.cpp
  2. +0 −1 configs/AutoVolumeControl.txt
  3. +0 −1 device.mk
View
8 audio/AudioHardware.cpp
@@ -1574,10 +1574,14 @@ status_t AudioHardware::setVoiceVolume(float v)
ALOGW("setVoiceVolume(%f) over 1.0, assuming 1.0\n", v);
v = 1.0;
}
+ // Added 0.2 to current volume, as in voice call Mute cannot be set as minimum volume(0.00)
+ // setting Rx volume level as 1 for minimum and 6 as max level.
+ v = 0.2 + v;
+ }
- int vol = lrint(v * 7.0);
+ int vol = lrint(v * 3.0);
ALOGD("setVoiceVolume(%f)\n", v);
- ALOGI("Setting in-call volume to %d (available range is 2 to 7)\n", vol);
+ ALOGI("Setting in-call volume to %d (available range is 1 to 6)\n", vol);
if ((mCurSndDevice != -1) && ((mCurSndDevice == SND_DEVICE_TTY_HEADSET) || (mCurSndDevice == SND_DEVICE_TTY_VCO)))
{
View
1 configs/AutoVolumeControl.txt
@@ -1 +0,0 @@
-1
View
1 device.mk
@@ -72,7 +72,6 @@ PRODUCT_COPY_FILES += \
PRODUCT_COPY_FILES += \
device/huawei/u8815/configs/audio_policy.conf:system/etc/audio_policy.conf \
device/huawei/u8815/configs/AudioFilter.csv:system/etc/AudioFilter.csv \
- device/huawei/u8815/configs/AutoVolumeControl.txt:system/etc/AutoVolumeControl.txt \
device/huawei/u8815/configs/media_codecs.xml:system/etc/media_codecs.xml \
device/huawei/u8815/configs/media_profiles.xml:system/etc/media_profiles.xml \
device/huawei/u8815/configs/libcm.sh:system/etc/libcm.sh \

0 comments on commit f6f4ad5

Please sign in to comment.