This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM62P: Adding Audio Codecs

Part Number: AM62P

Hi, I'm developing a project that uses these two audio codecs

TLV320ADC3101IRGER
TLV320DAC3203IRGE

How can I include then into my device tree is there an example? and which compatible driver can I use?
I'm developing for AM62P Embedded Linux 6.6.


BR,

  • Hi Sergi,

    Please refer the device tree bindings for each of these in the below links:

    https://www.kernel.org/doc/Documentation/devicetree/bindings/sound/ti%2Ctlv320adc3xxx.yaml

    https://www.kernel.org/doc/Documentation/devicetree/bindings/sound/ti%2Ctlv320aic32x4.yaml

    Also, you can probably use both as multiple dai links or two single dai links interfaced two MCASPs of AM62P

    -------------------------------------------
    Example 1 - single DAI link:
    -------------------------------------------
     
    sound {
        compatible = "simple-audio-card";
        simple-audio-card,name = "VF610-Tower-Sound-Card";
        simple-audio-card,format = "left_j";
        simple-audio-card,bitclock-master = <&dailink0_master>;
        simple-audio-card,frame-master = <&dailink0_master>;
        simple-audio-card,widgets =
            "Microphone""Microphone Jack",
            "Headphone""Headphone Jack",
            "Speaker""External Speaker";
        simple-audio-card,routing =
            "MIC_IN""Microphone Jack",
            "Headphone Jack""HP_OUT",
            "External Speaker""LINE_OUT";
     
        simple-audio-card,cpu {
            sound-dai = <&sh_fsi2 0>;
        };
     
        dailink0_master: simple-audio-card,codec {
            sound-dai = <&ak4648>;
            clocks = <&osc>;
        };
    };

    Multiple DAI Links - Single Card but multiple sub devices:

    -------------------------------------------
    Example 2 - many DAI links:
    -------------------------------------------
     
    sound {
        compatible = "simple-audio-card";
        simple-audio-card,name = "Cubox Audio";
     
        simple-audio-card,dai-link@0 {      /* I2S - HDMI */
            reg = <0>;
            format = "i2s";
            cpu {
                sound-dai = <&audio1 0>;
            };
            codec {
                sound-dai = <&tda998x 0>;
            };
        };
     
        simple-audio-card,dai-link@1 {      /* S/PDIF - HDMI */
            reg = <1>;
            cpu {
                sound-dai = <&audio1 1>;
            };
            codec {
                sound-dai = <&tda998x 1>;
            };
        };
     
        simple-audio-card,dai-link@2 {      /* S/PDIF - S/PDIF */
            reg = <2>;
            cpu {
                sound-dai = <&audio1 1>;
            };
            codec {
                sound-dai = <&spdif_codec>;
            };
        };
    };

    Ref: https://www.kernel.org/doc/Documentation/devicetree/bindings/sound/simple-card.txt

    Hope this helps

    Best Regards,

    Suren

  • Thank you,

    It will be very helpful.

    Best Regards,

    Sergio