there is improved support for configuring audio in M preview SDK, such as multichannel.
Most of M preview SDK documentation is online,
After installing the docs, open these files in your browser:
m-preview-1-developer-docs/reference/android/media/AudioTrack.Builder.html
m-preview-1-developer-docs/reference/android/media/AudioRecord.Builder.html
m-preview-1-developer-docs/reference/android/media/AudioFormat.Builder.html
The key change that permits better configuration of multichannel I/O over USB
is the concept of "indexed multi-channel" in addition to the previous "positional multi-channel" concept.
Positional multichannel associates each channel with a location or semantics,
such as front left, front rear, etc.
Indexed multichannel gives no semantics to each channel.
Rather each channel is identified by an index (number).
For example a 4-channel USB audio peripheral would have indices 0 to 3.
Indexed fits with USB audio much better than positional (which fits better with HDMI).
Now, the bad news: the indexed multi-channel is currently only for SDK, not NDK.
I can't make any commitments or give a schedule.