diff options
author | Andy Hung <hunga@google.com> | 2014-08-07 17:49:53 -0700 |
---|---|---|
committer | Andy Hung <hunga@google.com> | 2014-08-08 09:59:02 -0700 |
commit | 389cfdbb9a92a438a0d7710321c2964c7ad55eca (patch) | |
tree | 7ef80332e73a04ccc3221bb0f75dc1a7932234ac /services/audioflinger/Threads.cpp | |
parent | 92ce4715315bddd158c7d4028556632f0547e3b9 (diff) | |
download | frameworks_av-389cfdbb9a92a438a0d7710321c2964c7ad55eca.zip frameworks_av-389cfdbb9a92a438a0d7710321c2964c7ad55eca.tar.gz frameworks_av-389cfdbb9a92a438a0d7710321c2964c7ad55eca.tar.bz2 |
Fix effect and mono sink handling.
Do not permit mixing to mono sink in AudioFlinger.
Allow effects on mono sink if not Mixer thread (e.g. Record).
Bug: 16863095
Change-Id: I8b232fc1fb3f07bf017020c5d4f9ace644dec6d8
Diffstat (limited to 'services/audioflinger/Threads.cpp')
-rw-r--r-- | services/audioflinger/Threads.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/services/audioflinger/Threads.cpp b/services/audioflinger/Threads.cpp index 2f65370..7d583bb 100644 --- a/services/audioflinger/Threads.cpp +++ b/services/audioflinger/Threads.cpp @@ -910,11 +910,11 @@ sp<AudioFlinger::EffectHandle> AudioFlinger::ThreadBase::createEffect_l( goto Exit; } - // Reject any effect on multichannel sinks. + // Reject any effect on mixer or duplicating multichannel sinks. // TODO: fix both format and multichannel issues with effects. - if (mChannelCount != FCC_2) { - ALOGW("createEffect_l() Cannot add effect %s for multichannel(%d) thread", - desc->name, mChannelCount); + if ((mType == MIXER || mType == DUPLICATING) && mChannelCount != FCC_2) { + ALOGW("createEffect_l() Cannot add effect %s for multichannel(%d) %s threads", + desc->name, mChannelCount, mType == MIXER ? "MIXER" : "DUPLICATING"); lStatus = BAD_VALUE; goto Exit; } |