Revert "Call getAudioPort to get supported attributes for audio devices."
This reverts commit 3b4270ecbebad2b5c0d6733eee3fb52e1ddb76aa.
Reason for revert: b/172307055
Change-Id: Ic22dad674bbd9eee9d3b24308e2a2e964c6406f2
diff --git a/services/audioflinger/PatchPanel.cpp b/services/audioflinger/PatchPanel.cpp
index f6971fc..b58fd8b 100644
--- a/services/audioflinger/PatchPanel.cpp
+++ b/services/audioflinger/PatchPanel.cpp
@@ -55,7 +55,8 @@
}
/* Get supported attributes for a given audio port */
-status_t AudioFlinger::getAudioPort(struct audio_port_v7 *port) {
+status_t AudioFlinger::getAudioPort(struct audio_port *port)
+{
Mutex::Autolock _l(mLock);
return mPatchPanel.getAudioPort(port);
}
@@ -102,18 +103,10 @@
}
/* Get supported attributes for a given audio port */
-status_t AudioFlinger::PatchPanel::getAudioPort(struct audio_port_v7 *port)
+status_t AudioFlinger::PatchPanel::getAudioPort(struct audio_port *port __unused)
{
- if (port->type != AUDIO_PORT_TYPE_DEVICE) {
- // Only query the HAL when the port is a device.
- return NO_ERROR;
- }
- AudioHwDevice* hwDevice = findAudioHwDeviceByModule(port->ext.device.hw_module);
- if (hwDevice == nullptr) {
- ALOGW("%s cannot find hw module %d", __func__, port->ext.device.hw_module);
- return BAD_VALUE;
- }
- return hwDevice->getAudioPort(port);
+ ALOGV(__func__);
+ return NO_ERROR;
}
/* Connect a patch between several source and sink ports */