Skip to content

Commit

Permalink
Merge pull request #3 from Kra1o5/ics
Browse files Browse the repository at this point in the history
Fix audio volume in call
  • Loading branch information
Daz Jones committed Jun 10, 2013
2 parents 967d4c8 + ebc42da commit 9fb1ae5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
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

0 comments on commit 9fb1ae5

Please sign in to comment.