summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorEric Laurent <elaurent@google.com>2013-06-07 08:59:12 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2013-06-07 08:59:12 -0700
commit04b035e3ccbf2919e4447c66e6483c11f2889f01 (patch)
tree14d7677a26472c1a8900065caf25654492e78045 /services
parent5aefa7b60e4567d789de22068a09f339e88d37d6 (diff)
parentd3a5b48a1bc4f5d6ff4472f54f909abaadd5fa39 (diff)
downloadframeworks_av-04b035e3ccbf2919e4447c66e6483c11f2889f01.zip
frameworks_av-04b035e3ccbf2919e4447c66e6483c11f2889f01.tar.gz
frameworks_av-04b035e3ccbf2919e4447c66e6483c11f2889f01.tar.bz2
am d3a5b48a: am 18b46679: Merge "AudioFlinger: do not cache audio device when 0." into jb-mr2-dev
* commit 'd3a5b48a1bc4f5d6ff4472f54f909abaadd5fa39': AudioFlinger: do not cache audio device when 0.
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 213688e..0f0bc0f 100644
--- a/services/audioflinger/Threads.cpp
+++ b/services/audioflinger/Threads.cpp
@@ -2993,9 +2993,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);
+ }
}
}