About Android audio architecture [zz]

Source: Internet
Author: User
Address: http://mp3.zol.com.cn/252/2524723.htm

The rapid rise of Android system, surpassing iOS and Symbian, has become the largest smart device operating system. Its share is also expanding rapidly, and a large number of multimedia devices will adopt this system, is Android suitable for the operating system of audio and video devices? Let's take a look at the android audio architecture today.

Android is based on Linux. Let's take a look at the features of Linux. Linux uses ALSA as its audio architecture. Its full name is advanced Linux sound architecture, which is the meaning of advanced Linux sound architecture. After the core of 2.6, ALSA became the default audio sub-architecture of Linux. Replaces the previous OSS [open sound system, open sound system.



ALSA audio architecture in Linux

ALSA is not easy to understand. It is first a driver library that contains a large number

The sound card is an open-source driver and provides APIs at the core layer to communicate with the Alsa library, while the Alsa library is an application.ProgramThe middle layer for accessing and controlling audio hardware. This middle layer has a standard interface. Developers do not need to consider hardware differences for development, which is of great help to improve development efficiency. ALSA can be backward compatible with OSS because OSS has been eliminated and Its compatible working mode will not be discussed.


ALSA library file in Android system

This system is inherited from Android. Before android2.2 [including 2, 2], you can find a libaudioalsa. So file in the system folder. This is the Alsa library file, which is called by other applications for instructions and data communication with the sound card device. The android audio architecture is essentially different from that of Linux.

In Linux of the desktop version, in order to be compatible with various sound cards, Linux also sets a SRC [Sample Rate Converter, sample frequency conversion] link, when the current sampling rate is lower than 48 khz, force SRC to output at 48 khz. This SRC stage is located in the mixer section of the Alsa plug-in module. Android has made improvements.


Meizu

Meizu M9 smartphone-frequency scan, recording side gain 20 dB


Meizu M9 intelligence

Mobile phone-48 KHz frequency scan, recording side gain 20 dB


HUAWEI Huawei u8800 smartphone-48 KHz frequency scan


Lenovo happy pad

Tablet-48 KHz frequency scan


Malata Wan Lida zpad T8 Tablet

Computer-48 KHz frequency scan


Smartq

Smart device T10 tablet-48 KHz frequency scan

Android adds an audiofinger, which can be simply understood as the standardized plug-in module of the Alsa Audio Subsystem of Android. It contains sub-modules such as audiomixer [mixer] And audioresampler [re-sampling, audioresampler is the SRC we understand. Android has a new name. For SRC, Android has made improvements, but the improvements are not aimed at removing SRC, but are aimed at modifying the default output frequency. Android's SRC target sampling rate is 44.1 kHz, sampling rates other than this value are processed by Src. For example, the output of a signal with a sampling rate of 48 khz is 44.1 kHz, which negatively affects the sound quality. This can be proved by testing.

Comparing these results, we can see that SRC is destructive to sound quality. This problem exists not only in meizu M9. It exists in almost all Android devices.

ALSA is an audio architecture designed for Linux desktops. It is actually not suitable for Smart terminal devices, at least a large number of open-source driversCodeCan be removed. for Android, these are all waste code. A new audio architecture has been enabled since android2.3. It abandons the Alsa architecture that has been used all the time. Therefore, the libaudioalsa. So file is no longer in the system folder.


The ALSA library file is no longer available in the system folder of android2.3.


Audio architecture diagram after Android 2.3

Since Android, the architecture has been modified, and internal code is optimized to remove redundant code. In theory, the system can become more efficient, the new architecture can be understood as a simplified or customized ALSA architecture for Smart terminal devices. Unfortunately, it also has the serious deterioration problem of SRC, which can be proved through tests.


HTC hd2 @ Android 2.3 smartphone-48 KHz frequency scan

Tests show that the new Android 2.3 architecture does not play a positive role in sound quality.


Asus ASUS Eee Pad Transformer tf101 tablet-48 KHz frequency scan

Android 3.0 is designed for tablet computers, and the audio and video experience becomes more important. Is there any new improvement in the sound quality of the new system? The test results are still disappointing.

The Android system outputs the same sampling rate as 44.1khz, which causes many restrictions. It will not be able to play back 96 kHz and 192khz HD Audio programs. A large number of video programs come from

The usage of DVDs or Blu-ray discs is usually 48 khz. When Android devices play back these videos, the sound quality will be greatly reduced.

Theoretically, the software SRC can be replacedAlgorithmTo improve the sound quality, but it is not realistic.

The CPU is mostly arm, and the floating-point computing power of the ARM chip is limited. SRC requires a large amount of floating-point computing resources, even with high-quality SRC algorithms, the computation is at the cost of Device Performance and power consumption, and is not practical.

From the audio architecture and Process Analysis of Android, it can be considered that when playing a music program with a 44.1khz sampling rate, SRC is not triggered, so the sound quality can be ensured. Theoretically, this is true. However, it also has problems. Whether it is the previous ALSA architecture or the architecture improved after android2.3, its driver library is located at the core layer, this means that audio equipment manufacturers and users cannot install drivers like PCs to improve audio quality. Actual tests also show that the sound quality of Android devices is generally different. soomal has a large number of tests to prove this.

Let's look at Ios again. iOS is very closed and we cannot even know the specific structure of its architecture. However, iOS devices do not have the diversity of hardware devices, therefore, it is easier to achieve better sound quality. IOS can achieve targeted development and improvement to achieve better sound quality. The actual situation is the same. So far, there is no Android device with sound quality comparable to any iOS device. In this gap, we think it is not from hardware but an operating system.

The limitations of the android audio architecture make it difficult to become a quality audio and video platform. If you want to design an Android-based HD Audio and Video Player, what you need first is not to design hardware, instead, modify the existing architecture, or simply design a dedicated architecture to replace the general architecture of Android. SlaveSource codeAnalysis: Android and the native Linux base layer support various sampling rates, and open source also makes it have the basis for transformation. Therefore, in the hands of companies with strong technical strength, android can also become Phoenix.

Original article address:

Http://mp3.zol.com.cn/252/2524723.html

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.