http://blog.csdn.net/kunis/article/details/16918937
1,hal definition
The HAL (Hardware abstraction layer) is understood literally, called the hardware abstraction level. It is the cornerstone of the Android framework layer, and all of the hardware needed to operate on top of the Android system requires invoking HAL-related APIs such as GPS,BT, input devices, Graphocs,camera,audio, and so on. Each hardware device's Android system has some functionality, and the HAL of each device is the collection that implements these functions (calling the corresponding driver). If vendor does not want to open source's own driver, some device functions can be implemented on the HAL layer.
2,hal Frame
There are currently two types of HAL frames in the Android system, with the following code:
1) hardware/libhardware_legacy/
2) hardware/libhardware/
1) is the implementation of the old version, is to put all the functions of the HAL layer in a *.so file, and then in the runtime stage through the function call each module directly to manipulate the driver. 2) is the unified encapsulation of all the HAL module APIs, unifying the interface of the upper access HAL.
Android Audio Hal Detailed (one)