Orin 5.0.2 aplay can't reset I2S

Hi,
I execute command aplay -Dhw:1,1 ./back.wav.The following is the log.
===================log start=====================
@linux:~$ aplay -Dhw:1,1 ./back.wav
Playing WAVE ‘./back.wav’ : Signed 16 bit Little Endian, Rate 32000 Hz, Stereo
[ 305.908748] tegra210-i2s 2901100.i2s: timeout: failed to reset I2S for playback
[ 305.916319] tegra210-i2s 2901100.i2s: ASoC: PRE_PMU: I2S2 RX event failed: -110
==================log end========================
I search the source, the log 305.908748 is printed in the tegra210_i2s.c line 124. The driver read the signal of reset of register address of 4 failed.
Do you know which situation the driver can’t reset the I2S?
Note:why -Dhw:1,1?
I test all the pcm, only this device can access the register of sgtl5000 that I used as audio codec.

From logs, seems you are using Tegra I2S2 as slave and codec as master.

If still issue persist, please share below details:

  • Below command output
     cat /sys/kernel/debug/pinctrl/2430000.pinmux/pinconf-groups
  • Mixer control settings done before running the usecase
  • DTS modifications related to sound node or codec.
  • If any machine driver changes are done.

Follow troubleshooting section here, for more info Audio Setup and Development — Jetson Linux
Developer Guide 34.1 documentation (nvidia.com)

For your query, “aplay -Dhw:1,1” → aplay -Dhw:card,pcm_id.

  • card is APE card number.
  • pcm_id detail can be found here for id 1, cat /proc/asound/card1/pcm1p/info. Corresponding ADMAIF should be used in the mixer settings.

Hi,Sheetal.G
I asked our hardware designer and he said the sgtl5000 codec is a slave. How do I configure it?

Please make sure you had done Tegra I2S2 pinmux settings.

To use codec as master, I2S2 codec master mode control value should be cbm-cfm and to use codec as slave it should be cbs-cfs

Please follow Audio Setup and Development — Jetson Linux<br/>Developer Guide 34.1 documentation step by step. It will guide you how to configure codec as master/slave.

If still there is issue, please share all the details asked in previous comment.

Hi,if I set the configuration to 1: Custom Header Config: <HDR40 FE-PI Audio V1 and Z V2>, the dtb I modified was replaced. How Can I merge it?
The information you need is listed.
1.The file is the result of pinconf-groups.
pinconf-groups.txt (39.3 KB)
2.Only one command is executed
sudo amixer -c APE cset name=“I2S2 codec master mode” “cbs-cfs”
3.DTS modified related to sound and codec is as following.
audio.patch (9.9 KB)
4.No machine driver is changed.

Hi,

I didn’t say the I2S2 reset fail print won’t come.The error come as before.

I am not saying that you said that. I meant as you had mentioned codec is slave in above comment. If that is the case, the print you are getting is unexpected.
That print will come only if Tegra I2S2 is slave.

Hi,
I reviewed the hardware schematic diagram and discovered that the sgtl5000 is connected to the I2S1 of Orin. So, I changed the devicetree from I2S2 to I2S1, And the aplay can play music rightly.
But there is a defect that the volume is small. I have set the volume of sgtl5000 to the biggest value, but there is no improvement.Do you have any idea.

Hi,
Glad to know it’s working.

For volume there are multiple controls like “PCM Playback Volume”, “Headphone Playback Volume”, “Lineout Playback Volume”.

Please note, setting maximum value to control doesn’t mean it sets max volume.
For example, for “PCM Playback Volume” value 0x3C → 0dB, 0x3D → -0.5dB and 0xFC & more is muted. That means setting 0x3C to that control sets max volume for this control.

Which mixer control and what value you are trying to set?

Please check the register values as mentioned here,

Hi,
I have operation on I2C directly.The following is the command I inputed.
i2ctransfer -f -y 8 w4@0x0A 0x00 0x10 0x3c 0X3c
i2ctransfer -f -y 8 w4@0x0A 0x00 0x2E 0x0 0X0

Hi,
As I understood, you are trying to write DAC volume and LINEOUT volume registers.

  • For LINEOUT that is 0x2E try 0x0d0d value.
  • Also change the 0x30 register value to 0x72f9.

If it doesn’t help, please provide the codec register dump

$ sudo cat /sys/kernel/debug/regmap/<i2cbus>/registers

Hi,
It doesn’t help.
The register table is following.
000: a011
002: 0071
004: 0001
006: 0130
00a: 0010
00e: 0200
010: 3c3c
014: 015f
020: 0000
022: 1818
024: 0133
026: 0068
028: 01f1
02a: 0170
02c: 0322
02e: 0d0d
030: 72fb
032: 7599
034: 0000
036: 0017
03a: 0000
03c: 0000
100: 0011
102: 0000
104: 0040
106: 051f
108: 0003
10a: 0040
10c: 0000
10e: 0000
110: 0000
116: 002f
118: 002f
11a: 002f
11c: 002f
11e: 002f
120: 8000
122: 0000
124: 5100
126: 1473
128: 0028
12a: 0050
12c: 0000
12e: 0000
130: 0000
132: 0000
134: 0000
136: 0000
138: 0000
13a: 0000

same, i dont know how to do it

Hi,

I would suggest to not to configure registers using I2C transfer. Please use codec mixer controls to set the volume. After setting the controls, you can compare the register settings with values mentioned in comment#10.

If register values matches and still volume is very less,
Please share the codec mixer control settings done before running the usecase.

Are you using LineOut or Headphone?

Hi,
I’m using LineOut.
I input the command amixer -c APE cset name="H40-SGTL Lineout Playback Volume" "31"
The following is the command output. I try to modify the value of 31,but there is no improvement.
########command output start################
numid=446,iface=MIXER,name=‘H40-SGTL Lineout Playback Volume’
; type=INTEGER,access=rw—R–,values=2,min=0,max=31,step=0
: values=31,31
| dBscale-min=-15.50dB,step=0.50dB,mute=0
########command output end################

Value 31 might reduce the volume to the lowest.
As mentioned in comment#10 try value 18 rather than 31.

Are you setting up only one control of codec? How are you enabling LineOut?
I think there would be some more codec controls to be set to enable LineOut.

I am not sure exactly what all controls need to be set. Please check with codec guys.

Hi,
The problem is appeared in the following register. When the value is 0x0033, the volume becomes normal.

Thanks for letting me know.
As i compared the register values i had shared with yours found LineOut was muted.
Probably setting up “Lineout Playback Switch” will unmute it.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.