summaryrefslogtreecommitdiffstats
path: root/services/audiopolicy/common/managerdefinitions/src/AudioPort.cpp
diff options
context:
space:
mode:
authorEric Laurent <elaurent@google.com>2015-06-25 11:48:20 -0700
committerEric Laurent <elaurent@google.com>2015-06-25 11:48:20 -0700
commitcc750d3604b33a92374253b12dd739dc06440aad (patch)
treed2fb46dbd9994624d5da2dcd6141add90d79d562 /services/audiopolicy/common/managerdefinitions/src/AudioPort.cpp
parented8505836c0b2fba0ab4be0c1eff31d4f241bc1d (diff)
downloadframeworks_av-cc750d3604b33a92374253b12dd739dc06440aad.zip
frameworks_av-cc750d3604b33a92374253b12dd739dc06440aad.tar.gz
frameworks_av-cc750d3604b33a92374253b12dd739dc06440aad.tar.bz2
audio policy: fix several device descriptor issues.
- checkOutputsForDevice() should only clear device descriptor attributes if the device is digital. - checkInputsForDevice() did not clear device descriptor attributes at all. - AudioPort::clearCapabilities() and importAudioPort() should not manage gains as these are device specific. - importAudioPort() should load a default port config. Bug: 21990937. Change-Id: Ida762ed8f9baaabae392cb4291eff1a8d3009751
Diffstat (limited to 'services/audiopolicy/common/managerdefinitions/src/AudioPort.cpp')
-rw-r--r--services/audiopolicy/common/managerdefinitions/src/AudioPort.cpp16
1 files changed, 0 insertions, 16 deletions
diff --git a/services/audiopolicy/common/managerdefinitions/src/AudioPort.cpp b/services/audiopolicy/common/managerdefinitions/src/AudioPort.cpp
index afcd073..4e24f19 100644
--- a/services/audiopolicy/common/managerdefinitions/src/AudioPort.cpp
+++ b/services/audiopolicy/common/managerdefinitions/src/AudioPort.cpp
@@ -151,28 +151,12 @@ void AudioPort::importAudioPort(const sp<AudioPort> port) {
}
}
}
- for (size_t k = 0 ; k < port->mGains.size() ; k++) {
- sp<AudioGain> gain = port->mGains.itemAt(k);
- if (gain != 0) {
- bool hasGain = false;
- for (size_t l = 0 ; l < mGains.size() ; l++) {
- if (gain == mGains.itemAt(l)) {
- hasGain = true;
- break;
- }
- }
- if (!hasGain) { // never import a gain twice
- mGains.add(gain);
- }
- }
- }
}
void AudioPort::clearCapabilities() {
mChannelMasks.clear();
mFormats.clear();
mSamplingRates.clear();
- mGains.clear();
}
void AudioPort::loadSamplingRates(char *name)