I2s amp

Hi everyone, i recently bought this i2s amp and im trying to connect it to my jetson nano

i hooked up everything and its working but the problem is i need my lrclk pin for something eles, is there a way i can use the amp without the lrclk pin?
im using only 1 amp(mono) and i dont mind if its only left or only right (maybe giving it a static current).
thank you

Hello!

From a Jetson standpoint data will still be outputted on the DOUT but without the LRCLK the amp probably will not know where the start of the channel is and so I am doubtful this will work.

What do you need the LRCLK pin for if not for I2S?

Regards,
Jon

I’m trying record and playback at the same time, but my recorder uses a different lrclk and different bclk, so they can’t work at the same time, is there a way a I can make a diffrend bclk and lrclk with other pins?

Hello!

If the playback and capture devices require a different format, then you need to use different I2S interfaces. In other words, one for the playback device and one for the capture. Jetson Nano provides two I2S interfaces, the 2nd one is available on the M.2 connector which is not as easily accessible as the 40-pin header, but it is possible to use two I2S interfaces.

Do both playback and capture devices operate at the same sample rate and sample size but just differ in the number of channels? The I2S AMP does support TDM mode, does the capture device support TDM mode? In TDM mode there is just a single pulse to indicate the start of the frame but it does not indicate the number of channels. So it might be possible to use TDM mode, if both devices support it, but you would need to review the clock requirements of both devices.

Regards,
Jon

Both share sample size and rate and both can be tdm but the recorder uses 4 channels and playback is only 1 channel

Hello!

In this case then the simplest thing to do is use TDM mode and always send 4 channels to the AMP even if only one channel has data.

Regards,
Jon

I tried playing the recording but the speaker plays static noise

Hello!

OK, in that case it might not be possible with this device and you may need to use separate I2S interfaces for each.

Regards,
Jon

Is there a guide that I can use to do it?

Hello!

First you need to check pinmux. The I2S3 pins are muxed on the dmic1/2 pins but by default they should be configured to I2S3. You can confirm by checking that bits [1:0] in the following registers are 0x1 for I2S3 …

$ sudo grep -r "dmic1\|dmic2" /sys/kernel/debug/tegra_pinctrl_reg
Bank: 1 Reg: 0x700030a4 Val: 0x00000041 -> dmic1_clk_pe0
Bank: 1 Reg: 0x700030a8 Val: 0x00000041 -> dmic1_dat_pe1
Bank: 1 Reg: 0x700030ac Val: 0x00000041 -> dmic2_clk_pe2
Bank: 1 Reg: 0x700030b0 Val: 0x00000041 -> dmic2_dat_pe3

Then you just need to route the I2S3 playback and capture ports to one of the DMA interfaces …

$ amixer -c tegrasndt210ref sset "I2S3 Mux" ADMAIF2
$ amixer -c tegrasndt210ref sset "ADMAIF2 Mux" I2S3

And finally you can try playback/capture to this I2S interface …

$ speaker-test -D hw:tegrasndt210ref,1 -c 2 -r 48000 -F S16_LE -t sine -f 500
$ arecord -D hw:tegrasndt210ref,1 -c 2 -r 48000 -f S16_LE -d 10 cap.wav

You can refer to the carrier board schematics for the pinout details.

Regards,
Jon