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] Audio playback gets heavily distorted after rapid pause/release on HDA analog output #7478
Describe the bug
While testing audio playback on hw:0,0 on UPX-i11 board I have checked pause/resume with aplay -i (holding key to rapid pause/resume) and after few seconds the audio playback got corrupted.
The playback continued normally, firmware reported no issues, but the audio is completely distorted, high pitched and garbled.
To Reproduce
aplay -iv -Dhw:0,0 file.wav (48K 16bit)
Sounds good, no distortion.
Now, press and HOLD the <SPACE> key to rapid pause/resume aplay.
After few seconds you can hear that the sound starts to be up-shifted pitched, now release and if it is paused, press it again to resume.
Audio is pitched up, distorted, garbled
Not affecting HDMI (ChainDMA).
The same issue present on DeepBuffer PCM (-Dhw:0,31)
Reproduction Rate
10/10
Expected behavior
audio is not distorted
Environment
Branch name and commit hash of the 2 repositories: sof (firmware/topology) and linux (kernel driver).
changed the title [-][BUG] Audio playback gets heavily distorted after rapid pause/resume on HDA analog output [/-][+][BUG] Audio playback gets heavily distorted after rapid pause/release on HDA analog output [/+]on Apr 20, 2023
Update: it is not the rapid pause/resume, it can be a slow, pasue/resume, small wait, pause/resume.
After the 10th or so iteration the audio starts to be distorted.
this is the original tplg path:
I have tried with these variations:
all of them exhibiting the same issue, the last one (without gains) interestingly will reproduce it much faster (4th pause/resume sequence)
With a bit of fiddling, with this topology it is working without issue:
Activity
plbossart commentedon Apr 20, 2023
Someone was talking about finding something to keep themselves busy yesterday @ujfalusi.
Humm, wish granted, eh? wow, nice bug, this will be a tough one to crack.
[-][BUG] Audio playback gets heavily distorted after rapid pause/resume on HDA analog output [/-][+][BUG] Audio playback gets heavily distorted after rapid pause/release on HDA analog output [/+]ujfalusi commentedon Apr 21, 2023
Update: it is not the rapid pause/resume, it can be a slow, pasue/resume, small wait, pause/resume.
After the 10th or so iteration the audio starts to be distorted.
ujfalusi commentedon Apr 24, 2023
Update: it is not reproducible with the reference firmware.
ujfalusi commentedon Apr 24, 2023
this is the original tplg path:


I have tried with these variations:
all of them exhibiting the same issue, the last one (without gains) interestingly will reproduce it much faster (4th pause/resume sequence)
With a bit of fiddling, with this topology it is working without issue:

Pointing to mixin-mixout?
abonislawski commentedon Apr 25, 2023
Could be connected with mixin-out regression?
#7072
ujfalusi commentedon Apr 25, 2023
I'm using GCC to build the firmware, I got an XCC built binary and that works OK, I cannot reproduce the issue