am a1084207: am b707cf22: Merge "Remote audio submix always has priority for media, only plays media" into jb-mr1-dev

* commit 'a1084207a76773319d46cfc1ea7376245b0dd1f3':
  Remote audio submix always has priority for media, only plays media
This commit is contained in:
Jean-Michel Trivi 2012-10-15 20:25:56 -07:00 committed by Android Git Automerger
commit 189cafac51
2 changed files with 5 additions and 6 deletions

View file

@ -387,8 +387,7 @@ void AudioPolicyManagerBase::setForceUse(AudioSystem::force_use usage, AudioSyst
config != AudioSystem::FORCE_WIRED_ACCESSORY &&
config != AudioSystem::FORCE_ANALOG_DOCK &&
config != AudioSystem::FORCE_DIGITAL_DOCK && config != AudioSystem::FORCE_NONE &&
config != AudioSystem::FORCE_NO_BT_A2DP &&
config != AudioSystem::FORCE_REMOTE_SUBMIX) {
config != AudioSystem::FORCE_NO_BT_A2DP) {
ALOGW("setForceUse() invalid config %d for FOR_MEDIA", config);
return;
}
@ -2187,8 +2186,8 @@ audio_devices_t AudioPolicyManagerBase::getDeviceForStrategy(routing_strategy st
case STRATEGY_MEDIA: {
uint32_t device2 = AUDIO_DEVICE_NONE;
if (mHasRemoteSubmix
&& mForceUse[AudioSystem::FOR_MEDIA] == AudioSystem::FORCE_REMOTE_SUBMIX) {
if (strategy != STRATEGY_SONIFICATION) {
// no sonification on remote submix (e.g. WFD)
device2 = mAvailableOutputDevices & AUDIO_DEVICE_OUT_REMOTE_SUBMIX;
}
if ((device2 == AUDIO_DEVICE_NONE) &&
@ -2217,7 +2216,8 @@ audio_devices_t AudioPolicyManagerBase::getDeviceForStrategy(routing_strategy st
if (device2 == AUDIO_DEVICE_NONE) {
device2 = mAvailableOutputDevices & AUDIO_DEVICE_OUT_DGTL_DOCK_HEADSET;
}
if (device2 == AUDIO_DEVICE_NONE) {
if ((device2 == AUDIO_DEVICE_NONE) && (strategy != STRATEGY_SONIFICATION)) {
// no sonification on aux digital (e.g. HDMI)
device2 = mAvailableOutputDevices & AUDIO_DEVICE_OUT_AUX_DIGITAL;
}
if (device2 == AUDIO_DEVICE_NONE) {

View file

@ -288,7 +288,6 @@ public:
FORCE_ANALOG_DOCK,
FORCE_DIGITAL_DOCK,
FORCE_NO_BT_A2DP,
FORCE_REMOTE_SUBMIX,
FORCE_SYSTEM_ENFORCED,
NUM_FORCE_CONFIG,
FORCE_DEFAULT = FORCE_NONE