I am trying to configure the Jetson TX2 to use the ADC PCM1863. Kernel version 4.9. Driver PCM186x. Everything is collected and does not issue errors. But when trying to write I get arecord: pcm_read: 2103: read error: Input / output error
nvidia@nvidia-desktop:~$ cat /proc/asound/cards
0 [tegrahda ]: tegra-hda - tegra-hda
tegra-hda at 0x3518000 irq 383
1 [tegrasndt186ref]: tegra-snd-t186r - tegra-snd-t186ref-mobile-rt565x
tegra-snd-t186ref-mobile-rt565x
nvidia@nvidia-desktop:~$ sudo cat /sys/kernel/debug/asoc/codecs
[sudo] password for nvidia:
tegra186-dspk.1
tegra186-dspk.0
tegra186-asrc
tegra186-arad
tegra210-ope.0
tegra210-mvc.1
tegra210-mvc.0
tegra186-afc.5
tegra186-afc.4
tegra186-afc.3
tegra186-afc.2
tegra186-afc.1
tegra186-afc.0
tegra210-sfc.3
tegra210-sfc.2
tegra210-sfc.1
tegra210-sfc.0
tegra210-mixer
tegra210-adx.3
tegra210-adx.2
tegra210-adx.1
tegra210-adx.0
tegra210-amx.3
tegra210-amx.2
tegra210-amx.1
tegra210-amx.0
tegra210-dmic.3
tegra210-dmic.2
tegra210-dmic.1
tegra210-dmic.0
tegra210-i2s.5
tegra210-i2s.4
tegra210-i2s.3
tegra210-i2s.2
tegra210-i2s.1
tegra210-i2s.0
tegra186-admaif
tegra210-axbar
pcm186x.0-004a
spdif_dit:spdif-dit.13@d
spdif_dit:spdif-dit.12@c
spdif_dit:spdif-dit.11@b
spdif_dit:spdif-dit.10@a
spdif_dit:spdif-dit.9@9
spdif_dit:spdif-dit.8@8
spdif_dit:spdif-dit.7@7
spdif_dit:spdif-dit.6@6
spdif_dit:spdif-dit.5@5
spdif_dit:spdif-dit.4@4
spdif_dit:spdif-dit.3@3
spdif_dit:spdif-dit.2@2
spdif_dit:spdif-dit.1@1
spdif_dit:spdif-dit.0@0
snd-soc-dummy
nvidia@nvidia-desktop:~$ amixer -c tegrasndt186ref cset name=“ADMAIF1 Mux” “I2S1”
numid=897,iface=MIXER,name=‘ADMAIF1 Mux’
; type=ENUMERATED,access=rw------,values=1,items=81
; Item #0 ‘None’
; Item #1 ‘ADMAIF1’
; Item #2 ‘ADMAIF2’
; Item #3 ‘ADMAIF3’
; Item #4 ‘ADMAIF4’
; Item #5 ‘ADMAIF5’
; Item #6 ‘ADMAIF6’
; Item #7 ‘ADMAIF7’
; Item #8 ‘ADMAIF8’
; Item #9 ‘ADMAIF9’
; Item #10 ‘ADMAIF10’
; Item #11 ‘ADMAIF11’
; Item #12 ‘ADMAIF12’
; Item #13 ‘ADMAIF13’
; Item #14 ‘ADMAIF14’
; Item #15 ‘ADMAIF15’
; Item #16 ‘ADMAIF16’
; Item #17 ‘I2S1’
; Item #18 ‘I2S2’
; Item #19 ‘I2S3’
; Item #20 ‘I2S4’
; Item #21 ‘I2S5’
; Item #22 ‘I2S6’
; Item #23 ‘SFC1’
; Item #24 ‘SFC2’
; Item #25 ‘SFC3’
; Item #26 ‘SFC4’
; Item #27 ‘MIXER1-1’
; Item #28 ‘MIXER1-2’
; Item #29 ‘MIXER1-3’
; Item #30 ‘MIXER1-4’
; Item #31 ‘MIXER1-5’
; Item #32 ‘AMX1’
; Item #33 ‘AMX2’
; Item #34 ‘AMX3’
; Item #35 ‘AMX4’
; Item #36 ‘ARAD1’
; Item #37 ‘AFC1’
; Item #38 ‘AFC2’
; Item #39 ‘AFC3’
; Item #40 ‘AFC4’
; Item #41 ‘AFC5’
; Item #42 ‘AFC6’
; Item #43 ‘OPE1’
; Item #44 ‘SPKPROT1’
; Item #45 ‘MVC1’
; Item #46 ‘MVC2’
; Item #47 ‘IQC1-1’
; Item #48 ‘IQC1-2’
; Item #49 ‘IQC2-1’
; Item #50 ‘IQC2-2’
; Item #51 ‘DMIC1’
; Item #52 ‘DMIC2’
; Item #53 ‘DMIC3’
; Item #54 ‘DMIC4’
; Item #55 ‘ADX1-1’
; Item #56 ‘ADX1-2’
; Item #57 ‘ADX1-3’
; Item #58 ‘ADX1-4’
; Item #59 ‘ADX2-1’
; Item #60 ‘ADX2-2’
; Item #61 ‘ADX2-3’
; Item #62 ‘ADX2-4’
; Item #63 ‘ADX3-1’
; Item #64 ‘ADX3-2’
; Item #65 ‘ADX3-3’
; Item #66 ‘ADX3-4’
; Item #67 ‘ADX4-1’
; Item #68 ‘ADX4-2’
; Item #69 ‘ADX4-3’
; Item #70 ‘ADX4-4’
; Item #71 ‘ADMAIF17’
; Item #72 ‘ADMAIF18’
; Item #73 ‘ADMAIF19’
; Item #74 ‘ADMAIF20’
; Item #75 ‘ASRC1-1’
; Item #76 ‘ASRC1-2’
; Item #77 ‘ASRC1-3’
; Item #78 ‘ASRC1-4’
; Item #79 ‘ASRC1-5’
; Item #80 ‘ASRC1-6’
: values=17
nvidia@nvidia-desktop:~$
nvidia@nvidia-desktop:~$ echo 0 | sudo tee /sys/kernel/debug/tracing/trace
0
nvidia@nvidia-desktop:~$ echo 0 | sudo tee /sys/kernel/debug/tracing/events/enable
0
nvidia@nvidia-desktop:~$ echo 1 | sudo tee /sys/kernel/debug/tracing/tracing_on
1
nvidia@nvidia-desktop:~$ echo 1 | sudo tee /sys/kernel/debug/tracing/events/asoc/snd_soc_dapm_path/enable
1
nvidia@nvidia-desktop:~$ echo 1 | sudo tee /sys/kernel/debug/tracing/events/asoc/snd_soc_dapm_widget_power/enable
1
nvidia@nvidia-desktop:~$ arecord -Dhw:tegrasndt186ref,0 -c 1 -r 48000 -f S16_LE -d 5 out.wav
Recording WAVE ‘out.wav’ : Signed 16 bit Little Endian, Rate 48000 Hz, Mono
arecord: pcm_read:2103: read error: Input/output error
nvidia@nvidia-desktop:~$ sudo cat /sys/kernel/debug/tracing/trace
tracer: nop
entries-in-buffer/entries-written: 2/2 #P:4
_-----=> irqs-off
/ _----=> need-resched
| / _—=> hardirq/softirq
|| / _–=> preempt-depth
||| / delay
TASK-PID CPU# |||| TIMESTAMP FUNCTION
| | | |||| | |
arecord-7971 [000] … 228.925593: snd_soc_dapm_path: *ADMAIF1 Transmit → (direct) → Capture 1
arecord-7971 [000] … 228.925632: snd_soc_dapm_path: *ADMAIF1 Transmit → (direct) → ADMAIF1 Transmit-ADMAIF1 CIF Transmit
My DTS:
tegra_sound: sound {
compatible = “nvidia,tegra-audio-t186ref-mobile-rt565x”;
nvidia,model = “tegra-snd-t186ref-mobile-rt565x”;
nvidia,num-codec-link = <4>;
clocks = <&tegra_car TEGRA186_CLK_PLLA>,
<&tegra_car TEGRA186_CLK_PLL_A_OUT0>,
<&tegra_car TEGRA186_CLK_AHUB>,
<&tegra_car TEGRA186_CLK_AUD_MCLK>;
clock-names = “pll_a”, “pll_a_out0”, “ahub”, “extern1”;
assigned-clocks = <&tegra_car TEGRA186_CLK_AHUB>,
<&tegra_car TEGRA186_CLK_AUD_MCLK>;
assigned-clock-parents = <&tegra_car TEGRA186_CLK_PLL_A_OUT0>,
<&tegra_car TEGRA186_CLK_PLL_A_OUT0>;
assigned-clock-rates = <0>, <24000000>;
nvidia,mclk-fs = <256>;
status = "okay";
nvidia,audio-routing =
"x VINL1", "x Mic",
"x VINR1", "x Mic",
"x VINL2", "x Mic",
"x VINR2", "x Mic",
"x VINL3", "x Mic",
"x VINR3", "x Mic",
"x VINL4", "x Mic",
"x VINR4", "x Mic",
"x ADC Left Capture Source", "x ADC Left Capture Source",
"x ADC Right Capture Source", "x ADC Right Capture Source",
"y Headphone", "y OUT",
"y IN", "y Mic",
"a IN", "a Mic",
"b IN", "b Mic";
nvidia,xbar = <&tegra_axbar>;
mclk-fs = <4>;
hdr40_snd_link_i2s: i2s_dai_link1: nvidia,dai-link-1 {
link-name = "codec_pcm1863";
cpu-dai = <&tegra_i2s1>;
codec-dai = <&pcm1863>;
cpu-dai-name = "I2S1";
codec-dai-name = "pcm1863-aif";
format = "i2s";
bitclock-slave;
frame-slave;
bitclock-noninversion;
frame-noninversion;
bit-format = "s16_le";
srate = <48000>;
num-channel = <2>;
ignore_suspend;
name-prefix = "x";
status = "okay";
};
nvidia,dai-link-2 {
link-name = "spdif-dit-1";
cpu-dai = <&tegra_i2s3>;
codec-dai = <&spdif_dit1>;
cpu-dai-name = "I2S3";
codec-dai-name = "dit-hifi";
format = "i2s";
bitclock-slave;
frame-slave;
bitclock-noninversion;
frame-noninversion;
bit-format = "s16_le";
srate = <48000>;
num-channel = <2>;
ignore_suspend;
name-prefix = "y";
status = "okay";
};
nvidia,dai-link-3 {
link-name = "spdif-dit-2";
cpu-dai = <&tegra_dmic1>;
codec-dai = <&spdif_dit2>;
cpu-dai-name = "DMIC1";
codec-dai-name = "dit-hifi";
format = "i2s";
bit-format = "s16_le";
srate = <48000>;
ignore_suspend;
num-channel = <2>;
name-prefix = "a";
status = "okay";
};
nvidia,dai-link-4 {
link-name = "spdif-dit-3";
cpu-dai = <&tegra_dmic2>;
codec-dai = <&spdif_dit3>;
cpu-dai-name = "DMIC2";
codec-dai-name = "dit-hifi";
format = "i2s";
bit-format = "s16_le";
srate = <48000>;
ignore_suspend;
num-channel = <2>;
name-prefix = "b";
status = "okay";
};
};