summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorleemin <min47.lee@samsung.com>2012-09-24 10:05:34 +0900
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-09-27 16:32:36 -0700
commit6aa160e32251b3b04a28b4c2bdf42daf979e2e55 (patch)
treeff2b7cbb67f0ce000b9d8d19ac70c3d65f4fe4f1
parentd9829aa0512efb1868fe6ca638f70e379d18b3dc (diff)
downloaddevice_samsung_tuna-6aa160e32251b3b04a28b4c2bdf42daf979e2e55.zip
device_samsung_tuna-6aa160e32251b3b04a28b4c2bdf42daf979e2e55.tar.gz
device_samsung_tuna-6aa160e32251b3b04a28b4c2bdf42daf979e2e55.tar.bz2
audio: changes ringtone volume when call is comming
the ringtone offset has to be setted to analog side. Buganizer : 6920555 According to Samsung's spec, the earphone ringtone volume level should be 14dB lowere than the media playback volume. On ICS, this behavior was working properly, but on JB this behavior is not working properly. Below is the analog and digital volume change from ICS to JB: ICS : Digital Volume = Normal / Analog volume = lowered 14dB JB : Digital Volume = increased 14dB (in comparison to ICS) / Analog volume = lowered 14dB (same as ICS) Hence the volume in JB has increased by 14dB when compared to ICS. Bug 6920555. Change-Id: Ibc248612db378b5b991221468d8f801257ba4103
-rw-r--r--audio/audio_hw.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/audio/audio_hw.c b/audio/audio_hw.c
index 46b8d9b..66a6da7 100644
--- a/audio/audio_hw.c
+++ b/audio/audio_hw.c
@@ -1083,7 +1083,8 @@ static void set_output_volumes(struct tuna_audio_device *adev, bool tty_volume)
speaker_volume_overrange);
mixer_ctl_set_value(adev->mixer_ctls.tones_dl2_volume, 0,
speaker_volume_overrange + dl2_volume_correction);
- } else if (adev->mode == AUDIO_MODE_IN_COMMUNICATION) {
+ } else if ((adev->mode == AUDIO_MODE_IN_COMMUNICATION) ||
+ (adev->mode == AUDIO_MODE_RINGTONE)) {
mixer_ctl_set_value(adev->mixer_ctls.tones_dl1_volume, 0,
MIXER_ABE_GAIN_0DB);
mixer_ctl_set_value(adev->mixer_ctls.tones_dl2_volume, 0,