summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
Diffstat (limited to 'services')
-rw-r--r--services/audioflinger/Threads.cpp4
-rw-r--r--services/audiopolicy/AudioPolicyManager.cpp12
2 files changed, 8 insertions, 8 deletions
diff --git a/services/audioflinger/Threads.cpp b/services/audioflinger/Threads.cpp
index be37436..a916b32 100644
--- a/services/audioflinger/Threads.cpp
+++ b/services/audioflinger/Threads.cpp
@@ -5102,8 +5102,8 @@ sp<AudioFlinger::RecordThread::RecordTrack> AudioFlinger::RecordThread::createRe
// PCM data
audio_is_linear_pcm(format) &&
// mono or stereo
- ( (channelMask == AUDIO_CHANNEL_OUT_MONO) ||
- (channelMask == AUDIO_CHANNEL_OUT_STEREO) ) &&
+ ( (channelMask == AUDIO_CHANNEL_IN_MONO) ||
+ (channelMask == AUDIO_CHANNEL_IN_STEREO) ) &&
// hardware sample rate
// FIXME actually the native hardware sample rate
(sampleRate == mSampleRate) &&
diff --git a/services/audiopolicy/AudioPolicyManager.cpp b/services/audiopolicy/AudioPolicyManager.cpp
index 11490c3..fc9b81a 100644
--- a/services/audiopolicy/AudioPolicyManager.cpp
+++ b/services/audiopolicy/AudioPolicyManager.cpp
@@ -1686,10 +1686,10 @@ AudioPolicyManager::AudioPolicyManager(AudioPolicyClientInterface *clientInterfa
mHwModules[i]->mName);
delete outputDesc;
} else {
- for (size_t i = 0; i < outProfile->mSupportedDevices.size(); i++) {
- audio_devices_t type = outProfile->mSupportedDevices[i]->mType;
+ for (size_t k = 0; k < outProfile->mSupportedDevices.size(); k++) {
+ audio_devices_t type = outProfile->mSupportedDevices[k]->mType;
ssize_t index =
- mAvailableOutputDevices.indexOf(outProfile->mSupportedDevices[i]);
+ mAvailableOutputDevices.indexOf(outProfile->mSupportedDevices[k]);
// give a valid ID to an attached device once confirmed it is reachable
if ((index >= 0) && (mAvailableOutputDevices[index]->mId == 0)) {
mAvailableOutputDevices[index]->mId = nextUniqueId();
@@ -1731,10 +1731,10 @@ AudioPolicyManager::AudioPolicyManager(AudioPolicyClientInterface *clientInterfa
&inputDesc->mChannelMask);
if (input != 0) {
- for (size_t i = 0; i < inProfile->mSupportedDevices.size(); i++) {
- audio_devices_t type = inProfile->mSupportedDevices[i]->mType;
+ for (size_t k = 0; k < inProfile->mSupportedDevices.size(); k++) {
+ audio_devices_t type = inProfile->mSupportedDevices[k]->mType;
ssize_t index =
- mAvailableInputDevices.indexOf(inProfile->mSupportedDevices[i]);
+ mAvailableInputDevices.indexOf(inProfile->mSupportedDevices[k]);
// give a valid ID to an attached device once confirmed it is reachable
if ((index >= 0) && (mAvailableInputDevices[index]->mId == 0)) {
mAvailableInputDevices[index]->mId = nextUniqueId();