Linux audio alsa-uda134x driver documentation reading II (clock)

Source: Internet
Author: User

From: http://blog.chinaunix.net/uid-22917448-id-1765503.html


Audio Clocking
Audio clock
====================

This text describes the audio clocking terms in ASoC and digital audio in
General. Note: Audio clocking can be complex!
This document describes the ASoC and audio clock terms in digital audio.

Master Clock
Master Clock
------------

Every audio subsystem is driven by a master clock (sometimes referred to as MCLK
Or SYSCLK). This audio master clock can be derived from a number of sources
(E.g. crystal, PLL, CPU clock) and is responsible for producing the correct
Audio playback and capture sample rates.
Each Digital Audio Subsystem is driven by the main clock (sometimes called MCLK or SYSCLK ). The main audio clock can be derived from multiple sources (such as crystal oscillator, Phase-lock loop, and processor clock ). Generates correct audio playback and capture sampling rates.

Some master clocks (e.g. PLLs and CPU based clocks) are retriable in that
Their speed can be altered by software (depending on the system use and to save
Power). Other master clocks are fixed at a set frequency (I. e. crystals ).
Some master clocks are configurable (such as Clock Based on a phase-locked loop or processor), and they can change speed through software (depending on system applications and power-saving considerations ). Other main clocks are fixed at a specific frequency value (such as Crystal Oscillator ).

DAI Clocks
Digital Audio clock
----------
The Digital Audio Interface is usually driven by a Bit Clock (often referred
As BCLK). This clock is used to drive the digital audio data transmission ss the link
Between the codec and CPU.
The digital audio interface is usually driven by a single-bit clock (usually recorded as BCLK ). This clock is used to drive the transmission of digital audio data between the decoder and the processor.

The DAI also has a frame clock to signal the start of each audio frame. This
Clock is sometimes referred to as LRC (left right clock) or FRAME. This clock
Runs at exactly the sample rate (LRC = Rate ).
The digital audio interface also has a frame clock to indicate the start of a frame of audio. The clock is sometimes recorded as LRC (left right clock) or frame. The clock strictly works on the sampling rate.

Bit Clock can be generated as follows :-
Bit Clock can be generated as follows:

Bclk = mclk/x

Or

Bclk = LRC * x

Or

Bclk = LRC * channels * Word Size

This relationship depends on the codec or soc cpu in particle. In general
It is best to configure bclk to the lowest possible speed (depending on your
Rate, number of channels and word size) to save on power.
This relationship depends on the decoder, especially the on-board processor. In general, it is best to reduce the bit clock speed as low as possible (depending on your sampling rate, number of channels and Word Length) to save power.

It is also desirable to use the codec (if possible) to drive (or master)
Audio clocks as it usually gives more accurate sample rates than the CPU.
If possible, it is better to use a decoder to drive (or control) the audio clock, because it usually gives a higher sampling rate than the processor.

Gentleman note:
What you are reading now is the document translation written by the gentleman when reading the Linux audio SOC driver.
The gentleman writes some translations. On the one hand, it serves as his own notes to help his memory, and on the other hand, he hopes to help others.
If you are able to get something from the gentleman's translation, I am very pleased.
All the original documents are all in the linux-2.6.30/Documentation/sound/alsa/soc directory.
Since the gentleman does not know much about the audio content, I do not understand it in many places, but just translated it in the original article.
Here, the guests who are willing to visit are not necessarily correct.
Zhang Jun again.

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.