You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] HDA audio output garbled on MTL & cAVS2.5 with native Zephyr DMA+DAI #6709
@kv2019i I checked the alsabat on TGL-UP board with IPC4 fw/driver. it can pass the test and the audio wav looks perfect.
ubuntu@sh-tglu-up-hda-04:/tmp$ ~/sof-test/test-case/check-alsabat.sh -p hw:sofhdadsp,0 -c hw:Device,0
2022-12-05 09:31:06 UTC [INFO] ktime=84160 sof-test PID=6883: starting
2022-12-05 09:31:06 UTC [WARNING] NO MODEL is defined. Please define MODEL to run alsa_settings/MODEL.sh
2022-12-05 09:31:06 UTC [INFO] Starting /home/ubuntu/.local/bin/mtrace-reader.py
2022-12-05 09:31:06 UTC [INFO] check the PCMs before alsabat test
2022-12-05 09:31:08 UTC [COMMAND] alsabat -Phw:sofhdadsp,0 --standalone -n 240000 -r 48000 -c 2 -F 997
alsa-utils version 1.2.2
Entering playback thread (ALSA).
Get period size: 2048 buffer size: 16384
Playing generated audio sine wave
2022-12-05 09:31:09 UTC [COMMAND] alsabat -Chw:Device,0 -c 1 -r 48000 -F 997
alsa-utils version 1.2.2
Entering capture thread (ALSA).
Get period size: 3000 buffer size: 24000
Recording ...
Capture completed.
BAT analysis: signal has 65536 frames at 48000 Hz, 1 channels, 2 bytes per sample.
Channel 1 - Checking for target frequency 997.00 Hz
Amplitude: 23524.8; Percentage: [71]
Detected peak at 996.83 Hz of 35.86 dB
Total 42.0 dB from 983.64 to 1010.01 Hz
PASS: Peak detected at target frequency
Detected at least 1 signal(s) in total
Return value is 0
Playback completed.
Return value is 0
2022-12-05 09:31:14 UTC [INFO] pkill -TERM -f mtrace-reader.py
2022-12-05 09:31:14 UTC [INFO] ktime=84168 sof-test PID=6883: ending
2022-12-05 09:31:14 UTC [INFO] Test Result: PASS!
Hmm, something is off here. @singalsu , @ujfalusi both got the audio problem. I just retried building kernel (sof-dev of today 41f9d4fe31be334ece6ec0a1829b730342f9c900), rebuild tplg (main of today 7029fb7) and rebuild FW (main of today 7029fb7) and I still get the garbled audio.
Dmic seems to be ok, so at least some of the DMAs are running as expected. The FW log also seems ok, performance is at expected level and no xruns are reported.
@mengdonglin Not enabled, this happens with plain aplay to native PCM, so audio servers should not interfere.
Also tested today:
forcing DMI-L1 off (-> no impact)
older test branch for native drivers: SOF c04b406fd0a1085ba5b1dee888c2bbcf0c601ba0 , Zephyr bd60b9289a635aedf80fc997e6b2a2de56fe5786 (-> issue still seen)
@keqiaozhang If there are other tests with 1000 Hz it's a good idea to replace in all of them the frequency. When the frequency is a prime it will ensure all possible PCM codes are exercised in the test over time. With 1 kHz @ 48 kHz only 25 different PCM code values are used.
changed the title [-][BUG] HDA audio output garbled on cAVS2.5 with native Zephyr DMA+DAI[/-][+][BUG] HDA audio output garbled on MTL & cAVS2.5 with native Zephyr DMA+DAI[/+]on Jan 4, 2023
Activity
kv2019i commentedon Dec 2, 2022
FYI @mengdonglin @lgirdwood , this
potentiallyaffects sof-2.4 stable branch as well. Confirmed to happen also with sof-2.4.marc-hb commentedon Dec 2, 2022
@kv2019i , @singalsu is this too small for https://github.com/thesofproject/sof-test/blob/main/test-case/check-alsabat.sh to notice?
kv2019i commentedon Dec 3, 2022
@marc-hb alsabat should definitely pick this up.
keqiaozhang commentedon Dec 5, 2022
@kv2019i I checked the alsabat on TGL-UP board with IPC4 fw/driver. it can pass the test and the audio wav looks perfect.
kv2019i commentedon Dec 5, 2022
Hmm, something is off here. @singalsu , @ujfalusi both got the audio problem. I just retried building kernel (sof-dev of today 41f9d4fe31be334ece6ec0a1829b730342f9c900), rebuild tplg (main of today 7029fb7) and rebuild FW (main of today 7029fb7) and I still get the garbled audio.
Dmic seems to be ok, so at least some of the DMAs are running as expected. The FW log also seems ok, performance is at expected level and no xruns are reported.
mengdonglin commentedon Dec 5, 2022
@kv2019i @singalsu @ujfalusi @keqiaozhang Do you have PulseAudio or Pipewire enabled during your test?
kv2019i commentedon Dec 5, 2022
@mengdonglin Not enabled, this happens with plain aplay to native PCM, so audio servers should not interfere.
Also tested today:
lgirdwood commentedon Dec 5, 2022
Do FW logs show any issues re underruns ?
Is audio garbled with less gain i.e. overall gain at -3dB or -6dB
Is there a wav capture to append ?
ujfalusi commentedon Dec 5, 2022
@lgirdwood, this is what I have in firmware log when playing audio to HDMI. The audio is garbled and it is playing in slow motion (1.5 times slower):
The <wrn> lines are flooding the log ^
Analog playback (garbled, distorted, but correct speed):
Nothing special to my eyes in the log.
bardliao commentedon Dec 6, 2022
I can reproduce the issue on my Up Xtreme board (TGL) with the specific recipe
Kernel: c693d0caf6fa
SOF: f6f9b62
14 remaining items
singalsu commentedon Dec 7, 2022
@keqiaozhang If there are other tests with 1000 Hz it's a good idea to replace in all of them the frequency. When the frequency is a prime it will ensure all possible PCM codes are exercised in the test over time. With 1 kHz @ 48 kHz only 25 different PCM code values are used.
check-alsabat.sh: use 821Hz as default test frequency
keqiaozhang commentedon Dec 19, 2022
@kv2019i this issue is still reproducible on main branch, any Zephyr change missed on main branch?
kv2019i commentedon Dec 19, 2022
@keqiaozhang This bug will be fixed with this fix, which is still in review:
[-][BUG] HDA audio output garbled on cAVS2.5 with native Zephyr DMA+DAI[/-][+][BUG] HDA audio output garbled on MTL & cAVS2.5 with native Zephyr DMA+DAI[/+]marc-hb commentedon Jan 4, 2023
Stupid Github auto-close not waiting for daily tests results.
keqiaozhang commentedon Jan 9, 2023
Confirmed that this issue is fixed by #6823