What is the sound architecture in Android. Is it the same as in Linux? I mean virtually every linux distributions use ALSA, so do android also use ALSA as sound driver?
Ok, so, I did a little bit of search and this is what I found.
Android, on the kernel level, uses ALSA or its alternative OSS (Open Sound System) to speak to the Hardware.
HAL (Hardware Abstraction Layer) sits on the top of Kernel which is a purely android implementation that communicates with the Kernel. Apparently, apps can't directly talk to ALSA/OSS as they do in Linux. Only HAL provides interfaces that audio services can call and work with.
And then there are few more frameworks and abstraction layer between HAL and the interface that the actual code of applications use. This layer is called Application framework.
This page has good illustration of the these layers.