overview.txt 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. ALSA SoC Layer
  2. ==============
  3. The overall project goal of the ALSA System on Chip (ASoC) layer is to provide
  4. better ALSA support for embedded system-on-chip processors (e.g. pxa2xx, au1x00,
  5. iMX, etc) and portable audio codecs. Currently there is some support in the
  6. kernel for SoC audio, however it has some limitations:-
  7. * Currently, codec drivers are often tightly coupled to the underlying SoC
  8. CPU. This is not ideal and leads to code duplication i.e. Linux now has 4
  9. different wm8731 drivers for 4 different SoC platforms.
  10. * There is no standard method to signal user initiated audio events (e.g.
  11. Headphone/Mic insertion, Headphone/Mic detection after an insertion
  12. event). These are quite common events on portable devices and often require
  13. machine specific code to re-route audio, enable amps, etc., after such an
  14. event.
  15. * Current drivers tend to power up the entire codec when playing
  16. (or recording) audio. This is fine for a PC, but tends to waste a lot of
  17. power on portable devices. There is also no support for saving power via
  18. changing codec oversampling rates, bias currents, etc.
  19. ASoC Design
  20. ===========
  21. The ASoC layer is designed to address these issues and provide the following
  22. features :-
  23. * Codec independence. Allows reuse of codec drivers on other platforms
  24. and machines.
  25. * Easy I2S/PCM audio interface setup between codec and SoC. Each SoC interface
  26. and codec registers it's audio interface capabilities with the core and are
  27. subsequently matched and configured when the application hw params are known.
  28. * Dynamic Audio Power Management (DAPM). DAPM automatically sets the codec to
  29. it's minimum power state at all times. This includes powering up/down
  30. internal power blocks depending on the internal codec audio routing and any
  31. active streams.
  32. * Pop and click reduction. Pops and clicks can be reduced by powering the
  33. codec up/down in the correct sequence (including using digital mute). ASoC
  34. signals the codec when to change power states.
  35. * Machine specific controls: Allow machines to add controls to the sound card
  36. (e.g. volume control for speaker amp).
  37. To achieve all this, ASoC basically splits an embedded audio system into 3
  38. components :-
  39. * Codec driver: The codec driver is platform independent and contains audio
  40. controls, audio interface capabilities, codec dapm definition and codec IO
  41. functions.
  42. * Platform driver: The platform driver contains the audio dma engine and audio
  43. interface drivers (e.g. I2S, AC97, PCM) for that platform.
  44. * Machine driver: The machine driver handles any machine specific controls and
  45. audio events (e.g. turning on an amp at start of playback).
  46. Documentation
  47. =============
  48. The documentation is spilt into the following sections:-
  49. overview.txt: This file.
  50. codec.txt: Codec driver internals.
  51. DAI.txt: Description of Digital Audio Interface standards and how to configure
  52. a DAI within your codec and CPU DAI drivers.
  53. dapm.txt: Dynamic Audio Power Management
  54. platform.txt: Platform audio DMA and DAI.
  55. machine.txt: Machine driver internals.
  56. pop_clicks.txt: How to minimise audio artifacts.
  57. clocking.txt: ASoC clocking for best power performance.