Hi,
I have used I2S0 to connect with ALC5633 audio codec, and it played successful, recorded to file failed.
tegra_sound: sound {
compatible = "nvidia,tegra-audio-t186ref-mobile-rt563x";
nvidia,model = "tegra-snd-t186ref-mobile-rt563x";
nvidia,num-codec-link = <1>;
nvidia,num-clk = <8>;
nvidia,clk-rates = < 270950400 /* PLLA_x11025_RATE */
11289600 /* AUD_MCLK_x11025_RATE */
45158400 /* PLLA_OUT0_x11025_RATE */
45158400 /* AHUB_x11025_RATE */
245760000 /* PLLA_x8000_RATE */
12288000 /* AUD_MCLK_x8000_RATE */
49152000 /* PLLA_OUT0_x8000_RATE */
49152000 >;/* AHUB_x8000_RATE */
clocks = <&tegra_car TEGRA186_CLK_PLLP_OUT0>,
<&tegra_car TEGRA186_CLK_PLLA>,
<&tegra_car TEGRA186_CLK_PLL_A_OUT0>,
<&tegra_car TEGRA186_CLK_AHUB>,
<&tegra_car TEGRA186_CLK_CLK_M>,
<&tegra_car TEGRA186_CLK_AUD_MCLK>;
clock-names = "pll_p_out1", "pll_a", "pll_a_out0", "ahub",
"clk_m", "extern1";
resets = <&tegra_car TEGRA186_RESET_AUD_MCLK>;
reset-names = "extern1_rst";
status = "okay";
nvidia,audio-routing =
"x Headphone", "x Left DAC",
"x Headphone", "x Right DAC",
"x Mic", "x Left ADC",
"x Mic", "x Right ADC";
nvidia,xbar = <&tegra_axbar>;
rt563x_dai_link: nvidia,dai-link-1 {
link-name = "rt563x-playback";
cpu-dai = <&tegra_i2s1>;
codec-dai = <&rt563x_codec>;
cpu-dai-name = "I2S1";
codec-dai-name = "rt5633-hifi";
format = "i2s";
bitclock-slave;
frame-slave;
bitclock-noninversion;
frame-noninversion;
bit-format = "s16_le";
bclk_ratio = <0>;
srate = <48000>;
num-channel = <2>;
ignore_suspend;
name-prefix = "x";
status = "okay";
};
};
sudo grep "dap1" /sys/kernel/debug/tegra_pinctrl_reg
Bank: 0 Reg: 0x02431028 Val: 0x00000400 -> dap1_fs_pj3
Bank: 0 Reg: 0x02431030 Val: 0x00000458 -> dap1_din_pj2
Bank: 0 Reg: 0x02431038 Val: 0x00000400 -> dap1_dout_pj1
Bank: 0 Reg: 0x02431040 Val: 0x00000400 -> dap1_sclk_pj0
arecord -v -D hw:tegrasndt186ref,0 -t wav -r 48000 -f S16_LE -c 1 -d 5 cap.wav
Recording WAVE 'cap.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono
Hardware PCM card 1 'tegra-snd-t186ref-mobile-rt563x' device 0 subdevice 0
Its setup is:
stream : CAPTURE
access : RW_INTERLEAVED
format : S16_LE
subformat : STD
channels : 1
rate : 48000
exact rate : 48000 (48000/1)
msbits : 16
buffer_size : 16384
period_size : 4096
period_time : 85333
tstamp_mode : NONE
tstamp_type : MONOTONIC
period_step : 1
avail_min : 4096
period_event : 0
start_threshold : 1
stop_threshold : 16384
silence_threshold: 0
silence_size : 0
boundary : 4611686018427387904
appl_ptr : 0
hw_ptr : 0
arecord: pcm_read:2103: read error: Input/output error
The I2S_CLK, I2S_LRCLK nothing output when I record.
thanks.