Jetson Nano I2S strange output

environment:
Jetson Nano L4T R32.1

I made config to use i2s audio as the following link shows:
https://devtalk.nvidia.com/default/topic/1049674/jetson-nano/audio-i2s-on-40-pin-connector/

Tegra210 (P3450-Porg) # md 0x6000d204 1
6000d204: 000000f0 …
Tegra210 (P3450-Porg) # mw 0x6000d204 0
Tegra210 (P3450-Porg) # md 0x6000d204 1
6000d204: 00000000 …

Tegra210 (P3450-Porg) # md 0x6000d60c 1
6000d60c: 00000001 …
Tegra210 (P3450-Porg) # mw 0x6000d60c 0
Tegra210 (P3450-Porg) # md 0x6000d60c 1
6000d60c: 00000000 …

Tegra210 (P3450-Porg) # md 0x70003144 4
70003144: 00000064 00000064 00000064 00000064 d…d…d…d…

Tegra210 (P3450-Porg) # md 0x70003180 1
70003180: 00000068 h…
Tegra210 (P3450-Porg) # mw 0x70003180 0x4
Tegra210 (P3450-Porg) # md 0x70003180 1
70003180: 00000004 …

after booting up, I made sure the settings of I2S related pins as follows:

sudo grep “Name:|J:|BB:” /sys/kernel/debug/tegra_gpio
Name:Bank:Port CNF OE OUT IN INT_STA INT_ENB INT_LVL
J: 2:1 00 00 00 00 00 00 000000
BB: 6:3 01 00 00 00 00 00 000000

and I tested sound output but I only got buzzing sound.

alsactl init tegrasndt210ref
amixer -c tegrasndt210ref cset name=“I2S4 codec master mode” 4

speaker-test -t sine -c 2 -F S32_LE -f 600 -D plughw:CARD=tegrasndt210ref,DEV=0
speaker-test 1.1.3

Playback device is plughw:CARD=tegrasndt210ref,DEV=0
Stream parameters are 48000Hz, S32_LE, 2 channels
Sine wave rate is 600.0000Hz
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 16 to 4096
Period size range from 16 to 2048
Using max buffer size 4096
Periods = 4
was set period_size = 1024
was set buffer_size = 4096
0 - Front Left
1 - Front Right

I checked DAP4_DOUT 40pin and related pinout signal as follows,
My Jetson Nano’s signal output has been strange.

Oscilloscope - Multi VirAnalyzer 2019-09-13 19-07-03-40pin-dap4-dout
https://youtu.be/QtBJHkbqGbo

Oscilloscope - Multi VirAnalyzer 2019-09-13 19-09-07-35pin-DAP4_FS
https://youtu.be/ttgRL5mjHzg

Oscilloscope - Multi VirAnalyzer 2019-09-13 19-14-54-12pin-DAP4_SCLK
https://youtu.be/PVNBe8HG6VM

it didn’t clearly indicate high or low level,and seemed to contain several megahertz signal or noise.

I noticed Drive Down / Up feature and tried as follows:

Driver Output Pull-Up/Pull-Down drive strength code.
Normally, the code is 5 bits
Pad Control Group Register
Address DRVDN DRVUP
DAP4_DIN 0x70000974 16:12 24:20
DAP4_DOUT 0x70000978 16:12 24:20
DAP4_FS 0x7000097c 16:12 24:20
DAP4_SCLK 0x70000980 16:12 24:20

sudo devmem2 0x70000978
/dev/mem opened.
Memory mapped at address 0x7fa5064000.
Value at address 0x70000978 (0x7fa5064978): 0x1010000

sudo devmem2 0x70000978 w 0x1616000
/dev/mem opened.
Memory mapped at address 0x7fad217000.
Value at address 0x70000978 (0x7fad217978): 0x1010000
Written 0x1616000; readback 0x1616000

it seemed to take some effect, but still didn’t indicate adequate high logic level.

Oscilloscope - Multi VirAnalyzer 2019-09-13 19-24-40-40pin-dap4-dout-drive-power-modified
https://youtu.be/Dy41nYEWZqU

for the reference, I tested also with my Raspberry Pi3,
it play sound with no problem and their waveforms seemed to be adequate.

speaker-test -t sine -c 2 -F S32_LE -f 600 -D plughw:0,0

Oscilloscope - Multi VirAnalyzer 2019-09-13 19-30-48-40pin-raspberry-pi3-dout
https://youtu.be/BjsCVYwyOwQ

Oscilloscope - Multi VirAnalyzer 2019-09-13 19-32-47-35pin-raspberry-pi-fs
https://youtu.be/Fk4321-AdPI

Oscilloscope - Multi VirAnalyzer 2019-09-13 19-34-36-12pin-raspberry-pi-sclk
https://youtu.be/wtg-zqA0ILg

could you advise and if you can, please accept my RMA request.

1 Like

Hello!

The above values do not look correct to me. Can you try setting the above registers as described in the following post in addition to writing the other registers?

https://devtalk.nvidia.com/default/topic/1049674/jetson-nano/audio-i2s-on-40-pin-connector/post/5337591/#5337591

Once you have done that and booted the board please dump the following …

$ sudo grep "Name:\|J:\|BB:" /sys/kernel/debug/tegra_gpio
$ sudo grep dap4 /sys/kernel/debug/tegra_pinctrl_reg

Can you also dump the following to confirm that board version you have …

$ cat /proc/device-tree/nvidia,dtsfilename

What device are you connecting to the I2S pins?

Regards
Jon

Tegra210 (P3450-Porg) # md 0x70003144 4
70003144: 00000064 00000064 00000064 00000064 d…d…d…d…
Tegra210 (P3450-Porg) # mw 0x70003144 0x6044
Tegra210 (P3450-Porg) # mw 0x70003148 0x6044
Tegra210 (P3450-Porg) # mw 0x7000314c 0x6044
Tegra210 (P3450-Porg) # mw 0x70003150 0x6044
Tegra210 (P3450-Porg) # md 0x70003144 4
70003144: 00000044 00000044 00000044 00000044 D…D…D…D…

I noticed that 4 mw commands of upper bytes “0x60” seemed not to take effect.

Tegra210 (P3450-Porg) # mw 0x6000d204 0
Tegra210 (P3450-Porg) # md 0x6000d204 1
6000d204: 00000000 …
Tegra210 (P3450-Porg) # mw 0x6000d60c 0
Tegra210 (P3450-Porg) # md 0x6000d60c 1
6000d60c: 00000000 …

after booting up:
sudo grep “Name:|J:|BB:” /sys/kernel/debug/tegra_gpio
Name:Bank:Port CNF OE OUT IN INT_STA INT_ENB INT_LVL
J: 2:1 00 00 00 00 00 00 000000
BB: 6:3 00 00 00 00 00 00 000000

sudo grep dap4 /sys/kernel/debug/tegra_pinctrl_reg
Bank: 1 Reg: 0x70003144 Val: 0x00000044 -> dap4_fs_pj4
Bank: 1 Reg: 0x70003148 Val: 0x00000044 -> dap4_din_pj5
Bank: 1 Reg: 0x7000314c Val: 0x00000044 -> dap4_dout_pj6
Bank: 1 Reg: 0x70003150 Val: 0x00000044 -> dap4_sclk_pj7

cat /proc/device-tree/nvidia,dtsfilename
/dvs/git/dirty/git-master_linux/kernel/kernel-4.9/arch/arm64/boot/dts/…/…/…/…/…/…/hardware/nvidia/platform/t210/porg/kernel-dts/tegra210-p3448-0000-p3449-0000-a02.dts

and I tested 40pin DAP4_DOUT and result is as follows:
https://youtu.be/XwHJ6J4hba0

I got 3.4MHz oshillation.

my application schematics is as follows:

https://drive.google.com/file/d/1VhuJZdqONm3bajzbnmwvDSBBOA8Lf6MG/view?usp=sharing

I already tested it with Raspberry pi 3B+ exactly as same and it’s no problem.
Are there any other oversights?
I’m sorry, I can’t spend so much time on this.

Regards,

Hello!

Yes you are correct, the upper nibble in the value 0x6044 is not applicable to this device and so you can ignore that. So yes the configuration looks better now.

The 3.4 oscillation looks like a clock to me. Stereo audio at 48kHz with 32-bit sample size would generate a bit clock of 3.072MHz.

Have you tried disconnecting your audio module to the Jetson Nano and ran speaker-test without it?

Regards,
Jon

Jon-san,

Thank you.
But I already connected the probe directly to Jetson Nano.
Pin6 - Probe GND terminal
Pin40 - Probe tip

All signal patterns that i posted above are the same settings.

I also tested with my module and insert the probe to DAP4_DOUT.
due to my module specification, it must be clock master and frame master,
So I set as follows:
alsactl init tegrasndt210ref
amixer -c tegrasndt210ref cset name=“I2S4 codec master mode” 1

but I ended up to get a few MHz signal.

Again, I switch it to Rpi3B+ and got a sound as I expected.
Regards,

Hello!

Sorry for the delay. This is very odd indeed. There are details on the FAQ page with regard to RMA if you would like to return this board.

Regards,
Jon

Thank you for your special RMA support.
but, I tested again and got a same result.
it seemed that TXB0108 behavior as U48 is a root cause.
I got a lot of support infos on TI website about it.
I decided to probe on 1.8v side of DOUT directly with take a risk of losing warranty.

I found a clean, ideal I2S waveform(DOUT,SCLK).


I will remove U48 and bypass A-B connect and arrange discrete level shifting circuit.
If there’s anyone who uses I2S interface, keep it noted.

I confirm the problem, only solvable by removing the U48 and applying another level shifter circuit.

Thank you.
I use SN74AVC4T774 instead of TXB0108 and it works as expected.
and I wrote Japanese article as follows:

1 Like