• Like
  • Save
Linux audio for smartphones
Upcoming SlideShare
Loading in...5

Thanks for flagging this SlideShare!

Oops! An error has occurred.

Linux audio for smartphones


A brief introduction to the Linux audio stack for smartphones. …

A brief introduction to the Linux audio stack for smartphones.

Presented at ELC/Android Builders Summit 2011

Published in Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads


Total Views
On SlideShare
From Embeds
Number of Embeds



Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

    No notes for slide


  • 1. Linux Audio for SmartphonesA b i f i t d tiA brief introductionwww.wolfsonmicro.com1 April 2011© 2011 Wolfson Microelectronics plc
  • 2. Overview• Modern smartphone audio subsystemsdi i l b dd d l i• Traditional embedded OS solutions• ASoC – the Linux solutionD i i• Design overview• Brief introduction to chip drivers• Walk through of system audio driver construction• Walk through of system audio driver construction• Future directionswww.wolfsonmicro.com2 © 2011 Wolfson Microelectronics plc April 2011
  • 3. Modern smartphone audio subsystemsHDMICPU MixingEarpiece SpeakerCPU MixingHeadset DockBluetoothCellulardmodemwww.wolfsonmicro.com3 April 2011© 2011 Wolfson Microelectronics plc
  • 4. Flexibility and complexitywww.wolfsonmicro.com4 © 2011 Wolfson Microelectronics plc April 2011
  • 5. Android audio stackwww.wolfsonmicro.com5 © 2011 Wolfson Microelectronics plc April 2011
  • 6. Traditional software driver modelMemory Processing OutputMemory Processing Outputwww.wolfsonmicro.com6 © 2011 Wolfson Microelectronics plc April 2011
  • 7. Traditional software model• Monolithic driver for entire subsystem• N t t f i ff CPU h d• No structure for managing off‐CPU hardware• Very little reuse• Detailed register level knowledge of componentsDetailed register level knowledge of components• Time consuming• Tight coupling between application and kernel codeTight coupling between application and kernel codewww.wolfsonmicro.com7 © 2011 Wolfson Microelectronics plc April 2011
  • 8. The Linux solution• ASoC embedded audio framework• P id t d d ALSA i t f t li ti• Provides standard ALSA interface to applications• Merged since 2.6.21, April 2007• Reusable drivers for each chipReusable drivers for each chip• CPU audio interface, DMA controller and “CODEC”• Minimal per‐system drivers linking themMinimal per system drivers linking them• Automatic and transparent power management• Configuration done by applicationsConfiguration done by applications• Allows interactive tuning of system• Keeps flexibility for application layer• More reuse, less couplingwww.wolfsonmicro.com8 © 2011 Wolfson Microelectronics plc April 2011
  • 9. Dynamic Audio Power Management• Looks for audio paths connecting inputs to outputsl i i h• Powers only components in an active path• Automatically activates DACs and ADCsDAC SpeakerMixerFM radio Headsetwww.wolfsonmicro.com9 © 2011 Wolfson Microelectronics plc April 2011
  • 10. ASoC CODEC driver• Four classes of control• A di i t l ( l ff t )• Audio processing controls (eg, volume, effects)• Audio routing controls (DAPM controls and routes)• Power controls (DAPM widgets, bias)Power controls (DAPM widgets, bias)• Stream control (Digital audio streaming)• Mostly direct mapping into register mapy pp g g p• SOC_DOUBLE_R_TLV("DAC1 Volume", WM8994_DAC1_LEFT_VOLUME,WM8994_DAC1_RIGHT_VOLUME, 1, 96, 0, digital_tlv),www.wolfsonmicro.com10 © 2011 Wolfson Microelectronics plc April 2011
  • 11. Application layer integration• CPU audio stream management provided by the OS• A di Fli P l A di• AudioFlinger or PulseAudio• Determine and apply use case• Run external utilities simple but slow• Run external utilities – simple but slow• Call raw ALSA control APIs – maximum control, maximum effort• Apply settings with ALSA UCM – standard configuration file formatpp y g g• Stream audio• ALSA PCM APIwww.wolfsonmicro.com11 © 2011 Wolfson Microelectronics plc April 2011
  • 12. System integration walkthrough“Baseband” HeadsetSpeakerS3C6410WM8996CODECMicsWM9081Amplifier Subwooferhttp://opensource.wolfsonmicro.com/content/speyside‐audiophttp://opensource.wolfsonmicro.com/content/speyside audiowww.wolfsonmicro.com12 © 2011 Wolfson Microelectronics plc April 2011
  • 13. Future directions• Nicer handling of digital basebandsf• Greater use of DSP• Enhanced features – ambient noise cancellation, beam forming, echo cancellation, offloaded decompression, speaker compensationecho cancellation, offloaded decompression, speaker compensation• Even more dynamic reconfiguration of the audio subsystem• Coefficient management and in‐system calibrationg y• Use case development and management• Greater adoption of UCM• User interfaces for configuration development• ASoC conference, 4th‐5th May• http://www.slimlogic.co.uk/?p=268www.wolfsonmicro.com13 © 2011 Wolfson Microelectronics plc April 2011