summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorEric Laurent <elaurent@google.com>2013-06-07 15:52:59 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2013-06-07 15:52:59 +0000
commit18b466790aa0a55ff4282ed8b5e550e58e0444b2 (patch)
tree059c3fb09c4880c1fc47bf72b61df46315c3f5db /services
parentb05eeaedacaff92b6e5ac89f99b0fccdf7643f09 (diff)
parent7e1139c0377b6806942fb2a043737b3b9cf0ae91 (diff)
downloadframeworks_av-18b466790aa0a55ff4282ed8b5e550e58e0444b2.zip
frameworks_av-18b466790aa0a55ff4282ed8b5e550e58e0444b2.tar.gz
frameworks_av-18b466790aa0a55ff4282ed8b5e550e58e0444b2.tar.bz2
Merge "AudioFlinger: do not cache audio device when 0." into jb-mr2-dev
Diffstat (limited to 'services')
-rw-r--r--services/audioflinger/Effects.cpp2
-rw-r--r--services/audioflinger/Threads.cpp8
2 files changed, 6 insertions, 4 deletions
diff --git a/services/audioflinger/Effects.cpp b/services/audioflinger/Effects.cpp
index d66294c..942ea35 100644
--- a/services/audioflinger/Effects.cpp
+++ b/services/audioflinger/Effects.cpp
@@ -680,7 +680,7 @@ status_t AudioFlinger::EffectModule::setDevice(audio_devices_t device)
return mStatus;
}
status_t status = NO_ERROR;
- if (device && (mDescriptor.flags & EFFECT_FLAG_DEVICE_MASK) == EFFECT_FLAG_DEVICE_IND) {
+ if ((mDescriptor.flags & EFFECT_FLAG_DEVICE_MASK) == EFFECT_FLAG_DEVICE_IND) {
status_t cmdStatus;
uint32_t size = sizeof(status_t);
uint32_t cmd = audio_is_output_devices(device) ? EFFECT_CMD_SET_DEVICE :
diff --git a/services/audioflinger/Threads.cpp b/services/audioflinger/Threads.cpp
index 539bb4f..6422b23 100644
--- a/services/audioflinger/Threads.cpp
+++ b/services/audioflinger/Threads.cpp
@@ -2992,9 +2992,11 @@ bool AudioFlinger::MixerThread::checkForNewParameters_l()
// forward device change to effects that have requested to be
// aware of attached audio device.
- mOutDevice = value;
- for (size_t i = 0; i < mEffectChains.size(); i++) {
- mEffectChains[i]->setDevice_l(mOutDevice);
+ if (value != AUDIO_DEVICE_NONE) {
+ mOutDevice = value;
+ for (size_t i = 0; i < mEffectChains.size(); i++) {
+ mEffectChains[i]->setDevice_l(mOutDevice);
+ }
}
}