summaryrefslogtreecommitdiffstats
path: root/services/audiopolicy/managerdefault/AudioPolicyManager.h
diff options
context:
space:
mode:
authorEric Laurent <elaurent@google.com>2015-03-18 18:30:19 -0700
committerEric Laurent <elaurent@google.com>2015-04-08 18:08:24 -0700
commitffbc80f5908eaf67a033c6e93a343c39dd6894eb (patch)
treec97aa681b8c70d7429f7be93f851f04e9dee5900 /services/audiopolicy/managerdefault/AudioPolicyManager.h
parentc75307b73d324d590d0dbc05b44bce9aa89b7145 (diff)
downloadframeworks_av-ffbc80f5908eaf67a033c6e93a343c39dd6894eb.zip
frameworks_av-ffbc80f5908eaf67a033c6e93a343c39dd6894eb.tar.gz
frameworks_av-ffbc80f5908eaf67a033c6e93a343c39dd6894eb.tar.bz2
audio policy: volume in dBs
Volumes are now stored and exchanged in dBs to be consistent with the volume tables. They are converted if needed when applied to the target gain controller. Change-Id: I916cbb0bbe65c916444b8c65a2bdca9645c58399
Diffstat (limited to 'services/audiopolicy/managerdefault/AudioPolicyManager.h')
-rw-r--r--services/audiopolicy/managerdefault/AudioPolicyManager.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/services/audiopolicy/managerdefault/AudioPolicyManager.h b/services/audiopolicy/managerdefault/AudioPolicyManager.h
index 9baeeb6..11fd5ff 100644
--- a/services/audiopolicy/managerdefault/AudioPolicyManager.h
+++ b/services/audiopolicy/managerdefault/AudioPolicyManager.h
@@ -49,8 +49,11 @@ namespace android {
// Attenuation applied to STRATEGY_SONIFICATION streams when a headset is connected: 6dB
#define SONIFICATION_HEADSET_VOLUME_FACTOR 0.5
+#define SONIFICATION_HEADSET_VOLUME_FACTOR_DB (-6)
// Min volume for STRATEGY_SONIFICATION streams when limited by music volume: -36dB
#define SONIFICATION_HEADSET_VOLUME_MIN 0.016
+#define SONIFICATION_HEADSET_VOLUME_MIN_DB (-36)
+
// Time in milliseconds during which we consider that music is still active after a music
// track was stopped - see computeVolume()
#define SONIFICATION_HEADSET_MUSIC_DELAY 5000