Bit perfect sound in Android - Lurker00/DX200-firmware GitHub Wiki
This is a draft!
Architecture of Android Audio System: https://source.android.com/devices/audio/
At the application level, to specify sample formats, only constants defined in android.media.AudioFormat class are available: https://developer.android.com/reference/android/media/AudioFormat.html
So, though the sample rate can be specified directlty, the samples can be either 16-bit LE signed integers, or 32-bit floats. There is no a documented way for bit perfect playback of recordings with 24-bit or 32-bit integer samples. It also means, there is no a way to playback DSD neither natively, nor via DoP, because they require 24 or 32 bit integer samples.
For bit perfect playback, DAP manufacturer may either extend Android API, or directly talk to ALSA. For 3rd party apps, direct access to ALSA is only possible if it is allowed by the firmware.
USB Audio is the only well-documented way for bit perfect playback of any sample rate and any format, including DSD.