Hi :
We has a issue when debug RT564,
The driver section contains rt5640. ctegra_rt5640 in the directory kernel/kernel-4.9/sound/soc.The hardware connection I2C is I2C2, and I2S is I2S1. The device tree is added according to the following steps for testing and error is found. The oscilloscope is used to measure I2S without signal output, please help to analyze.
1, device tree TEGRA194-AUDIO-P3668. DTSI modification:
i2c@3160000 {
rt5640: rt5640@1c {
compatible = “realtek,rt5640”;
reg = <0x1c>;
interrupt-parent = <&tegra_main_gpio>;
interrupts = <&tegra_main_gpio TEGRA194_MAIN_GPIO(Q, 5) IRQ_TYPE_EDGE_FALLING>;
realtek,ldo1-en-gpios =
<&tegra_main_gpio TEGRA194_MAIN_GPIO(R, 0) GPIO_ACTIVE_HIGH>;
sel_jd_source = <3>;
status = “okay”;
};
};
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,audio-routing =
"x Headphone Jack", "x HPOL",
"x Headphone Jack", "x HPOR",
"x Int Spk", "x SPORP",
"x Int Spk", "x SPORN",
"x Int Spk", "x SPOLP",
"x Int Spk", "x SPOLN",
"x IN1P", "x Mic Jack",
"x IN1P", "x MICBIAS1",
"x IN2P", "x Int Mic",
"x IN2P", "x MICBIAS1",
"x IN3P", "x Int Mic",
"x IN3P", "x MICBIAS1";
mclk-fs = <256>;
nvidia,dai-link-3 {
name-prefix = "x";
cpu-dai = <&tegra_i2s3>;
cpu-dai-name = "I2S3";
link-name = "rt5640_playback";
codec-dai = <&rt5640>;
codec-dai-name = "rt5640-aif1";
format = "i2s";
bitclock-slave;
frame-slave;
bitclock-noninversion;
frame-noninversion;
bit-format = "s16_le";
bclk_ratio = <0>;
srate = <48000>;
num-channel = <2>;
ignore_suspend;
status = "okay";
};
hdr40_snd_link_i2s: nvidia,dai-link-5 {
name-prefix = "x";
};
};
2:use: speaker-test -c2 -twav -D plughw:CARD=jetsonxaviernxa,DEV=0
An error appears:
Time per period = 0.056267
0 - Front Left
1 - Front Right
Write error: -32,Broken pipe
Time per period = 0.056780
0 - Front Left
Oscilloscope measures I2S without signal output, please help to see how to add audio module of NX platform?
thanks