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.

Linux/PROCESSOR-SDK-AM437X: TAS2557 codec integration

Part Number: PROCESSOR-SDK-AM437X
Other Parts Discussed in Thread: AM4378, TAS2557, AM4372

Tool/software: Linux

We are trying to Integrated tas2557 on TI's am4378 based custom board. Following are the changes made in dts file:

sound0: sound0 {
                compatible = "simple-audio-card";
                simple-audio-card,name = "AM437x-GP-EVM";
                simple-audio-card,widgets =
                                "Speaker", "Speaker";
                simple-audio-card,routing =
                                 "Speaker", "SPK";
                simple-audio-card,format = "dsp_b";
                simple-audio-card,bitclock-master = <&sound0_master>;
                simple-audio-card,frame-master = <&sound0_master>;
                simple-audio-card,bitclock-inversion;

                simple-audio-card,cpu {
                        sound-dai = <&mcasp1>;
                        system-clock-frequency = <12000000>;
                };

                sound0_master: simple-audio-card,codec {
                        sound-dai = <&tas2557>;
                        system-clock-frequency = <12000000>;
                };
        };
&i2c0 {
        status = "okay";
        pinctrl-names = "default";
        pinctrl-0 = <&i2c0_pins>;
        clock-frequency = <100000>;
           tas2557: tas2557@4c {
                #sound-dai-cells = <1>;
                compatible = "ti,tas2557";
                reg = <0x4c>;
                status = "okay";
        /*      ti,cdc-reset-gpio = <&msmgpio 73 0>;*/
                ti,irq-gpio = <&gpio5 4 0>;
                ti,i2s-bits = <16>;   /* support 16, 24, 32 */

                /* Regulators */
        };

};

&mcasp1 {
        #sound-dai-cells = <0>;
        pinctrl-names = "default", "sleep";
        pinctrl-0 = <&mcasp1_pins>;
        pinctrl-1 = <&mcasp1_sleep_pins>;

        status = "okay";

        op-mode = <0>; /* MCASP_IIS_MODE */
        tdm-slots = <2>;
        /* 4 serializers */
        serial-dir = <  /* 0: INACTIVE, 1: TX, 2: RX */
                0 0 1 2
        >;
        tx-num-evt = <32>;
        rx-num-evt = <32>;
};


      mcasp1_pins: mcasp1_pins {
                pinctrl-single,pins = <
                        AM4372_IOPAD(0x9a0, PIN_INPUT | MUX_MODE3)      /* mii1_col.mcasp1_axr2 */
                        AM4372_IOPAD(0x9a4, PIN_INPUT | MUX_MODE3)      /* mii1_crs.mcasp1_aclkx */
                        AM4372_IOPAD(0x9a8, PIN_INPUT | MUX_MODE3)      /* mii1_rxerr.mcasp1_fsx */
                        AM4372_IOPAD(0x9ac, PIN_INPUT | MUX_MODE3)      /* rmii1_ref_clk.mcasp1_axr3 */
                >;
        };

        mcasp1_sleep_pins: mcasp1_sleep_pins {
                pinctrl-single,pins = <
                        AM4372_IOPAD(0x9a0, PIN_INPUT_PULLDOWN | MUX_MODE7)
                        AM4372_IOPAD(0x9a4, PIN_INPUT_PULLDOWN | MUX_MODE7)
                        AM4372_IOPAD(0x9a8, PIN_INPUT_PULLDOWN | MUX_MODE7)
                        AM4372_IOPAD(0x9ac, PIN_INPUT_PULLDOWN | MUX_MODE7)
                >;
        };


Other than this we added the respective driver in linux/sound/soc/codecs and chenged the respective Makefile and Kconfig file accordingly

config SND_SOC_ALL_CODECS        
            select SND_SOC_TAS2557 if I2C
            
            
config SND_SOC_TAS2557
        tristate "Texas Instruments TAS2557 speaker amplifier"
        depends on I2C
    select TAS2557_REGMAP
    select TAS2557_CODEC
    select TAS2557_MISC

But still while booting its not detecting the sound card and giving the following error:

[    4.181720]   No soundcards found.
[   13.777855] OF: /sound0/simple-audio-card,codec: arguments longer than property
[   13.860814] asoc-simple-card sound0: parse error -22
[   13.947918] asoc-simple-card: probe of sound0 failed with error -22

Please suggest on how to resolve the above problem?

  • Hi Ravi,

    In latest 4.x kernels, we have this "No soundcards found" kernel message by default, as aic3x is build and load as kernel module at later stage (in rootfs), where we have:

    "asoc-simple-card sound: tlv320aic3x-hifi <-> 4803c000.mcasp mapping ok"

    Please check the below e2e thread and see how it apply to your case:

    e2e.ti.com/.../674388
    e2e.ti.com/.../668884

    Check also if removing "system-clock-frequency" entry will fix other warnings.

    Regards,
    Pavel