From ee72ef4556336cde5d68a44bdbc479286134d1f0 Mon Sep 17 00:00:00 2001 From: leemin Date: Mon, 24 Sep 2012 10:05:34 +0900 Subject: 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 --- audio/audio_hw.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'audio') 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, -- cgit v1.1