TEXT   20

arm m asoc dt bindings

Guest on 28th May 2022 03:04:26 PM

  1. ALSA SoC Device Tree Bindings
  2. --or--
  3. how best to teach the kernel how to make noises
  4.  
  5. Overview:
  6. Currently, sound hardware driven with the ASoC infrastructure uses per-machine
  7. code to lay out and connect the drivers for the individual devices (codecs,
  8. digital interfaces, dma, gpio, etc).  This session is to discuss the
  9. complexities associated with typical audio hardware (in particular CE devices)
  10. and what parts of the audio description can be parameterized and exported into
  11. the device tree data structure.  The expectation is doing so will significantly
  12. reduce the amount of machine specific code and simplify the process of bringing
  13. up new audio hardware.
  14.  
  15. Objectives:
  16.  * assess complexity of various ASoC devicesgobby.ubuntu.com
  17.  * work towards a set of binding specifications
  18.  
  19. ASoC Overview
  20.  * separation of components (codec driver, SoC driver, machine driver)
  21.  * machine driver specifies overall structure
  22.   * based on standard platform device
  23.   * machine-specific C code
  24.  * a lot of re-use within ASoC
  25.   * "usually SoC vendor will write DMA + i2s, AC97"
  26.  
  27. Complexities
  28.  * codecs may be reconfigured
  29.  * interaction amongst components
  30.  * fixups generally specific to consumer devices
  31.  
  32. Device tree scratchpad:
  33.  
  34. / {
  35.         sound {
  36.                 compatible = "<vendor>,<machine>-audio", "<old-vendor>,<old-machine>-audio";
  37.                 i2s-links = <&i2s 0 &codec 0, &dma>; // bus+channel attached to codec+channel
  38.         };
  39.  
  40.  
  41.         i2s {
  42.                 compatible = "fsl,imx51-i2s";
  43.                 ....
  44.         };
  45.  
  46.  
  47.         i2c {
  48.                 i2s-codec {
  49.                         compatible = "<vendor>,<part-number>"
  50.                         ...
  51.                 }
  52.         };
  53. };
  54.  
  55. Basic proposals:
  56.  * top-level, virtual "sound" node to represent each ALSA "card"
  57.   * contains references to codec & bus nodes
  58.  
  59. Routing?
  60.  * multiple inputs, multiple outputs, many configurations of muxing
  61.  * master/slave
  62.  
  63. ALSA quirking:
  64.  * runtime & static
  65.  * codecs have tables of static data used for quirking
  66.  * ~20% of quirks require new C code
  67.   * eg headphone switching events
  68.  
  69.  
  70. ACTION ITEMS:
  71.  * [glikely] coorindate with Timur about fsl (powerpc) ASoC implementation
  72.  * begin documentation on the devicetree.org wiki for ASoC expert review (#alsa-soc)
  73.  * [jk-ozlabs] look at post-boot device tree infrastructure, to allow drivers to access of_* API

Raw Paste


Login or Register to edit or fork this paste. It's free.