Hi,
By original rate you mean, 8KHz and Mono Or 48KHz and Mono? Please share the audio file that is being used.
Test audio file is located in default Linux environment /usr/share/sounds/alsa/
The original file path and file format is below.
$ file Front_Right.wav
/usr/share/sounds/alsa/Front_Right.wav: RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, mono 48000 Hz
・Share the output of sudo cat /sys/kernel/debug/clk/clk_summary while running the playback with -D option,
We are attaching clk_summmary result while running following command.
# aplay -v -D hw:1,0 ./Front_Left_8000.wav
20240528_0917_playback_with_D_clk_summary.txt (78.7 KB)
・Next, Run amixer -c APE sset ‘I2S1 Client Channels’ 2 before running the usecase and see if it helps.
Also share the output of sudo cat /sys/kernel/debug/clk/clk_summary while playback is running.
# amixer -c APE sset 'I2S1 Client Channels' 2
Simple mixer control 'I2S1 Client Channels',0
Capabilities: volume volume-joined
Playback channels: Mono
Capture channels: Mono
Limits: 0 - 16
Mono: 2 [12%]
# aplay -v -D hw:1,0 ./Front_Left_8000.wav
Playing WAVE './Front_Left_8000.wav' : Signed 16 bit Little Endian, Rate 8000 Hz, Mono
Hardware PCM card 1 'NVIDIA Jetson AGX Orin APE' device 0 subdevice 0
Its setup is:
stream : PLAYBACK
access : RW_INTERLEAVED
format : S16_LE
subformat : STD
channels : 1
rate : 8000
exact rate : 8000 (8000/1)
msbits : 16
buffer_size : 4000
period_size : 1000
period_time : 125000
tstamp_mode : NONE
tstamp_type : MONOTONIC
period_step : 1
avail_min : 1000
period_event : 0
start_threshold : 4000
stop_threshold : 4000
silence_threshold: 0
silence_size : 0
boundary : 9007199254740992000
appl_ptr : 0
hw_ptr : 0
[ 2050.184069] tegra210-admaif 290f000.admaif: timeout: failed to disable ADMAIF1_TX
“amixer set client channels as 2” works for me.
Audio was heard normally from the left only.
But we heard some small noise from right while runnning.
And here is clk_summmary result.
i2s1 req_clk_rate is changed from 128000 to 256000 Hz.
20240528_0944_playback_with_channels2_clk_summary.txt (78.7 KB)
・Please try with 2 channel audio file and share the observation.
# wget https://freewavesamples.com/files/Alesis-Fusion-Voice-Oohs-C4.wav
# file Alesis-Fusion-Voice-Oohs-C4.wav
Alesis-Fusion-Voice-Oohs-C4.wav: RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, stereo 44100 Hz
# aplay -v -D hw:1,0 ./Alesis-Fusion-Voice-Oohs-C4.wav
Playing WAVE './Alesis-Fusion-Voice-Oohs-C4.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
Hardware PCM card 1 'NVIDIA Jetson AGX Orin APE' device 0 subdevice 0
Its setup is:
stream : PLAYBACK
access : RW_INTERLEAVED
format : S16_LE
subformat : STD
channels : 2
rate : 44100
exact rate : 44100 (44100/1)
msbits : 16
buffer_size : 8192
period_size : 2048
period_time : 46439
tstamp_mode : NONE
tstamp_type : MONOTONIC
period_step : 1
avail_min : 2048
period_event : 0
start_threshold : 8192
stop_threshold : 8192
silence_threshold: 0
silence_size : 0
boundary : 4611686018427387904
appl_ptr : 0
hw_ptr : 0
Playing stereo file is fine.
When specifying APE devices with -D option, do we always have to specify channels 2 via amixer?
Is the channels option (-c 2) of aplay not supported?
How to disable “timeout: failed to disable ADMAIF1_TX” error?