overview.txt 3.1 KB

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