[alsa-devel] Multiple codecs on one sound card for multi-channel sound card

Caleb Crome caleb at crome.org
Thu Sep 10 20:26:17 CEST 2015


Hi Mark Brown,
    Looking back on my email notes, you helped me with this back in 2011
with an old kernel version.  I wonder if mutlti-codec-on-single-DAI
configuration is still unsupported by the ASOC core.  I don't see anything
obvious.

If I were to implement it 'properly', what's the right DTS format to go
with?  Something like what I suggest below (i.e. in the simple-audio-card
section, use multiple codecs in a single sound-dai?  If so, where should
the tdm-slot & clocking information go?  In the codec DTS section itself,
or in the sound-dai section?

Thanks again,
 -Caleb



On Tue, Sep 8, 2015 at 6:02 PM, Caleb Crome <caleb at crome.org> wrote:

> Hi all,
>    What's the current best practices to specify multiple codecs on one
> sound card, with all codecs sharing a single TDM bus?
>
> I have a card with up to 32 TLV320AIC33 codecs on it.  For the moment, we
> can limit the discussion to only 16 codecs, so we don't have to get extra
> serializers involved...
>
> I currently have something like this in my am335x-boneblack.dts file:
>
> (i.e. attempting to set tdm slot width and num in the i2c codec)
>
> but it doesn't seem to be pickin up the fact that I want all the codecs
> linked together as one.
>
> (FYI, the first codec, i.e. tlv32aic3x_a should be the master, and all
> others including the CPU will be slaves).
>
> Thanks for any help!
>
> BTW, I'm happy to use whatever kernel will support me with the minimal
> amount of effort!
>
> Sincerely,
>   -Caleb
>
>
> &i2c1 {
> clock-frequency = <100000>;
> status = "okay";
> pinctrl-names = "default";
> pinctrl-0 = <&i2c1_pins_default>;
> status="okay";
>
> tlv320aic3x_a: tlv320aic3x at 18 {
>        #sound-dai-cells = <0>;
> compatible = "ti,tlv320aic3x";
> reg = <0x18>;
> status = "okay";
> dai-tdm-slot-width = <16>;
> dai-tdm-slot-num   = <0>;
> };
> tlv320aic3x_b: tlv320aic3x at 19 {
>        #sound-dai-cells = <0>;
> compatible = "ti,tlv320aic3x";
> reg = <0x19>;
> status = "okay";
> dai-tdm-slot-width = <16>;
> dai-tdm-slot-num   = <2>;
> };
> tlv320aic3x_c: tlv320aic3x at 1a {
> compatible = "ti,tlv320aic3x";
> reg = <0x1a>;
> status = "okay";
> dai-tdm-slot-width = <16>;
> dai-tdm-slot-num   = <4>;
> };
> tlv320aic3x_d: tlv320aic3x at 1b {
> compatible = "ti,tlv320aic3x";
> reg = <0x1b>;
> status = "okay";
> dai-tdm-slot-width = <16>;
> dai-tdm-slot-num   = <6>;
> };
> };
>
> sound {
>      compatible = "simple-audio-card";
>      simple-audio-card,name = "puck audio";
>      // simple-audio-card,widgets=
>      // simple-audio-card,routing=
>      simple-audio-card,mclk-fs = <256>;
>      status="okay";
>      simple-audio-card,bitclock-master = <&tlv320aic3x_a>;
>      simple-audio-card,frame-master    = <&tlv320aic3x_a>;
>      simple-audio-card,dai-link at 0 {
>           format = "left_j";
>   cpu {
>     sound-dai = <&mcasp0 0>;
>   };
>
> // *** Here's where I'm really confused -- this part doesn't seem to be
> supported to
> // have all the codecs on a single DAI.
> // The examples given  seem to be for different codec DAIs
> // sharing a single CPU DAI, but not used at the same time.
>
>   codec {
>     #sound-dai-cells = <0>;
>     sound-dai          = <
>     &tlv320aic3x_a
>     &tlv320aic3x_b
>     &tlv320aic3x_c
>       &tlv320aic3x_d
>     >;
>   };
>      };
> };
>
>


More information about the Alsa-devel mailing list