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-01 01:24:25 -0700
commit86a0c7e3fd9a58763f0614418ebb9819f1d84a8b (patch)
tree2e3185941762a8e8b1c95aba428f39b4460e5f85
parente7b58b249036231b667665fcd6c86ed6f73b16dc (diff)
downloadandroid_hardware_libhardware_legacy-86a0c7e3fd9a58763f0614418ebb9819f1d84a8b.tar.gz
android_hardware_libhardware_legacy-86a0c7e3fd9a58763f0614418ebb9819f1d84a8b.tar.bz2
android_hardware_libhardware_legacy-86a0c7e3fd9a58763f0614418ebb9819f1d84a8b.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 CRs-Fixed: 456842 Change-Id: I86955b1d94724ab7eb574e7b897c9ad2ba54d899
-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);