summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVimal Puthanveed <vimalp@codeaurora.org>2013-03-11 11:55:38 -0700
committerSteve Kondik <shade@chemlab.org>2013-06-15 11:19:10 -0700
commite38f4ac5ec743e13ba0acc24db54018a25c88ffb (patch)
tree837fb7fcc9aa14d298256f4e17cfb28e2168205b
parent48d9734d3b1baea572d8df0e8226b48ec72bd1c6 (diff)
downloadhardware_libhardware_legacy-e38f4ac5ec743e13ba0acc24db54018a25c88ffb.tar.gz
hardware_libhardware_legacy-e38f4ac5ec743e13ba0acc24db54018a25c88ffb.tar.bz2
hardware_libhardware_legacy-e38f4ac5ec743e13ba0acc24db54018a25c88ffb.zip
Primary output check for sonification is removed.
- When there are 3 different tracks (Ringtone, Music and Touchtone) the device switch happens for touchtones to primary if the primary output is active. This can lead to music being played in combo due to timing issue. - This is mainly because we have a check for, primary output if active we return true for SONIFICATION. This will set SONIFICATION for touch tones and this device switch will come after music device is set. - Hence music will start playing as SONIFICATION. - We have removed the primar output check for getting device strategy Change-Id: Ibe2c381a887a49ea8b776fb2148f38b61532d021 CRs-Fixed: 456842
-rw-r--r--audio/AudioPolicyManagerBase.cpp11
1 files changed, 1 insertions, 10 deletions
diff --git a/audio/AudioPolicyManagerBase.cpp b/audio/AudioPolicyManagerBase.cpp
index 673a5ee..d8ec61b 100644
--- a/audio/AudioPolicyManagerBase.cpp
+++ b/audio/AudioPolicyManagerBase.cpp
@@ -2005,9 +2005,6 @@ audio_devices_t AudioPolicyManagerBase::getNewDevice(audio_io_handle_t output, b
audio_devices_t device = AUDIO_DEVICE_NONE;
AudioOutputDescriptor *outputDesc = mOutputs.valueFor(output);
-#ifdef QCOM_HARDWARE
- AudioOutputDescriptor *primaryOutputDesc = mOutputs.valueFor(mPrimaryOutput);
-#endif
// check the following by order of priority to request a routing change if necessary:
// 1: the strategy enforced audible is active on the output:
// use device for strategy enforced audible
@@ -2026,13 +2023,7 @@ audio_devices_t AudioPolicyManagerBase::getNewDevice(audio_io_handle_t output, b
} else if (isInCall() ||
outputDesc->isUsedByStrategy(STRATEGY_PHONE)) {
device = getDeviceForStrategy(STRATEGY_PHONE, fromCache);
-#ifdef QCOM_HARDWARE
- } else if (outputDesc->isUsedByStrategy(STRATEGY_SONIFICATION) ||
- (primaryOutputDesc->isUsedByStrategy(STRATEGY_SONIFICATION)))
-#else
- } else if (outputDesc->isUsedByStrategy(STRATEGY_SONIFICATION))
-#endif
- {
+ } else if (outputDesc->isUsedByStrategy(STRATEGY_SONIFICATION)){
device = getDeviceForStrategy(STRATEGY_SONIFICATION, fromCache);
} else if (outputDesc->isUsedByStrategy(STRATEGY_SONIFICATION_RESPECTFUL)) {
device = getDeviceForStrategy(STRATEGY_SONIFICATION_RESPECTFUL, fromCache);