Trying TAS5719 in AGX Xavier DevKit

We are trying to add TAS5719 using TAS5719EVM with MC57xxPSIA in AGX Xavier DevKit

I have attached the updated device tree here
tegra194-audio-p2822-0000.dtsi (9.5 KB)

We have enabled the MCLK05, I2S2 CLK, FS, SDIN, SDOUT functions in pinmux and verified in /sys/kernel/debug/pinctrl/2430000.pinmux/pinconf-groups

we could see around 24 ADMAIF entries in aplay -l command
we can see a analog sound in audio setting window
But we hear no sound

Is the device tree entry correct ?

Hi Sathishkumar,
Before, I could comment on the possible issue. Can you provide below info

  1. Are you running audio playback on GUI or with aplay command?.
  2. Does the playback completes running for full duration time?.
  3. Provide dump of cat /sys/kernel/debug/clk/clk_summary

One quick point, based on assumption you play on GUI. By default the playback uses I2S1 onboard RT5658 codec with ADMAIF1 for playback. So you may not hear any audio on the I2S2.

If you not tried with commandline, give a try with aplay -D hw:APE,1

We commented out the default rt5659 entry in our modified dtsi file.

  1. Are you running audio playback on GUI or with aplay command?.
  • When we play in GUI, and if we select the HDMI speaker in GUI Audio setting, we are able to hear the sound through HDMI monitor speaker
  • When we play in GUI, and if we select the Analog sound (our TAS5719) in GUI Audio setting, we are unable to hear any sound in the TAS5719 board speaker.
  • When we play in aplay using default by selecting HDMI speaker in GUI Audio setting, it plays sound in HDMI speaker
  • When we play in aplay using -D hw:APE,1 by selecting Analog Speaker in GUI Audio setting, there is no sound in TAS5719 board speaker
  1. Does the playback completes running for full duration time?.
    Yes, aplay also waits till the end of audio, but no sound

  2. Provide dump of cat /sys/kernel/debug/clk/clk_summary
    clk_summary.log (58.1 KB)

Output of aplay -l
aplay_ll.log (3.4 KB)

Output of aplay -L
aplay_ul.log (11.0 KB)

Output of pacmd list-cards
pacmd_list-cards.log (3.4 KB)

Output of pacmd list-sinks
pacmd_list-sinks.log (3.6 KB)

Can you provide the clk_summary during the playback session active. Current log indicates it was taken without playback session active.

Also, what are the mixer controls configured for TAS5719 codec before playback?. Note, this codec might require some mixer control settings for playback to work.

Please provide the dump of “amixer -c APE controls”

amixer -c APE cset name=“ADMAIF1 Mux” I2S2
amixer -c APE cset name=“I2S2 Mux” ADMAIF1
amixer -c APE cset name=“I2S1 Mux” None

If you not configured above commands manually for the TAS5719, please do so.

After setting the 3 amixer controls which you have specified, the aplay -D hw:APE,1 quits out immediately once executed sometimes with a underrun warning like the following

Playing raw data ‘file_example_MP3_5MG.mp3’ : Signed 16 bit Little Endian, Rate 8000 Hz, Mono
underrun!!! (at least 2.353 ms long)

When we try running aplay -D front:1, it takes the delay for the duration but no sound.
We saw front:! in pacmd list-sinks command output.
The below clk_summary is taken during a playback session using -D front:1
clk_summary_11sep_wplay.log (58.1 KB)

The dump of “amixer -c APE controls” is
amixer_APE_controls.log (75.4 KB)

Hi,
Please note, aplay will support only wavefile playback.

From clock log, I could see I2S2 is running but please try something like 48KHz, 2ch, 26bit wavefile for testing or use below command along with previous suggested command

speaker-test -D hw:APE,0 -r 48000 -c 2 -F S16_LE -t sine -f 1000 -l 5

Also check below codec controls for switch enable and volume

amixer -c APE cget name=“CVB-RT Master Volume”
amixer -c APE cget name=“CVB-RT Speaker Switch”
amixer -c APE cget name=“CVB-RT Speaker Volume”

I tried with a wav file , but no sound

when we try “speaker-test -D hw:APE,0 -r 48000 -c 2 -F S16_LE -t sine -f 1000 -l 5”, the output is
(But no sound)

speaker-test 1.2.2

Playback device is hw:APE,0
Stream parameters are 48000Hz, S16_LE, 2 channels
Sine wave rate is 1000.0000Hz
Playback open error: -16,Device or resource busy

When we try using -D hw:APE,1, the output is
(But no sound)

speaker-test 1.2.2

Playback device is hw:APE,1
Stream parameters are 48000Hz, S16_LE, 2 channels
Sine wave rate is 1000.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 = 0.111664
0 - Front Left
1 - Front Right
Time per period = 0.112280
0 - Front Left
1 - Front Right
Time per period = 0.112326
0 - Front Left
1 - Front Right
Time per period = 0.112337
0 - Front Left
1 - Front Right
Time per period = 0.112316

The log for amixer -c APE controls today is
amixer_APE_controls.log (75.4 KB)

$ amixer -c APE cget name=“CVB-RT Master Volume”
numid=437,iface=MIXER,name=‘CVB-RT Master Volume’
; type=INTEGER,access=rw—R–,values=1,min=0,max=511,step=0
: values=0
| dBscale-min=-103.75dB,step=0.25dB,mute=0

$ amixer -c APE cget name=“CVB-RT Speaker Switch”
numid=439,iface=MIXER,name=‘CVB-RT Speaker Switch’
; type=BOOLEAN,access=rw------,values=2
: values=on,on

$ amixer -c APE cget name=“CVB-RT Speaker Volume”
numid=438,iface=MIXER,name=‘CVB-RT Speaker Volume’
; type=INTEGER,access=rw—R–,values=2,min=0,max=511,step=0
: values=415,415
| dBscale-min=-103.75dB,step=0.25dB,mute=0

$ amixer -c APE cset name=“CVB-RT Master Volume” 415
numid=437,iface=MIXER,name=‘CVB-RT Master Volume’
; type=INTEGER,access=rw—R–,values=1,min=0,max=511,step=0
: values=415
| dBscale-min=-103.75dB,step=0.25dB,mute=0

How to know which is the correct device string to specify for -D in aplay ?

-Dhw:APE,‘‘d’’ → d is decided based ADMAIFx Mux connected to I2S2, were d is x-1, for e.g ADMAIF1 ->d =0, ADMAIF2 ->d=1 etc…

You are using I2S2 for the codec and it is connected to ADMAIF1 as per the previous commands. So you have to use -Dhw:APE,0

Playback open error: -16,Device or resource busy

The above states userspace is holding the pcm device, So you can try playing on GUI apps.

We captured the trace log using sudo cat /sys/kernel/debug/tracing/trace
audio_trace.log (223.1 KB)

Does this log show any clue for the issue ?

Hi,
From the trace, the DAPM path is connected up to Codec. So playback should happen for full duration of audio file.

Can you check the register configs on codec side or contact codec vendor with the register dump info. From this log, the audio data should be sent to codec.

If you have scope, you can verify the SDOUT signal for the audio data sent out of tegra.

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