summaryrefslogtreecommitdiffstats
path: root/services/audiopolicy
diff options
context:
space:
mode:
authorArne Coucheron <arco68@gmail.com>2016-03-17 00:25:51 +0100
committerArne Coucheron <arco68@gmail.com>2016-03-17 00:25:51 +0100
commit8c2e9d8867ccaba1a617f133b37103e2ac77e871 (patch)
tree59e2e085a9aea96fb143b574eb910f57d4b5b827 /services/audiopolicy
parent50c27eab97d5b3196a4912893e48fb36cbf0cc6b (diff)
downloadframeworks_av-8c2e9d8867ccaba1a617f133b37103e2ac77e871.zip
frameworks_av-8c2e9d8867ccaba1a617f133b37103e2ac77e871.tar.gz
frameworks_av-8c2e9d8867ccaba1a617f133b37103e2ac77e871.tar.bz2
audio: Remove LEGACY_ALSA_AUDIO ifdefs from AudioPolicyManager.cpp
This is moved to custom policy manager in HAL sources. Change-Id: I716580f7d3399f1628c26bd3b79bd6c6a52fbbf6
Diffstat (limited to 'services/audiopolicy')
-rw-r--r--services/audiopolicy/managerdefault/AudioPolicyManager.cpp54
1 files changed, 0 insertions, 54 deletions
diff --git a/services/audiopolicy/managerdefault/AudioPolicyManager.cpp b/services/audiopolicy/managerdefault/AudioPolicyManager.cpp
index 50b5087..13499ae 100644
--- a/services/audiopolicy/managerdefault/AudioPolicyManager.cpp
+++ b/services/audiopolicy/managerdefault/AudioPolicyManager.cpp
@@ -88,20 +88,6 @@ status_t AudioPolicyManager::setDeviceConnectionStateInt(audio_devices_t device,
}
ALOGV("setDeviceConnectionState() connecting device %x", device);
-#ifdef LEGACY_ALSA_AUDIO
- if (device & AUDIO_DEVICE_OUT_ALL_A2DP) {
- AudioParameter param;
- param.add(String8("a2dp_connected"), String8("true"));
- mpClientInterface->setParameters(0, param.toString());
- }
-
- if (device & AUDIO_DEVICE_OUT_USB_ACCESSORY) {
- AudioParameter param;
- param.add(String8("usb_connected"), String8("true"));
- mpClientInterface->setParameters(0, param.toString());
- }
-#endif
-
// register new device as available
index = mAvailableOutputDevices.add(devDesc);
if (index >= 0) {
@@ -153,20 +139,6 @@ status_t AudioPolicyManager::setDeviceConnectionStateInt(audio_devices_t device,
// remove device from available output devices
mAvailableOutputDevices.remove(devDesc);
-#ifdef LEGACY_ALSA_AUDIO
- if (device & AUDIO_DEVICE_OUT_ALL_A2DP) {
- AudioParameter param;
- param.add(String8("a2dp_connected"), String8("false"));
- mpClientInterface->setParameters(0, param.toString());
- }
-
- if (device & AUDIO_DEVICE_OUT_USB_ACCESSORY) {
- AudioParameter param;
- param.add(String8("usb_connected"), String8("true"));
- mpClientInterface->setParameters(0, param.toString());
- }
-#endif
-
checkOutputsForDevice(devDesc, state, outputs, devDesc->mAddress);
// Propagate device availability to Engine
@@ -333,11 +305,7 @@ void AudioPolicyManager::updateCallRouting(audio_devices_t rxDevice, int delayMs
if(!hasPrimaryOutput()) {
return;
}
-#ifdef LEGACY_ALSA_AUDIO
- audio_devices_t txDevice = getDeviceAndMixForInputSource(AUDIO_SOURCE_VOICE_CALL);
-#else
audio_devices_t txDevice = getDeviceAndMixForInputSource(AUDIO_SOURCE_VOICE_COMMUNICATION);
-#endif
ALOGV("updateCallRouting device rxDevice %08x txDevice %08x", rxDevice, txDevice);
// release existing RX patch if any
@@ -1423,22 +1391,6 @@ status_t AudioPolicyManager::getInputForAttr(const audio_attributes_t *attr,
} else {
*inputType = API_INPUT_LEGACY;
}
-#ifdef LEGACY_ALSA_AUDIO
- // adapt channel selection to input source
- switch (inputSource) {
- case AUDIO_SOURCE_VOICE_UPLINK:
- channelMask |= AUDIO_CHANNEL_IN_VOICE_UPLINK;
- break;
- case AUDIO_SOURCE_VOICE_DOWNLINK:
- channelMask |= AUDIO_CHANNEL_IN_VOICE_DNLINK;
- break;
- case AUDIO_SOURCE_VOICE_CALL:
- channelMask |= AUDIO_CHANNEL_IN_VOICE_UPLINK | AUDIO_CHANNEL_IN_VOICE_DNLINK;
- break;
- default:
- break;
- }
-#endif
if (inputSource == AUDIO_SOURCE_HOTWORD) {
ssize_t index = mSoundTriggerSessions.indexOfKey(session);
if (index >= 0) {
@@ -3947,13 +3899,11 @@ void AudioPolicyManager::checkOutputForAllStrategies()
void AudioPolicyManager::checkA2dpSuspend()
{
-#ifndef LEGACY_ALSA_AUDIO
audio_io_handle_t a2dpOutput = mOutputs.getA2dpOutput();
if (a2dpOutput == 0) {
mA2dpSuspended = false;
return;
}
-#endif
bool isScoConnected =
((mAvailableInputDevices.types() & AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET &
@@ -3978,9 +3928,7 @@ void AudioPolicyManager::checkA2dpSuspend()
((mEngine->getPhoneState() != AUDIO_MODE_IN_CALL) &&
(mEngine->getPhoneState() != AUDIO_MODE_RINGTONE))) {
-#ifndef LEGACY_ALSA_AUDIO
mpClientInterface->restoreOutput(a2dpOutput);
-#endif
mA2dpSuspended = false;
}
} else {
@@ -3990,9 +3938,7 @@ void AudioPolicyManager::checkA2dpSuspend()
((mEngine->getPhoneState() == AUDIO_MODE_IN_CALL) ||
(mEngine->getPhoneState() == AUDIO_MODE_RINGTONE))) {
-#ifndef LEGACY_ALSA_AUDIO
mpClientInterface->suspendOutput(a2dpOutput);
-#endif
mA2dpSuspended = true;
}
}