The concrete implementation of AudioHardwareInterface
is an implementation decision for a phone vendor- in many cases it's built on alsa
, but doesn't have to be.
Below this level there is a great deal of choice of the SoC platform used (nVidia Tegra3 in Nexus 7 and Samsung Exynos in Nexus 10). The OS is very definitely not the same below this level.
Factors that potentially affect latency include:
- Hardware restrictions on the DMA buffer used for audio - minimum size or requirements for it to be a power-of-two size.
- Minimum buffer sizes enforced by device drivers - justified or not.
- Low-latency means that audio needs servicing more often - all the way up the application stack. Ideally you need to be able to get real-time scheduling for any thread generating audio and the ability to
mlock
the program code and stack in memory. If you can't get this (and I suspect you still can't on Android), the value of latency is chosen such that audio runs reliably most of the time.