Prepare for additional capture formats

Change-Id: Ib10b004f0029191b33a97671e41b0d86ebfbe0b9
diff --git a/services/audioflinger/AudioFlinger.cpp b/services/audioflinger/AudioFlinger.cpp
index 92ee30e..779d855 100644
--- a/services/audioflinger/AudioFlinger.cpp
+++ b/services/audioflinger/AudioFlinger.cpp
@@ -1342,9 +1342,9 @@
         goto Exit;
     }
 
-    // FIXME when we support more formats, add audio_is_valid_format(format)
-    //       and any explicit restrictions if audio_is_linear_pcm(format)
-    if (format != AUDIO_FORMAT_PCM_16_BIT) {
+    // we don't yet support anything other than 16-bit PCM
+    if (!(audio_is_valid_format(format) &&
+            audio_is_linear_pcm(format) && format == AUDIO_FORMAT_PCM_16_BIT)) {
         ALOGE("openRecord() invalid format %#x", format);
         lStatus = BAD_VALUE;
         goto Exit;