Linux Audio alsa-uda134x driver Analysis II (clock)

Source: Internet
Author: User

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 article describes the audio clock terms in ASOC and digital audio in general.

Note:audio Clock is a very complicated stuff.


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 being derived from a number of sources (e.g. crystal, PLL, CPU clock) and are responsible for PROD Ucing the correct
Audio playback and capture sample rates.
Each digital audio sub-The system is driven by the master clock (sometimes referred to as MCLK or SYSCLK). The audio master clock can be derived from a variety of sources (such as crystal oscillator, PLL, processor clock). Responsible for generating the correct audio playback and capture sampling rate.

Some master clocks (e.g. PLLs and CPU based clocks) is configurable in
Their speed can is altered by software (depending on the system with and to save
Power). Other master clocks is fixed at a set frequency (i.e. crystals).
Some master clocks are configurable (such as PLL or processor-based clocks) that can be changed by software speed (depending on system application and power-saving considerations). Other master clocks are fixed to a specific frequency value (such as a crystal oscillator).
  • Master Clock Driver
  • Master Clock Configurable
  • Can be controlled by software to achieve the purpose of saving electricity

Digital Audio Clock
----------
  • DAI via bit clock BCLK drive
  • DAI is also driven by the frame clock
  • Frame clock LRC or frame.
  • The frame clock and sample rate are the same
The Digital Audio Interface is usually driven by a Bit Clock (often referred
As BCLK). This clock was used to drive the digital audio data across the link
Between the codec and CPU.
Digital audio interfaces are often driven by a bit clock (usually written as BCLK). This clock is used to drive digital audioThe transmission of data between the decoder and the processor.

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

Bit Clock can be generated as follows:-
The bit clocks can be produced in the following ways:

BCLK = mclk/x

Or

BCLK = LRC * x

Or

BCLK = LRC * Channels * Word Size

This relationship depends on the codec or SoC CPU in particular. In general
Configure BCLK to the lowest possible speed (depending on your
Rate, number of channels and word size) to save on power.
This relationship relies on decoders, especially on board processors. In general, it is best to save the bit clock as low as possible (depending on your sampling rate, number of channels, and word length).

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

Linux Audio alsa-uda134x driver Analysis II (clock)

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.