1、用户空间代码位置
The following is a list of directory paths in the user space where the code related to audio is located for the debugging and customization
//hardware/qcom/audio/hal/msm8974 – Contains the audio Hardware Abstraction Layer (HAL)-related code
//external/tinyalsa/ – Contains the code related to tinymix, tinyplay, and tinycap
//hardware/qcom/audio/mm-audio – Contains the implementation of QTI OMX components for the audio encoder and decoders
/frameworks/av/media/libstagefright/ – Contains the source code of Stagefright implementation from Google.
/frameworks/av/services/audioflinger/ – Contains the source code for AudioFlinger that manages audio streams from the user space
/vendor/qcom/proprietary/mm-audio/ – Contains the code related to the Audio Calibration Database (ACDB) driver, parsers for DTS and AC3, surround sound, and so on.
/external/bluetooth/bluedroid/ – Contains the code related to Bluetooth A2DP used in a QTI platform; the android_audio_hw.c file contains the A2DP audio HAL implementation
/hardware/libhardware/modules/usbaudio/ – Contains the USB HAL implementation for a USB dock use case Linux Android Audio Customization and Debugging Guide Overview 80-NA157-193 F Confidential and Proprietary – Qualcomm Technologies, Inc. 15 MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION
/vendor/qcom/proprietary/wfd/mm/source/framework/src/ – Contains the Wi-Fi Display (WFD) frameworks-related code; WFDMMSourceAudioSource.cpp configures the RT Proxy port via ALSA APIs and gets the PCM data from the audio layer
/system/core/include/system/ – Contains audio.h and audio_policy.h that contain enum definitions and inline functions used all over the code for audio in the user space
/frameworks/base/media/java/android/media/ – Contains .java files for audio that expose APIs by Android applications written in Java 2.1.2 Kernel space audio code The following is a list of directory paths in the kernel where the code related to audio is located for debugging and customization:
/kernel/sound/soc/msm/ – Contains the msm8974.c machine driver /kernel/sound/soc/msm/qdsp6v2 – Contains the source code for the platform drivers, front end (FE), and back-end (BE) DAI driver, Hexagon DSP drivers for AFE, ADM, and ASM, voice driver, and so on.
/kernel/sound/soc/soc-*.c – All the SoC-*.c files provide information on the ALSA SoCs framework
/kernel/drivers/slimbus/ – Contains the source for the SLIMbus driver
/kernel/arch/arm/mach-msm/ – Contains some files such as acpuclock-8974.c, board-8974-gpiomux.c, board-8974.c, and clock-8974.c related to the GPIO, clock, and board-specific information on the MSM8974
/kernel/arch/arm/mach-msm/qdsp6v2/ – Contains the drivers for DSP-based encoders and decoders, code for the aDSP loader, APR driver, Ion memory driver, and other utility files
//LINUX/android/kernel/arch/arm/boot/dts – Contains MSM8974-*.its and MSM8974-*.Dtsi files that contain MSM8974-specific information; audio-related customization is available in files such as MSM8974.dtsi, msm8974-mtp.dtsi, and msm8974-cdp.dtsi
/LINUX/android//kernel/sound/soc/codecs/ – Contains the source code for the codec driver for WCD9320; codec driver-related source files are wcd9320.c, wcd9xxx-mbhc.c, wcd9xxx-resmgr.c, wcd9xxx-common.c, and so on.
//LINUX/android/kernel/drivers/mfd/ – Contains the source code for the codec driver; wcd9xxx-core.c, wcd9xxx-slimslave.c, and wcd9xxx-irq.c are the codec driverrelated files