SGTL5000 with Jetson Nano emmc

Hello!

Sorry but it is the above file that I need the output from.

Thanks
Jon

@jonathanh

consider this one

 jetson@image-box:~$ sudo cat /sys/kernel/debug/tegra_gpio
[sudo] password for jetson: 
Name:Bank:Port CNF OE OUT IN INT_STA INT_ENB INT_LVL
 A: 0:0 64 40 40 04 00 00 000000
 B: 0:1 f0 00 00 00 00 00 000000
 C: 0:2 1f 00 00 02 00 00 000000
 D: 0:3 00 00 00 00 00 00 000000
 E: 1:0 40 00 00 00 00 00 000000
 F: 1:1 00 00 00 00 00 00 000000
 G: 1:2 0c 00 00 00 00 00 000000
 H: 1:3 fd 99 00 60 00 00 000000
 I: 2:0 07 07 03 00 00 00 000000
 J: 2:1 f0 00 00 80 00 00 000000
 K: 2:2 00 00 00 00 00 00 000000
 L: 2:3 00 00 00 00 00 00 000000
 M: 3:0 00 00 00 00 00 00 000000
 N: 3:1 00 00 00 00 00 00 000000
 O: 3:2 00 00 00 00 00 00 000000
 P: 3:3 00 00 00 00 00 00 000000
 Q: 4:0 00 00 00 00 00 00 000000
 R: 4:1 00 00 00 00 00 00 000000
 S: 4:2 a0 80 00 00 00 00 000000
 T: 4:3 01 01 00 00 00 00 000000
 U: 5:0 00 00 00 00 00 00 000000
 V: 5:1 03 00 00 02 00 00 000000
 W: 5:2 00 00 00 00 00 00 000000
 X: 5:3 78 08 08 50 00 60 606000
 Y: 6:0 06 00 00 06 00 00 000000
 Z: 6:1 0f 08 00 06 00 04 000400
AA: 6:2 00 00 00 00 00 00 000000
BB: 6:3 01 00 00 00 00 00 000000
CC: 7:0 92 80 80 02 00 12 121200
DD: 7:1 01 00 00 01 00 00 000000
EE: 7:2 00 00 00 00 00 00 000000
FF: 7:3 00 00 00 00 00 00 000000

Hello!

Yes this appears to be the problem. The I2S4 pins are configured as GPIOs. We need the first the above to be …

J: 2:1 00 xx xx xx xx xx xxxxxx

The simplest way to fix this is to remove the following from the ‘gpio-input’ property in the appropriate DT file.

TEGRA_GPIO(J, 5)
TEGRA_GPIO(J, 6)
TEGRA_GPIO(J, 4)
TEGRA_GPIO(J, 7)

Regards,
Jon

Hello @jonathanh,

I made this change, but the I2S4 pins still are configured as GPIOs. I’m trying to find another file where the pins are configured as GPIO. Any suggestion?

Which is the memory address for this configuration? I would like to try to delete this configuration manually just for test. Could you share a datasheet or user guide about the processor with a memory map of peripherals?

Regards

Hello!

You need to ensure you modify the correct file. Furthermore, you need to make sure you re-flash the device because it is the bootloader that applies these settings. For more information on configuring the pinmux for Nano please see this doc.

Regards,
Jon

Hello @jonathanh

First of all, thank you, the I2S is worked. The problem is the I2S4 configured as GPIOs just as you indicated, but I re-flash the dtb without the “gpio-input” and the I2S4 was still configuration as GPIOs, so I changed manually the GPIOS configuration with Busybox for test.

sudo busybox devmem 0x6000d204 8 0x00

So, Now I2S4 is okay. The following tests worked :

jetson@image-box:~$ speaker-test -D hw:tegrasndt210ref,0 -c 2 -r 48000 -F S16_LE -t sine -f 500 -l 2

speaker-test 1.1.3

Playback device is hw:tegrasndt210ref,0
Stream parameters are 48000Hz, S16_LE, 2 channels
Sine wave rate is 500,0000Hz
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 32 to 8192
Period size range from 32 to 4096
Using max buffer size 8192
Periods = 4
was set period_size = 2048
was set buffer_size = 8192
 0 - Front Left
 1 - Front Right
Time per period = 5,802282
 0 - Front Left
 1 - Front Right
Time per period = 5,973061



jetson@image-box:~$ aplay -D hw:1,0 file_example_WAV_1MG.wav 
Playing WAVE 'file_example_WAV_1MG.wav' : Signed 16 bit Little Endian, Rate 8000 Hz, Stereo

But, the sounds are too low. I tried the command below but the sound has not changed. How to increase the volume?

jetson@image-box:~$ amixer -c tegrasndt210ref cset name="I2S4 Mux" "ADMAIF1"
numid=541,iface=MIXER,name='I2S4 Mux'
  ; type=ENUMERATED,access=rw------,values=1,items=53
  ; 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 'I2S1'
  ; Item #12 'I2S2'
  ; Item #13 'I2S3'
  ; Item #14 'I2S4'
  ; Item #15 'I2S5'
  ; Item #16 'SFC1'
  ; Item #17 'SFC2'
  ; Item #18 'SFC3'
  ; Item #19 'SFC4'
  ; Item #20 'MIXER1-1'
  ; Item #21 'MIXER1-2'
  ; Item #22 'MIXER1-3'
  ; Item #23 'MIXER1-4'
  ; Item #24 'MIXER1-5'
  ; Item #25 'AMX1'
  ; Item #26 'AMX2'
  ; Item #27 'AFC1'
  ; Item #28 'AFC2'
  ; Item #29 'AFC3'
  ; Item #30 'AFC4'
  ; Item #31 'AFC5'
  ; Item #32 'AFC6'
  ; Item #33 'OPE1'
  ; Item #34 'OPE2'
  ; Item #35 'SPKPROT1'
  ; Item #36 'MVC1'
  ; Item #37 'MVC2'
  ; Item #38 'IQC1-1'
  ; Item #39 'IQC1-2'
  ; Item #40 'IQC2-1'
  ; Item #41 'IQC2-2'
  ; Item #42 'DMIC1'
  ; Item #43 'DMIC2'
  ; Item #44 'DMIC3'
  ; Item #45 'ADX1-1'
  ; Item #46 'ADX1-2'
  ; Item #47 'ADX1-3'
  ; Item #48 'ADX1-4'
  ; Item #49 'ADX2-1'
  ; Item #50 'ADX2-2'
  ; Item #51 'ADX2-3'
  ; Item #52 'ADX2-4'
  : values=1

jetson@image-box:~$ amixer -c tegrasndt210ref cset name="x Headphone Playback Volume" 30
numid=490,iface=MIXER,name='x Headphone Playback Volume'
  ; type=INTEGER,access=rw---R--,values=2,min=0,max=127,step=0
  : values=30,30
  | dBscale-min=-51.50dB,step=0.50dB,mute=0

Hello!

This would indicate that either the updated DTB does not match the version of the board you have (note there are version a02 and b00) or the updated DTB is not being flashed as expected. If you are using flash.sh to flash the board, then the updated DTB needs to be placed in the Linux_for_Tegra/kernel/dtb directory.

If you refer to the codec driver you will see that there are some volume controls for playback. So look from the volume controls …

amixer -c tegrasndt210ref | grep "Playback Volume"

Regards,
Jon

@jonathanh

returns nothing

jetson@image-box:~$ amixer -c tegrasndt210ref | grep "Playback Volume"
jetson@image-box:~$ 

Here is the command without filters

jetson@image-box:~$ amixer -c tegrasndt210ref
amixer.log (137.2 KB)

Hello!

Sorry going from memory, which has become corrupted! Please try …

amixer -c tegrasndt210ref controls | grep "Playback Volume"

Regards,
Jon