Audio codec device tree entries

Jon Smirl jonsmirl at gmail.com
Wed Oct 24 08:29:04 EST 2007


Is this consensus on how the tree should look?

There is no attempt to describe the codec connections inside the
device tree. Instead ASoC handles this by loading a platform specific
fabric driver. A simple example of this is that it is some codecs can
assign the six channel outputs under software control, the platform
specific driver tells which output is wired to the physical output
jacks so that alsa can label them correctly.

I'm still not clear on how to trigger the load of the fabric driver.
Right now I have a single kernel that works on Efika and my target
hardware.  This gets sorted out by define_machine(xxxx). I'll write
some code tonight to figure out how to load drivers and match on
codec0, codec1, etc. But how do I probe for the fabric driver I need
to figure out whether to load the Efika one or my target one.

ac97 at 2000 {           // PSC1
      compatible = "fsl,mpc5200b-psc-ac97","fsl,mpc5200-psc-ac97";
      cell-index = <0>;
      reg = <2000 100>;
      #address-cells = <1>;
      #size-cells = <0>;
      interrupts = <2 1 0>;
      interrupt-parent = <&mpc5200_pic>;
      sound at 0 {
            reg = <0>;
            compatible = "idt,stac9766","ac97-audio"
      };
      modem at 1 {
            reg = <1>;
            compatible = "idt,modem-codec","ac97-modem"
      };
};

------------------------

i2s at 2000 {           // PSC1
      compatible = "fsl,mpc5200b-psc-i2s","fsl,mpc5200-psc-i2s";
      cell-index = <0>;
      reg = <2000 100>;
      interrupts = <2 1 0>;
      interrupt-parent = <&mpc5200_pic>;
};

i2s at 2200 {           // PSC2
      compatible = "fsl,mpc5200b-psc-i2s","fsl,mpc5200-psc-i2s";
      cell-index = <1>;
      reg = <2200 100>;
      interrupts = <2 2 0>;
      interrupt-parent = <&mpc5200_pic>;
};

i2c at 3d00 {
      compatible = "fsl,mpc5200b-i2c", "fsl,mpc5200-i2c", "fsl-i2c";
      #address-cells = <1>;
      #size-cells = <0>;
      cell-index = <0>;
      reg = <3d00 40>;
      interrupts = <2 f 0>;
      interrupt-parent = <&mpc5200_pic>;
      fsl5200-clocking;

      codec0: i2s-codec at 0 {
            compatible = "ti,tas5508";
            reg = <0>;
            i2s-handle = <&i2s at 2000>;
      };
      codec1: i2s-codec at 1 {
            compatible = "ti,tas5508";
            reg = <1>;
            i2s-handle = <&i2s at 2000>;
      };
      codec2: i2s-codec at 2 {
            compatible = "wolson,wm8750";
            reg = <2>;
            i2s-handle = <&i2s at 2200>;
      };
};




-- 
Jon Smirl
jonsmirl at gmail.com



More information about the Linuxppc-dev mailing list