tags: Android underlying development android framework Android audio subsystem
Audio audio subsystem is one of the important subsystems of the Android Framework and one of the most complex subsystems. It is responsible for the audio data streaming and control functions in Android, as well as the management of audio equipment. A complete Android audio system architecture is shown below:

Application layer, call the app or settings of audio service, such as: audio and video player, making phone calls, recording/video recording, volume setting, etc.
The Framework layer includes java and c++, and calls each other through the jni mechanism. It is mainly divided into the following three layers:
Framework java layer provides java interface called by APP. The code location of this layer is **[frameworks/base/media/java/android/media]**, which mainly includes:
The Audio JNI layer is a bridge between the audio application framework and the local framework. The C++ layer code can be called through the JNI layer. It is equivalent to a bridge that makes the java function interface and the c++ function interface one-to-one correspondence. The corresponding directory is **[framewoks/ base/core/jni and frameworks/base/core/jni】**
Native Framework is written in C++ language, and is called by the Framework java layer through jni conversion. It is divided into client and server parts, which correspond to the playback, recording interface, sound control, and settings in the Framework java layer.
Client:【frameworks/av/media/libaudioclient】
Server: [Frameworks/av/services/audioflinger] compiled into libaudioflinger library, running in AudioServer system process
The HAL layer is the object that AudioFlinger accesses downwards. The manufacturer will implement its own interface layer at this layer, bridge the hardware driver and the upper framework, and the formed file will be compiled into audio.primary., audio.a2dp. and other so library files for audio Module loading.

ALSA is the abbreviation of Advanced Linux Sound Architecture, and is a driver framework for linux sound cards. OSS is similar. In short, the sound card is a piece of external hardware used for playba...
In the previous section, we mentioned that ASoC is divided into three parts: Machine, Platform, and Codec. The Machine driver is responsible for the coupling between Platform and Codec, as well as par...
Audio framework for Android audio system April 13, 2013 11:58:12Lin Xuesen Reading number: 36305More Personal classification:Android column Column:Thinking In Android 1.1 Audio Framework Reprint, plea...
The audio part has always been one of the difficulties in linux/android development. The audio system used in the early days of LINUX is OSS (Open Sound System). For various reasons (you can GOOGLE), ...
There are several types of data services provided in Android: mobile data networks, WIFI, hotspots, network cables, and so on. These data services can be used independently, but at the same time, only...
As we all know, Vue is a front-end framework. Then the first question arises, what is a framework? Framework refers to a set of excellent code that can be used repeatedly (software semi-finished produ...
Recently, the blogger has moved, but it hasn't changed in a few days. Now I will share with you a very small framework, mini_web, and tell you what it means. The idea is not difficult, first analyze t...
Specific instructions and source code about Gin:https://github.com/gin-gonic/gin 1. Installation Command line input:go get github.com/gin-gonic/gin Installation location: the global lib directory conf...
Architecture Workflow Controller rule: The first letter of the controller file name is capitalized and ends with Controller The controller class must inherit the Controller class, use yii\web\Controll...
Remind, pure personal notes, you may see dizzy Sixth, HAL layer 6-1, Audio HAL layer, in fact, including audio.xxx.so and audiopolicy.so. From the above-mentioned general framework diagram, there are ...