I2S problem while connecting ReSpeaker board to 40-pin header on Xavier NX

Hi,

We are trying to get the “SeedStudio ReSpeaker 2-Mic” board to work with Xavier-NX via 40-pin header. This board is known to work with Jetson-Nano. Code from SeedStudio is available here

(1) We have created following miror and made some changes to account for “Xaveier-Nx vs Jetson-Nano”

(i) Updated the dts/dtbo to map to Xavier 40-pin connector.
(ii) Updated the asoc_machine_driver on xavier. The changes which we did have been added to the repo.
(iii) Created wm8960_asound.state-xavier-nx for alsactl settings. This is quite similar to wm8960_asound.state-jetson-nano, but maps the I2S5 to ADMAIF1 instead of I2S4.

(2) With the above changes, we tried to record/playback audio. But audio does not work and we get errors like following under dmesg

[ 15.002660] tegra210-i2s tegra210-i2s.4: Failed at I2S4_TX sw reset
[ 15.002811] tegra210-i2s tegra210-i2s.4: ASoC: PRE_PMU: I2S5 DAP TX event failed: -22

Can you suggest what could be wrong?
Please let me know if you require any further information about my setup.

Best Regards,
A

The I2S5 on 40-Pin header is connected to ReSpeaker board, and io-levels are 3.3V. Can you suggest if following dts entries are ok:

            __overlay__ {
                    pinctrl-names = "default";
                    pinctrl-0 = <0x3>;

                    header-40pin-pinmux {
                            phandle = <0x3>;

                            pin12 {
                                    nvidia,pins = "dap5_sclk_pt5";
                                    nvidia,function = "i2s5";
                                    nvidia,pull = <0x1>;
                                    nvidia,tristate = <0x0>;
                                    nvidia,enable-input = <0x1>;
                            };

                            pin35 {
                                    nvidia,pins = "dap5_fs_pu0";
                                    nvidia,function = "i2s5";
                                    nvidia,pull = <0x1>;
                                    nvidia,tristate = <0x0>;
                                    nvidia,enable-input = <0x1>;
                            };

                            pin38 {
                                    nvidia,pins = "dap5_din_pt7";
                                    nvidia,function = "i2s5";
                                    nvidia,pull = <0x1>;
                                    nvidia,tristate = <0x1>;
                                    nvidia,enable-input = <0x1>;
                            };

                            pin40 {
                                    nvidia,pins = "dap5_dout_pt6";
                                    nvidia,function = "i2s5";
                                    nvidia,pull = <0x1>;
                                    nvidia,tristate = <0x0>;
                                    nvidia,enable-input = <0x0>;
                            };
                    };
            };

Also, there is no connection on pin-7 of 40-pin header. So, we have following entry

            __overlay__ {
                    clocks {
                            wm8960_mclk {
                                    compatible = "fixed-clock";
                                    #clock-cells = <0x0>;
                                    clock-frequency = <0x16e3600>;
                                    clock-output-names = "wm8960-mclk";
                                    status = "okay";
                                    phandle = <0x1>;
                            };
                    };
            };

Hello, this problem was caused by wrong alsactl-configuration-file for the given sound-card. We have updated the configuration file [Mainly setting the correct “codec master mode” and “codec frame mode” for I2S5] and everything is working fine now. Thanks to everyone who has looked in to this issue.