Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix audio volume in call #3

Merged
merged 1 commit into from Jun 10, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 5 additions & 6 deletions audio/AudioHardware.cpp
Expand Up @@ -1151,15 +1151,14 @@ status_t AudioHardware::setVoiceVolume(float v)
LOGW("setVoiceVolume(%f) over 1.0, assuming 1.0\n", v);
v = 1.0;
}
// Added 0.4 to current volume, as in voice call Mute cannot be set as minimum volume(0.00)
// setting Rx volume level as 2 for minimum and 7 as max level.
if (v < 0.4) {
v = 0.4;
// 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 * 5.0);
int vol = lrint(v * 3.0);
LOGD("setVoiceVolume(%f)\n", v);
LOGI("Setting in-call volume to %d (available range is 2 to 7)\n", vol);
LOGI("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 @@ -77,7 +77,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_profiles.xml:system/etc/media_profiles.xml \
device/huawei/u8815/configs/nfcee_access.xml:system/etc/nfcee_access.xml \
device/huawei/u8815/configs/libcm.sh:system/etc/libcm.sh \
Expand Down