From e38f4ac5ec743e13ba0acc24db54018a25c88ffb Mon Sep 17 00:00:00 2001 From: Vimal Puthanveed Date: Mon, 11 Mar 2013 11:55:38 -0700 Subject: 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 --- audio/AudioPolicyManagerBase.cpp | 11 +---------- 1 file changed, 1 insertion(+), 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); -- cgit v1.1