summaryrefslogtreecommitdiffstats
path: root/audio
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
commitee72ef4556336cde5d68a44bdbc479286134d1f0 (patch)
treebd53f305d6358ce31afd45becdaff48dda93dbbe /audio
parent09a5be4c509b6a048c34e4f2265b7139f6de72e8 (diff)
downloaddevice_samsung_tuna-ee72ef4556336cde5d68a44bdbc479286134d1f0.zip
device_samsung_tuna-ee72ef4556336cde5d68a44bdbc479286134d1f0.tar.gz
device_samsung_tuna-ee72ef4556336cde5d68a44bdbc479286134d1f0.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
Diffstat (limited to 'audio')
-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,