OSDN Git Service

resolve merge conflicts of 28ce9cd to lmp-dev am: 53d55d7834 am: 009bc279a2 am: 6f219...
authorEino-Ville Talvala <etalvala@google.com>
Wed, 17 Aug 2016 23:22:50 +0000 (23:22 +0000)
committerandroid-build-merger <android-build-merger@google.com>
Wed, 17 Aug 2016 23:22:50 +0000 (23:22 +0000)
am: e0cb79f1bc

Change-Id: Ia82eb5aad072dc424a010b384019140ff05e792e

alsa_utils/alsa_device_profile.c

index dd238e7..054c77a 100644 (file)
@@ -288,6 +288,12 @@ static unsigned profile_enum_channel_counts(alsa_device_profile* profile, unsign
             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 */
 }