Merge "audio policy: do not route in call audio to HDMI" into jb-mr1-dev
diff --git a/audio/AudioPolicyManagerBase.cpp b/audio/AudioPolicyManagerBase.cpp
index 4ae7624..e878f3a 100644
--- a/audio/AudioPolicyManagerBase.cpp
+++ b/audio/AudioPolicyManagerBase.cpp
@@ -387,8 +387,7 @@
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;
}
@@ -2191,8 +2190,8 @@
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) &&
@@ -2221,7 +2220,8 @@
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) {
@@ -2956,6 +2956,9 @@
mMuteCount[i] = 0;
mStopTime[i] = 0;
}
+ for (int i = 0; i < NUM_STRATEGIES; i++) {
+ mStrategyMutedByDevice[i] = false;
+ }
if (profile != NULL) {
mSamplingRate = profile->mSamplingRates[0];
mFormat = profile->mFormats[0];
diff --git a/include/hardware_legacy/AudioSystemLegacy.h b/include/hardware_legacy/AudioSystemLegacy.h
index 0b9b4d0..6296b8b 100644
--- a/include/hardware_legacy/AudioSystemLegacy.h
+++ b/include/hardware_legacy/AudioSystemLegacy.h
@@ -288,7 +288,6 @@
FORCE_ANALOG_DOCK,
FORCE_DIGITAL_DOCK,
FORCE_NO_BT_A2DP,
- FORCE_REMOTE_SUBMIX,
FORCE_SYSTEM_ENFORCED,
NUM_FORCE_CONFIG,
FORCE_DEFAULT = FORCE_NONE