summaryrefslogtreecommitdiffstats
path: root/services/audioflinger/AudioMixer.cpp
diff options
context:
space:
mode:
authorAndy Hung <hunga@google.com>2014-05-16 11:25:07 -0700
committerAndy Hung <hunga@google.com>2014-05-16 15:05:05 -0700
commite541269be94f3a1072932d51537905b120ef4733 (patch)
tree39646def02d7230929eb85189f48b9193b8c23a0 /services/audioflinger/AudioMixer.cpp
parent7c96d53a65085f42ac2b6d416cbc16fd36ed72ff (diff)
downloadframeworks_av-e541269be94f3a1072932d51537905b120ef4733.zip
frameworks_av-e541269be94f3a1072932d51537905b120ef4733.tar.gz
frameworks_av-e541269be94f3a1072932d51537905b120ef4733.tar.bz2
Use new channel count functions for audio masks
Change-Id: Ia658ab4b6320d19fdb50f123c930918724ff0ef3 Signed-off-by: Andy Hung <hunga@google.com>
Diffstat (limited to 'services/audioflinger/AudioMixer.cpp')
-rw-r--r--services/audioflinger/AudioMixer.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/services/audioflinger/AudioMixer.cpp b/services/audioflinger/AudioMixer.cpp
index 2d67efb..d32f4d1 100644
--- a/services/audioflinger/AudioMixer.cpp
+++ b/services/audioflinger/AudioMixer.cpp
@@ -215,7 +215,7 @@ void AudioMixer::invalidateState(uint32_t mask)
status_t AudioMixer::initTrackDownmix(track_t* pTrack, int trackNum, audio_channel_mask_t mask)
{
- uint32_t channelCount = popcount(mask);
+ uint32_t channelCount = audio_channel_count_from_out_mask(mask);
ALOG_ASSERT((channelCount <= MAX_NUM_CHANNELS_TO_DOWNMIX) && channelCount);
status_t status = OK;
if (channelCount > MAX_NUM_CHANNELS) {
@@ -410,7 +410,7 @@ void AudioMixer::setParameter(int name, int target, int param, void *value)
audio_channel_mask_t mask =
static_cast<audio_channel_mask_t>(reinterpret_cast<uintptr_t>(value));
if (track.channelMask != mask) {
- uint32_t channelCount = popcount(mask);
+ uint32_t channelCount = audio_channel_count_from_out_mask(mask);
ALOG_ASSERT((channelCount <= MAX_NUM_CHANNELS_TO_DOWNMIX) && channelCount);
track.channelMask = mask;
track.channelCount = channelCount;