Hi, I’m working on our custom board using two codec ALC5640, and I configured the I2S device tree as instruction like tihs
i2c@c240000 {
rt5640_in: rt5640_in@1c {
status = "okay";
compatible = "realtek,rt5640";
reg = <0x1c>;
};
};
i2c@31e0000 {
rt5640_out: rt5640_out@1c {
status = "okay";
compatible = "realtek,rt5640";
reg = <0x1c>;
};
};
/*ALC5640*/
tegra_sound: sound {
status = "okay";
compatible = "nvidia,tegra-audio-t186ref-mobile-rt565x";
nvidia,model = "jetson-xaviernx-ape";
clocks = <&bpmp_clks TEGRA194_CLK_PLLA>,
<&bpmp_clks TEGRA194_CLK_PLLA_OUT0>,
<&bpmp_clks TEGRA194_CLK_AUD_MCLK>;
clock-names = "pll_a", "pll_a_out0", "extern1";
assigned-clocks = <&bpmp_clks TEGRA194_CLK_PLLA_OUT0>,
<&bpmp_clks TEGRA194_CLK_AUD_MCLK>;
assigned-clock-parents = <&bpmp_clks TEGRA194_CLK_PLLA>,
<&bpmp_clks TEGRA194_CLK_PLLA_OUT0>;
nvidia,num-codec-link = <2>;
nvidia,audio-routing =
"x IN2P" , "x Line In",
"x IN2N" , "x Line In",
"x IN2P" , "x Int Mic",
"x IN2N" , "x Int Mic",
"y Line Out" , "y LOUTL",
"y Line Out" , "y LOUTR";
nvidia,xbar = <&tegra_axbar>;
mclk-fs = <256>;
/*audio output*/
nvidia,dai-link-1 {
link-name = "rt5640-playback";
cpu-dai = <&tegra_i2s3>;
codec-dai = <&rt5640_out>;
cpu-dai-name = "I2S3";
codec-dai-name = "rt5640-aif2";
format = "i2s";
bclk_ratio = <1>;
bitclock-slave;
frame-slave;
bitclock-noninversion;
frame-noninversion;
bit-format = "s16_le";
srate = <48000>;
num-channel = <2>;
ignore_suspend;
name-prefix = "y";
status = "okay";
};
/*audio input*/
nvidia,dai-link-2 {
link-name = "rt5640-capture";
cpu-dai = <&tegra_i2s5>;
codec-dai = <&rt5640_in>;
cpu-dai-name = "I2S5";
codec-dai-name = "rt5640-aif2";
format = "i2s";
bclk_ratio = <1>;
bitclock-slave;
frame-slave;
bitclock-noninversion;
frame-noninversion;
bit-format = "s16_le";
srate = <48000>;
num-channel = <2>;
ignore_suspend;
name-prefix = "x";
status = "okay";
};
};
/*I2S*/
ahub {
i2s@2901400 {
status = "okay";
};
i2s@2901200 {
status = "okay";
};
};
But when boot up, there shows these err message
[ 2.082428] tegra-asoc: sound: ASoC: CODEC DAI rt5640-aif2 not registered
[ 2.082629] tegra-asoc: sound: snd_soc_register_card failed (-517)
The same codecs chip works fine in our nano module and I check the driver is the same in our L4T version R32.7.3.
It seems only one codec-dai registered failed and I don‘t know how this happened
I’ll be really grateful if you give some help!