Add and enable multichannel for audio resampler

Change-Id: I2b86fb73d70abc4c456f7567270a888086b301d4
Signed-off-by: Andy Hung <hunga@google.com>
diff --git a/services/audioflinger/AudioResampler.cpp b/services/audioflinger/AudioResampler.cpp
index 562c4ea..b8a0357 100644
--- a/services/audioflinger/AudioResampler.cpp
+++ b/services/audioflinger/AudioResampler.cpp
@@ -259,13 +259,14 @@
             mPhaseFraction(0), mLocalTimeFreq(0),
             mPTS(AudioBufferProvider::kInvalidPTS), mQuality(quality) {
     // sanity check on format
-    if ((bitDepth != 16) ||(inChannelCount < 1) || (inChannelCount > 2)) {
-        ALOGE("Unsupported sample format, %d bits, %d channels", bitDepth,
-                inChannelCount);
-        // ALOG_ASSERT(0);
+    if ((bitDepth != 16 && (quality < DYN_LOW_QUALITY || bitDepth != 32))
+            || inChannelCount < 1
+            || inChannelCount > (quality < DYN_LOW_QUALITY ? 2 : 8)) {
+        LOG_ALWAYS_FATAL("Unsupported sample format %d quality %d bits, %d channels",
+                quality, bitDepth, inChannelCount);
     }
     if (sampleRate <= 0) {
-        ALOGE("Unsupported sample rate %d Hz", sampleRate);
+        LOG_ALWAYS_FATAL("Unsupported sample rate %d Hz", sampleRate);
     }
 
     // initialize common members