Revert "Audio Policy: add audio.msd.disable property for MSD detour"

This reverts commit f02f367f5ae3376a8305d0ae97548819696f457e.

Reason for revert: Committed accidentally

Change-Id: I3cc92123fc2dca1f1ab497655c6d2f9b10853920
diff --git a/services/audiopolicy/managerdefault/AudioPolicyManager.cpp b/services/audiopolicy/managerdefault/AudioPolicyManager.cpp
index f39614e..58acad3 100644
--- a/services/audiopolicy/managerdefault/AudioPolicyManager.cpp
+++ b/services/audiopolicy/managerdefault/AudioPolicyManager.cpp
@@ -1070,17 +1070,8 @@
     return output;
 }
 
-sp<HwModule> AudioPolicyManager::getMsdModule() const {
-    sp<HwModule> msdModule = mHwModules.getModuleFromName(AUDIO_HARDWARE_MODULE_ID_MSD);
-    if (msdModule != 0 && property_get_bool("audio.msd.disable", false /* default_value */)) {
-        ALOGI("use of the MSD module is disabled by audio.msd.disable property");
-        return 0;
-    }
-    return msdModule;
-}
-
 sp<DeviceDescriptor> AudioPolicyManager::getMsdAudioInDevice() const {
-    sp<HwModule> msdModule = getMsdModule();
+    sp<HwModule> msdModule = mHwModules.getModuleFromName(AUDIO_HARDWARE_MODULE_ID_MSD);
     if (msdModule != 0) {
         DeviceVector msdInputDevices = mAvailableInputDevices.getDevicesFromHwModule(
                 msdModule->getHandle());
@@ -1090,7 +1081,7 @@
 }
 
 audio_devices_t AudioPolicyManager::getMsdAudioOutDeviceTypes() const {
-    sp<HwModule> msdModule = getMsdModule();
+    sp<HwModule> msdModule = mHwModules.getModuleFromName(AUDIO_HARDWARE_MODULE_ID_MSD);
     if (msdModule != 0) {
         return mAvailableOutputDevices.getDeviceTypesFromHwModule(msdModule->getHandle());
     }
@@ -1099,7 +1090,6 @@
 
 const AudioPatchCollection AudioPolicyManager::getMsdPatches() const {
     AudioPatchCollection msdPatches;
-    // This function ignores audio.msd.disable property to allow patch teardown.
     sp<HwModule> msdModule = mHwModules.getModuleFromName(AUDIO_HARDWARE_MODULE_ID_MSD);
     if (msdModule != 0) {
         for (size_t i = 0; i < mAudioPatches.size(); ++i) {
@@ -1119,7 +1109,7 @@
 status_t AudioPolicyManager::getBestMsdAudioProfileFor(audio_devices_t outputDevice,
         bool hwAvSync, audio_port_config *sourceConfig, audio_port_config *sinkConfig) const
 {
-    sp<HwModule> msdModule = getMsdModule();
+    sp<HwModule> msdModule = mHwModules.getModuleFromName(AUDIO_HARDWARE_MODULE_ID_MSD);
     if (msdModule == nullptr) {
         ALOGE("%s() unable to get MSD module", __func__);
         return NO_INIT;
@@ -4637,7 +4627,7 @@
     checkOutputForAllStrategies();
     if (onOutputsChecked != nullptr && onOutputsChecked()) checkA2dpSuspend();
     updateDevicesAndOutputs();
-    if (getMsdModule() != 0) {
+    if (mHwModules.getModuleFromName(AUDIO_HARDWARE_MODULE_ID_MSD) != 0) {
         setMsdPatch();
     }
 }