Merge "Update USB alsa to only use channel index masks for multichannel" into mnc-dev
diff --git a/audio/include/system/audio.h b/audio/include/system/audio.h
index 3e58d83..5cf8bdb 100644
--- a/audio/include/system/audio.h
+++ b/audio/include/system/audio.h
@@ -1293,9 +1293,8 @@
AUDIO_CHANNEL_REPRESENTATION_POSITION, bits);
}
-/* Derive an input channel mask for position assignment from a channel count.
- * Currently handles only mono and stereo.
- * TODO: consider switching to index channels when > 2
+/* Derive a default input channel mask from a channel count.
+ * Assumes a position mask for mono and stereo, or an index mask for channel counts > 2.
* Returns the matching channel mask,
* or AUDIO_CHANNEL_NONE if the channel count is zero,
* or AUDIO_CHANNEL_INVALID if the channel count exceeds that of the
@@ -1313,6 +1312,14 @@
case 2:
bits = AUDIO_CHANNEL_IN_STEREO;
break;
+ case 3:
+ case 4:
+ case 5:
+ case 6:
+ case 7:
+ case 8:
+ // FIXME FCC_8
+ return audio_channel_mask_for_index_assignment_from_count(channel_count);
default:
return AUDIO_CHANNEL_INVALID;
}