SoC Audio

From FDTWiki

Jump to: navigation, search

Overview

This page provides a work-in-progress specification for System-on-Chip audio devices.

Objectives

  • Allow separation of components (codec driver, SoC driver, machine driver)
  • Provide for a lot of re-use within ASoC

Driver model:

  • A "machine driver" specifies overall structure
    • based on standard platform device(s) to support standard components
    • plus machine-specific code

Routing

  • Each component may have multiple inputs, multiple outputs, and many configurations of muxing

ALSA quirking:

  • runtime & static
  • codecs have tables of static data used for quirking
  • ~20% of quirks require new C code
    • eg headphone switching events

Design

Bindings:

  • A top-level, virtual "sound" node to represent each ALSA (or other OS audio infrastructure) "card"
    • contains references to codec & bus nodes
    • provides connection information: will need well-defined properties to specify this flexibly
  • Codec & i2s devices kept as separate nodes, to reflect system layout
    • Will need a "template" binding to allow standard specification of inputs & outputs
    • bindings for these devices added as-required

Device tree scratchpad:

 / {
   sound {
     compatible = "<vendor>,<machine>-audio", "<old-vendor>,<old-machine>-audio";
     i2s-links = <&i2s 0 &codec 0, &dma>; // bus+channel attached to codec+channel
   };
   
   i2s {
     compatible = "fsl,imx51-i2s";
     ....
   };
   
   i2c {
     i2s-codec {
       compatible = "<vendor>,<part-number>"
       ...
     }
   };
 };
Personal tools