summaryrefslogtreecommitdiffstats
path: root/services/audioflinger/AudioFlinger.h
diff options
context:
space:
mode:
authorAndy Hung <hunga@google.com>2014-08-07 17:49:53 -0700
committerAndy Hung <hunga@google.com>2014-08-08 09:59:02 -0700
commit389cfdbb9a92a438a0d7710321c2964c7ad55eca (patch)
tree7ef80332e73a04ccc3221bb0f75dc1a7932234ac /services/audioflinger/AudioFlinger.h
parent92ce4715315bddd158c7d4028556632f0547e3b9 (diff)
downloadframeworks_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/AudioFlinger.h')
-rw-r--r--services/audioflinger/AudioFlinger.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/services/audioflinger/AudioFlinger.h b/services/audioflinger/AudioFlinger.h
index 31c5a1a..83e4ae1 100644
--- a/services/audioflinger/AudioFlinger.h
+++ b/services/audioflinger/AudioFlinger.h
@@ -340,7 +340,8 @@ private:
uint32_t channelCount = FCC_2; // stereo is default
if (kEnableExtendedChannels) {
channelCount = audio_channel_count_from_out_mask(channelMask);
- if (channelCount > AudioMixer::MAX_NUM_CHANNELS) {
+ if (channelCount < FCC_2 // mono is not supported at this time
+ || channelCount > AudioMixer::MAX_NUM_CHANNELS) {
return false;
}
}