Overview of Debugging sound card drivers under Android

Source: Internet
Author: User

The audio system in Android is using the ALSA system architecture. Asoc--alsa System on Chip, is built on the standard ALSA drive layer, in order to better support

A software system for audio codec in embedded processors and mobile devices, ASOC is divided into three parts: machine, platform and codec in audio device drivers.

Codec part: Responsible for audio decoding, this part of the code is completely non-platform-independent (the device is provided by the original), it contains some audio control (controls), audio connection

damp (Dynamic audio power management) and codec IO capabilities. To ensure hardware independence, any platform-specific code is moved

To the platform and machine drivers.

Platform section: Contains the configuration and control of the audio DMA and audio interface of the platform (I2S,PCM,AC97, etc.), and the code associated with the processor chip .

Machine part: Is the code that is coupled with platform and codec drivers while interacting with the upper layer. Because the upper layer is the standard ALSA architecture, the lower interface must be done

Unified, this part by machine itself platform drive and platform equipment (please distinguish with the above platform Drive), platform Drive

The kernel has been completed, so there is no need to care too much about how to alsa with the top of the problem, we only need to register a machine platform

Equipment and complete platform and codec coupling.

1. ALSA Equipment File Structure

ControlC0 for sound card control, such as channel selection, mixing, microphone control, etc.;

PCMC0D0C PCM equipment for recording;

pcmc0d0p the PCM device used for playback;

Timer timers.

Where c0d0 represents the device in sound card 0 0,pcmc0d0c The last C represents the capture,pcmc0d0p last p represents playback, which are

The naming rules in Alsa-driver.

2. alsa File directory structure overview

Sound/core: This directory contains the core drivers for the middle tier, Alsa. Those local ALSA modules remain in this directory. Some subdirectories contain those that are configured with the kernel

Related to the different modules.

Sound/core/oss: The module on the OSS simulation of PCM and mixer is stored in this directory.

SOUND/CORE/SEQ: The code related to the sequencer.

Kernel/include/sound:alsa driver Common header file directory, the header file of the directory needs to be exported to the user space of the application to use, usually drive the module private

Some header files should not be placed here.

Sound/drivers: This directory contains portions of the files that are shared by different drivers in different architectures of the system. Common code that is not related to the CPU, bus architecture.

SOUND/I2C: This directory contains ALSA's own I²c control code. Although Linux has an I²C standard protocol layer, ALSA still owns it for some card-specific

I²c code, because some sound cards just need some simple operation, and the standard I²C API function is too complicated.

SOUND/PCI: This catalog file is responsible for the PCI sound card and some PCI bus upper card modules. Some simple driver files are saved under the PCI directory, while some compare

Complex drivers that contain multiple program files are placed in a separate subdirectory under the PCI directory (for example: emu10k1,ice1712).

Sound/isa The directory file is the upper card module that handles the ISA sound card.

SOUND/ARM,SOUND/PPC, and Sound/sparc here are some of the top-level card modules associated with chip architectures.

Sound/usb This directory contains some usb-audio drivers.

The Sound/pcmcia PCCard drive will be put here. The CardBus driver will be placed in the PCI directory because API functions and standard PCI cards are unified.

Sound/soc the middle-tier code for the System-on-chip system.

Sound/soc/codecs the various codec codes for the SOC system, regardless of the platform.

Overview of Debugging sound card drivers under Android

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.