Audio Drive Arch

From OMAPpedia

Jump to: navigation, search

Contents

[edit] OMAP4 Audio Design

This page describes the overall OMAP4 Audio architecture. It complies with the ALSA/ASoC model to provide user applications with an industry standard interface to the audio components. The OMAP4 hardware includes the integrated Audio Back End (ABE) processor and the Phoenix (TWL6040) codec to provide complete audio support.

[edit] ALSA System on Chip (ASoc)

Asoc Top Level.jpg


The ASoC layer was designed to better support audio subsystems in embedded system on chip (SoC) platforms. Embedded systems have unique audio needs such as:

In order to provide these features, ASoC drivers are generally split up in to 3 parts:

For more information on ASoC design, see: ASoC - ALSA Project


[edit] Audio Back End (ABE)

Audio arch.jpg

The Audio Back-End module is a sub-system in OMAP4 with dedicated Power domains to support low power Audio use cases. The purpose of the ABE is to handle the audio processing of the application. It means that it will be in charge to receive voice or audio sample either from CPU/DSP or external component (phoenix or other) and send them to the analog part or memories after processing.

The functional responsibilities of the Audio Back-End drivers are:

Audio BackEnd subsystem integrates:


[edit] Codec Driver - Phoenix (TWL6040)

OMAP4 Audio Phoenix.jpg

The Phoenix codec in OMAP4 is the analog part of the audio architecture. It consists of the following components:

Audio output:

Audio input:

The Phoenix codec renders samples at 88.4 KHz and 96 KHz. Handsfree speakers and other paths can only work at 96 KHz, but heaphones has two modes of operation:


There are eight digital input channels on the Phoenix that can be used for rendering audio out to nine different analog outputs. There are 5 McPDM channels (DL0 -> DL4), an I2C channel, and two auxiliary inputs that can be used for the FM radio (AFM0, AFM1). Audio from these inputs can be routed to the various analog outputs on the Phoenix as per the following table:

Output port mapping
DL0 DL1 DL2 DL3 DL4 I2C or Frame(3) AFM0 AFM1
Earphone X(1)              
Left Headset X           X  
Right Headset X X           X
Left HF     X       X  
Right HF     X X       X
Left Auxiliary     X(2)       X  
Right Auxiliary     X(2) X(2)       X
Left Vibrator         X X    
Right Vibrator         X X    


Likewise, the Phoenix has the following 5 analog inputs that can be used for encoding audio. Uplink audio from the Phoenix to the ABE can be transferred over 2 McPDM channels (UL0 and UL1) or via two auxiliary ports, AFM0 and AFM1, which are often used for FM radio audio. The possible mappings of these inputs to uplink channels in to the ABE are as follows:

Input port mapping
UL0 UL1 AFM0 AFM1
Main Microphone, MMIC X      
Sub Microphone, SMIC   X    
Headset Microphone, HSMIC X X    
Left Auxillary/FM radio X   X  
Right Auxillary/FM radio   X   X


[edit] Platform Driver

The Platform Driver the audio interface drivers (McBSP, I2C, McPDM, etc) for the system

Currently supported platform drivers are:


[edit] Machine Driver

In the ASoC model, there is a machine driver that is specific to the system hardware. This is the "glue" that ties the platform and the codec drivers together.

The OMAP4430SDP/Blaze machine driver supports several audio interfaces (Front End):


This assumes the following:


This defines the audio devices as seen by the ALSA layer:

ubuntu@ubuntu:~$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: SDP4430 [SDP4430], device 0: Multimedia null-codec-dai-0 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: SDP4430 [SDP4430], device 2: Voice null-codec-dai-2 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: SDP4430 [SDP4430], device 3: Tone Playback null-codec-dai-3 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: SDP4430 [SDP4430], device 4: VIB-DL null-codec-dai-4 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: SDP4430 [SDP4430], device 5: MODEM null-codec-dai-5 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: SDP4430 [SDP4430], device 6: Multimedia null-codec-dai-6 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: SDP4430 [SDP4430], device 7: HDMI HDMI-7 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: SDP4430 [SDP4430], device 8: Multimedia FM Digital-8 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
ubuntu@ubuntu:~$ arecord -l
**** List of CAPTURE Hardware Devices ****
card 0: SDP4430 [SDP4430], device 0: Multimedia null-codec-dai-0 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: SDP4430 [SDP4430], device 1: Multimedia Capture null-codec-dai-1 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: SDP4430 [SDP4430], device 2: Voice null-codec-dai-2 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: SDP4430 [SDP4430], device 5: MODEM null-codec-dai-5 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: SDP4430 [SDP4430], device 8: Multimedia FM Digital-8 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0

[edit] Multimedia DAI

The Multimedia DAI is used to encode/decode high fidelity audio.

[edit] Voice DAI

The Voice DAI is used to render low fidelity (8 or 16 Khz) audio.

[edit] Tones DAI

The Tones DAI is a used to render generated tones to one of the outputs. Can be single or dual tone generated.

[edit] Vibra DAI

This DAI is used to support haptic feedback through the vibra driver. The Phoenix chipset provides support for using PCM audio data to modulate the vibrators through this DAI. [Feature not implemented yet]

[edit] HDMI DAI

The machine driver provides a DAI for access to the HDMI audio port on the OMAP4. Audio written to this DAI are handed off to the HDMI lib which, in turn, is responsible for writing the audio data out the HDMI port. The HDMI lib is responsible for configuration of the stream to work with the rendering device.

[edit] OMAP4 ASoc Kernel audio driver controls mapping

This section map the kernel control on the OMAP4 HW

ASoC OMAP4.jpg

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox