Dai:digital Audio interfaces (hardware interface for audio devices)

Source: Internet
Author: User

1 PCM Interface
For different digital audio subsystem, there are several interfaces between microprocessor or DSP and audio devices for digital conversion. The simplest audio interface is the PCM (Pulse coded modulation) interface, which consists of a clock pulse (BCLK), a Frame sync signal (FS), and a receive data (DR) and send data (DX). At the rising edge of the FS signal, the data transfer begins with the word MSB (Most significant Bit), and the FS frequency equals the sampling rate. After the FS signal begins the transmission of the data word, the individual data bits are transmitted sequentially, and 1 clock cycles transmit 1 data words. When sending MSB, the level of the signal is minimized to avoid the loss of MSB in different terminal interfaces using different data schemes.
The PCM interface is easy to implement, in principle to support any data scheme and any sample rate, but requires each audio channel to obtain a separate data queue.
2 IIS Interface (ie I2S interface)
The IIS interface (Inter-ic Sound) was first used by Philips in the 1980s to consume audio and, in a signaling mechanism called the LRCLK (Left/right CLOCK), was converted to a single data queue by a multi-channel conversion of two audio signals. When the LRCLK is high, the left channel data is transmitted, and the right channel data is transmitted when the LRCLK is low. Compared with PCM, IIS is more suitable for stereo systems. For multichannel systems, it is possible to execute several data queues in parallel under the same BCLK and lrclk conditions.
3 AC97 Interface
AC ' Audio Codec 1997 is a common specification of Intel, Creative Labs, NS, analog device and Yamaha, which is led by Intel's five PC manufacturers. Unlike PCM and IIS, AC ' 97 is not just a data format for the internal architectural specification of audio coding, it also has control capabilities. AC ' 97 is ac-link with an external codec, and the Ac-link interface includes a bit clock (BITCLK), Synchronous signal correction (sync), and data queues encoded to the processor and decoded from the processor (Sdatdin and sdataout). The AC ' 97 data frame starts with the sync pulse, including 12 20-bit time periods (the different purpose services defined in the standard time period) and 16-bit "tag" segments, totaling 256 data sequences. For example, the time period "1" and "2" are used to access the encoded control registers, while the time period "3" and "4" load the left and right two audio channels respectively. The "tag" section indicates which of the other segments contains valid data. Dividing a frame into a time period makes it possible for transmission control signals and audio data to reach 9 audio channels through only 4 lines or to convert to other data streams. AC ' 97 significantly reduces the overall number of pins compared to the IIS scheme with the detach control interface. In general, the AC ' 97 codec uses TQFP48 encapsulation.

PCM also supports time division Multiplexing (TDM) in-several devices can use the bus simultaneously (this is Sometim ES referred to as network mode).


asla-advanced Sound Linux Architecture

OSS-previous Linux audio architecture, replaced by ASLA and compatible

Codec-coder/decoder

Communication protocol/interface/bus between I2S/PCM/AC97-CODEC and CPU audio

Dai-digital Audio Interface is actually i2s/pcm/ac97

Dac-digit to Analog conversion

Adc-analog to Digit conversion

Dsp-digital Signal Processor

Mixer-Mixer mixes several audio analog signals from different channels into an analog signal

Mute-silencing, shielded signal channel

Pcm-pulse Code modulation a technique for converting audio analog signals into digital signals, different from PCM audio communication protocols

Sampling Frequency-ADC frequency, number of samples per second, typical values such as 44.1KHZ

Quantization precision-for example, 24bit, is to divide the audio analog signal according to 2 of the 24 Time Square

Ssi-serial Sound Interface

Dapm-dynamic Audio Power Management

Audio Codec codec is responsible for processing audio information, including ADC,DAC,MIXER,DSP, input and output, and volume control for all audio-related functions.

Codec communicates with the processor via the I2C bus and the digital audio interface Dai.

I2C bus-To achieve the codec register data reading and writing.

DAI-realizes the communication between the CPU and the codec audio data.

With codec as the research object, its input has mic (microphone), Phonein telephone signal and so on, output has headphone hp (headphone), speaker speaker and phoneout telephone signal. Also note the input and output of audio digital signals between the codec and CPU terminals.

1) Playing music

2) Recording

3) Telephone

---call------to answer---

4 Call via Bluetooth

---call------to answer---

2. System Architecture

The Android audio system has a more standard and robust architecture, from top applications, Java framework Services Audiomananger, Local service Audioflinger, abstraction layer Alsahal, local libraries, Then call the external alsa-lib external support library, finally to the bottom-driven codec, can be described as "spite".

Taking the system startup Auidoflinger as an example, the paper briefly explored the organizational structure of ALSA sound.

The Java service Audiomanager as the server, the local service Audioflinger as the client, and the two interact through the binder mechanism. Audioflinger the implementation of hardware functions (such as SetMode set up phone/Bluetooth/recording mode) to the hardware abstraction layer Alsahal complete. The abstraction layer can invoke the local standard interface, such as Masladevice->route, or call the Alsa-lib library directly to manipulate the underlying driver.

Linux's audio drive structure is relatively complex, the source code is located in the kernel directory of the/sound/soc/, where the/codec folder with platform-Independent codec driver,/imx folder stored in the Freescale IMX platform-related audio drivers, Mainly can be divided into SSI drive and Dai Drive.

To the sound card-driven data structure as the cut-in point analysis,

1) struct SND_SOC_CODEC-is implemented by a platform-independent codec drive.

2) struct Snd_soc_platform-by Dai Drive related to IMX platform, mainly realizes the DMA transmission function of audio data.

3) struct Snd_soc_dai_link-the platform-related DAI is associated with platform-independent codec.

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.