summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Laurent <elaurent@google.com>2014-07-01 20:31:47 -0700
committerEric Laurent <elaurent@google.com>2014-07-01 20:31:47 -0700
commitd03d766459462a0f86a800ac4cc0cecb05e97beb (patch)
treec4db8c99f6874b4fbba7e84d8eb8a5d17faea313
parent3aabd4612ea1ca81773c4b19042b680e11085fce (diff)
downloadandroid_frameworks_wilhelm-d03d766459462a0f86a800ac4cc0cecb05e97beb.tar.gz
android_frameworks_wilhelm-d03d766459462a0f86a800ac4cc0cecb05e97beb.tar.bz2
android_frameworks_wilhelm-d03d766459462a0f86a800ac4cc0cecb05e97beb.zip
audio: fixed channel count determination from channel mask
Do not use popcount() to derive channel count from channel mask. Bug: 15000850. Change-Id: I7af794e4515cd0f85e5b9744bd4e53e33aa0d5eb
-rw-r--r--src/android/AudioPlayer_to_android.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/android/AudioPlayer_to_android.cpp b/src/android/AudioPlayer_to_android.cpp
index f318148..7275dee 100644
--- a/src/android/AudioPlayer_to_android.cpp
+++ b/src/android/AudioPlayer_to_android.cpp
@@ -874,7 +874,7 @@ SLresult android_audioPlayer_validateChannelMask(uint32_t mask, int numChans) {
return SL_RESULT_CONTENT_UNSUPPORTED;
}
// Are there the right number of channels in the mask?
- if (popcount(mask) != numChans) {
+ if (audio_channel_count_from_out_mask(mask) != numChans) {
return SL_RESULT_CONTENT_UNSUPPORTED;
}
// check against unsupported channels