Merge tag 'android-6.0.1_r3' into 601r3

Android 6.0.1 release 3

* tag 'android-6.0.1_r3':
  fix usb audio for devices with more than 8 channels

Change-Id: If40603d794ad6334c4c6006566d46d9d0d0d0ace
diff --git a/alsa_utils/alsa_device_profile.c b/alsa_utils/alsa_device_profile.c
index dd238e7..054c77a 100644
--- a/alsa_utils/alsa_device_profile.c
+++ b/alsa_utils/alsa_device_profile.c
@@ -288,6 +288,12 @@
             profile->channel_counts[num_counts++] = std_channel_counts[index];
         }
     }
+    // if we have no match with the standard counts, we use the largest (preferred) std count.
+    if (num_counts == 0) {
+        ALOGW("usb device does not match std channel counts, setting to %d",
+                std_channel_counts[0]);
+        profile->channel_counts[num_counts++] = std_channel_counts[0];
+    }
     profile->channel_counts[num_counts] = 0;
     return num_counts; /* return # of supported counts */
 }