ASoC

From AlsaProject
Revision as of 17:34, 8 August 2007 by Y2kbug (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Contents

ALSA SoC Layer

The overall project goal of the ALSA System on Chip (ASoC) layer is to provide better ALSA support for embedded system on chip procesors (e.g. pxa2xx, au1x00, iMX, etc) and portable audio codecs. Currently there is some support in the kernel for SoC audio, however it has some limitations:

  • Currently, codec drivers are often tightly coupled to the underlying SoC cpu. This is not really ideal and leads to code duplication i.e. Linux now has 4 different wm8731 drivers for 4 different SoC platforms.
  • There is no standard method to signal user initiated audio events. e.g. Headphone/Mic insertion, Headphone/Mic detection after an insertion event. These are quite common events on portable devices and ofter require machine specific code to re route audio, enable amps etc after such an event.
  • Current drivers tend to power up the entire codec when playing (or recording) audio. This is fine for a PC, but tends to waste a lot of power on portable devices. There is also no support for saving power via changing codec oversampling rates, bias currents, etc.

ASoC is currently still work in progress with most features implemented and support for the PXA2xx, AT91xx and S3C24xx SoC's now in the mainline kernel.

Design

The ASoC layer is designed to address these issues and provide the following features:

  • Codec independence. Allows reuse of codec drivers on other platforms and machines.
  • Easy I2S/PCM audio interface setup between codec and SoC. Each SoC interface and codec registers it's audio interface capabilities with the core and are subsequently matched and configured when the application hw params are known.
  • Dynamic Audio Power Management (DAPM). DAPM automatically sets the codec to it's minimum power state at all times. This includes powering up/down internal power blocks depending on the internal codec audio routing and any active streams.
  • Pop and click reduction. Pops and clicks can be reduced by powering the codec up/down in the correct sequence (including using digital mute). ASoC signals the codec when to change power states.
  • Machine specific controls: Allow machines to add controls to the sound card. e.g. volume control for speaker amp.

To achieve all this, ASoC basically splits an embedded audio system into 3 components:

  • Codec driver: The codec driver is platform independent and contains audio controls, audio interface capabilities, codec dapm definition and codec IO functions.
  • Platform driver: The platform driver contains the audio dma engine and audio interface drivers (e.g. I2S, AC97, PCM) for that platform.
  • Machine driver: The machine driver handles any machine specific controls and audio events. i.e. turing on an amp at start of playback.

Supported SoC's

The following SoC CPU's are currently supported:

  • Intel/Marvell PXA2xx (AC97, I2S & PCM)
  • Atmel AT91xxxx (I2S & PCM)
  • Samsung S3C24xx (AC97 & I2S)
  • Freescale i.MX31 (I2S & PCM)
  • Renesas SH7760 (AC97 & I2S)

The following SoC CPU's are currently work in progress:

  • Marvell PXA3xx (AC97, I2S, PCM)
  • Freescale i.MX21 (I2S)
  • Cirrus EP93xx (I2S)
  • AMD/RMI/Alchemy Au1200/Au1550 (AC97, I2S)

Supported Codec's

As the number of supported audio codecs is growing all the time, this link shows the supported codecs currently in the ASoC development branch.

Development

ASoC development takes place in the dev branch of the ASoC git tree. There is also a ASoC/RoadMap and a developer IRC channel #alsa-soc on freenode.net.

Custom Search
Personal tools
Namespaces

Variants
Actions
Navigation
wiki
Toolbox