diff options
author | Venkata Narendra Kumar Gutta <vgutta@codeaurora.org> | 2015-10-15 10:54:16 +0530 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2015-11-02 22:58:49 -0800 |
commit | e52611c082578825c7466491910727cd4315afbd (patch) | |
tree | 241393b5a96f8684565541e2511f7ab833f7b863 | |
parent | fc748cbb9fb1e2b8531f8003a0421f3005270f97 (diff) | |
download | hardware_qcom_audio-e52611c082578825c7466491910727cd4315afbd.tar.gz hardware_qcom_audio-e52611c082578825c7466491910727cd4315afbd.tar.bz2 hardware_qcom_audio-e52611c082578825c7466491910727cd4315afbd.zip |
policy_hal: Fix pop noise when MO call is started, while playing music
Pops heard when MO call is initiated while music playback is in progress.
This is due to a new device is set up for the output even before the
leftover buffers were drained out on the previous device.
This change is to make sure to add proper delay while device routing,
which is equal to twice of Output descriptor latency.
CRs-Fixed: 906398
Change-Id: I3b8059b8966251e0e0cc979c968205dffebc14f0
-rw-r--r-- | policy_hal/AudioPolicyManager.cpp | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/policy_hal/AudioPolicyManager.cpp b/policy_hal/AudioPolicyManager.cpp index 189bf60c..112ab284 100644 --- a/policy_hal/AudioPolicyManager.cpp +++ b/policy_hal/AudioPolicyManager.cpp @@ -26,7 +26,6 @@ #else #define ALOGVV(a...) do { } while(0) #endif -#define MIN(a, b) ((a) < (b) ? (a) : (b)) // A device mask for all audio output devices that are considered "remote" when evaluating // active output devices in isStreamActiveRemotely() @@ -35,9 +34,6 @@ // type alone is not enough: the address must match too #define APM_AUDIO_DEVICE_MATCH_ADDRESS_ALL (AUDIO_DEVICE_IN_REMOTE_SUBMIX | \ AUDIO_DEVICE_OUT_REMOTE_SUBMIX) -// Following delay should be used if the calculated routing delay from all active -// input streams is higher than this value -#define MAX_VOICE_CALL_START_DELAY_MS 100 #include <inttypes.h> #include <math.h> @@ -868,9 +864,6 @@ void AudioPolicyManagerCustom::setPhoneState(audio_mode_t state) setStrategyMute(STRATEGY_SONIFICATION, false, desc, MUTE_TIME_MS, getDeviceForStrategy(STRATEGY_SONIFICATION, true /*fromCache*/)); } - ALOGV("Setting the delay from %dms to %dms", delayMs, - MIN(delayMs, MAX_VOICE_CALL_START_DELAY_MS)); - delayMs = MIN(delayMs, MAX_VOICE_CALL_START_DELAY_MS); } if (hasPrimaryOutput()) { |