We are able to build one I2S path for speaker and microphone(I2S3), but having trouble to make another I2S path(I2S1) working.
When I set all the parameters the same from amixer, I can see that all the regmap registers are the same (/sys/kernel/debug/regmap/tegra210-i2s.0 and /sys/kernel/debug/regmap/tegra210-i2s.2). However when I tried to Mux the I2S1 to ADMAIF1, it did not build any path related to the I2S1 ports(Through watching /sys/kernel/debug/tracing/events). Then playing an audio file to the ADMAIF1 port, the aplay program exited immediately. The issue happened regardless if the first path was built or not. There wasn’t any kernel warning or error observed related to this I2S during all the tests.
There wasn’t any clock signal can be dected for I2S3 port when setting the port to run as master or slave clocking.
Pinmux:
701000465 root@jeteye /sys/kernel/debug/pinctrl/2430000.pinmux $ cat pinmux-functions | grep i2s
function: i2s1, groups = [ dap1_fs_pj3 dap1_din_pj2 dap1_dout_pj1 dap1_sclk_pj0 ]
function: i2s3, groups = [ dmic1_clk_pm1 dmic1_dat_pm0 dmic2_dat_pm2 dmic2_clk_pm3 ]
function: i2s4, groups = [ dap4_fs_pcc3 dap4_din_pcc2 dap4_dout_pcc1 dap4_sclk_pcc0 ]
function: i2s2, groups = [ dap2_din_pc3 dap2_dout_pc2 dap2_fs_pc4 dap2_sclk_pc1 ]
function: i2s6, groups = [ gpio_pq0_pi0 gpio_pq1_pi1 gpio_pq2_pi2 gpio_pq3_pi3 ]
function: i2s5, groups = [ gen7_i2c_scl_pl0 gen7_i2c_sda_pl1 gen9_i2c_sda_pl3 gen9_i2c_scl_pl2 ]
Device tree:
tegra_sound: sound {
nvidia,audio-routing =
"x Headphone", "x HP_OUT",
"x MIC_IN", "x Mic",
"x ADC", "x Mic Bias",
"x LINE_IN", "x Line In",
"x Line Out", "x LINE_OUT",
"y Headphone", "y OUT",
"y IN", "y Mic";
cellular_audio: nvidia,dai-link-1 {
link-name = "spdif-dit-0";
cpu-dai = <&tegra_i2s1>;
codec-dai = <&spdif_dit0>;
cpu-dai-name = "I2S1";
codec-dai-name = "dit-hifi";
format = "i2s";
bitclock-master;
frame-master;
bitclock-noninversion;
frame-noninversion;
bit-format = "s16_le";
srate = <48000>;
num-channel = <2>;
ignore_suspend;
name-prefix = "y";
status = "okay";
};
hdr40_snd_link_i2s: rt565x_dai_link: nvidia,dai-link-3 {
link-name = "fe-pi-audio-z-v2";
cpu-dai = <&tegra_i2s3>;
codec-dai = <&sgtl5000>;
cpu-dai-name = "I2S3";
codec-dai-name = "sgtl5000";
format = "i2s";
bitclock-master;
frame-master;
bitclock-noninversion;
frame-noninversion;
bit-format = "s16_le";
srate = <48000>;
num-channel = <2>;
ignore_suspend;
name-prefix = "x";
status = "okay";
};
};
Full device tree and I2S register are attached.
device_tree.txt (383.2 KB)
tegra210-i2s.0.registers.txt (666 Bytes)
pinmux.txt (14.0 KB)