summaryrefslogtreecommitdiffstats
path: root/audio
diff options
context:
space:
mode:
authorUK KIM <w0806.kim@samsung.com>2011-10-26 21:41:31 +0900
committerSimon Wilson <simonwilson@google.com>2011-10-26 10:43:08 -0700
commite6f399a540256c671f638306545b2bc04654a58f (patch)
treec12ed15a3307b99da3439bc8dfc29cf8d2771b70 /audio
parentb11cf8b62cefbba3507610887abf95e4c1d13786 (diff)
downloaddevice_samsung_tuna-e6f399a540256c671f638306545b2bc04654a58f.zip
device_samsung_tuna-e6f399a540256c671f638306545b2bc04654a58f.tar.gz
device_samsung_tuna-e6f399a540256c671f638306545b2bc04654a58f.tar.bz2
audio: decrease headset gain by 14dB for ringtone mode
This is to prevent audio shock in AUDIO_MODE_RINGTONE. Change-Id: Ic21c347a64ee0e2668dbff49dc6addcb93e4d82f
Diffstat (limited to 'audio')
-rwxr-xr-xaudio/audio_hw.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/audio/audio_hw.c b/audio/audio_hw.c
index db30fbf..2a58f4f 100755
--- a/audio/audio_hw.c
+++ b/audio/audio_hw.c
@@ -206,6 +206,7 @@
#define VOIP_EARPIECE_VOLUME_MAGURO 6
#define HEADPHONE_VOLUME_TTY -2
+#define RINGTONE_HEADSET_VOLUME_OFFSET -14
/* product-specific defines */
#define PRODUCT_DEVICE_PROPERTY "ro.product.device"
@@ -817,6 +818,8 @@ static void set_output_volumes(struct tuna_audio_device *adev, bool tty_volume)
}
if (tty_volume)
headset_volume = HEADPHONE_VOLUME_TTY;
+ else if (adev->mode == AUDIO_MODE_RINGTONE)
+ headset_volume += RINGTONE_HEADSET_VOLUME_OFFSET;
/* If we have run out of range in the codec (analog) speaker volume,
we have to apply the remainder of the dB increase to the DL2