summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMingming Yin <mingming@codeaurora.org>2016-01-04 14:58:00 -0800
committerArne Coucheron <arco68@gmail.com>2016-05-11 00:12:22 +0200
commit73ebe4cf3b57c351525c80a34cb4427ed145eccd (patch)
tree042831a7d35e8470df0318af7bc102697455f7c4
parentfb2fb504f29ffd9295fcc24aceb0ddcb15a15c6a (diff)
downloadhardware_qcom_audio-73ebe4cf3b57c351525c80a34cb4427ed145eccd.tar.gz
hardware_qcom_audio-73ebe4cf3b57c351525c80a34cb4427ed145eccd.tar.bz2
hardware_qcom_audio-73ebe4cf3b57c351525c80a34cb4427ed145eccd.zip
policy_hal: fix for volume burst during FM device switch
- Issue: Volume burst is heard during device switch (headphone and speaker) for FM playback - Root cause: delayMs passed to CheckAndSetVolume is not applied for FM playback - Fix: Double delayMs and apply FM volume with this delay Change-Id: Ifa0b214d16527973277a5c84b8a4f3fbd0760d07
-rw-r--r--policy_hal/AudioPolicyManager.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/policy_hal/AudioPolicyManager.cpp b/policy_hal/AudioPolicyManager.cpp
index 440d1229..ac4436c7 100644
--- a/policy_hal/AudioPolicyManager.cpp
+++ b/policy_hal/AudioPolicyManager.cpp
@@ -995,7 +995,8 @@ status_t AudioPolicyManagerCustom::checkAndSetVolume(audio_stream_type_t stream,
mPrevFMVolumeDb = volumeDb;
AudioParameter param = AudioParameter();
param.addFloat(String8("fm_volume"), Volume::DbToAmpl(volumeDb));
- mpClientInterface->setParameters(mPrimaryOutput->mIoHandle, param.toString(), delayMs);
+ //Double delayMs to avoid sound burst while device switch.
+ mpClientInterface->setParameters(mPrimaryOutput->mIoHandle, param.toString(), delayMs*2);
}
#endif /* FM_POWER_OPT end */
}