Android Audio HAL on Hikey


#1

I wanted to ask if there is any reference implementation for Audio HAL layer on Hikey 960. Also which audio driver is recommended to be used on Hikey 960 ? The AOSP reference page lists ALSA and OSS as options.

Thanks.


#2

You can find the hikey960 audio hal in AOSP tree (device/linaro/hikey/audio).
This HAL relies on ALSA (via tinyalsa library).


#3

@Loic I also want to ask if this same HAL code is used when a USB sound card is used for audio. When I read the AOSP documentation ( https://source.android.com/devices/audio/usb#sourceCode ), they mention a usbaudio HAL implementation located at: hardware/libhardware/modules/usbaudio/.


#4

The USB audio HAL is located at the path you specify. Both will be built and installed to the device. Android will select the appropriate one for the scenario. Generally, the USB will have priority, but this could vary based on how they are defined.

If you wish to build a more specialized USB audio HAL, you will need to duplicate it into the device tree, rename it to device specific, and include it in your build scripts.