Navigation Menu

Skip to content

Commit

Permalink
Fix audio volume in call
Browse files Browse the repository at this point in the history
  • Loading branch information
Kra1o5 authored and Daz Jones committed Jun 10, 2013
1 parent dd1710f commit f6f4ad5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
8 changes: 6 additions & 2 deletions audio/AudioHardware.cpp
Expand Up @@ -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)))
{
Expand Down
1 change: 0 additions & 1 deletion configs/AutoVolumeControl.txt

This file was deleted.

1 change: 0 additions & 1 deletion device.mk
Expand Up @@ -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 \
Expand Down

0 comments on commit f6f4ad5

Please sign in to comment.