overview.txt 3.7 KB

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