-
Notifications
You must be signed in to change notification settings - Fork 325
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pulseaudio: occasional glitches with some clients and configs #515
Comments
@ZhendanYang please turn on pulseaudio debug and paste the logs here. Must be something pulseuadio is complaining about. |
Still can be reproduced with kernel branch debug/v4.19-backport, on APL UP2 platfrom. STEP: Test env: Pulseaudio log: |
@ZhendanYang can you attach a capture of the noise as a small wav file and some screen shots of audacity of the noise at zoom in and zoom out levels (play a sine wave) |
I used aplay and paplay to playback the same sine wave, only paplay has noise issue. zql@zql-MB-T:~$ aplay -D hw:0,0 -c2 -r 48000 -f s16_le sweep.wav -vv -i zql@zql-MB-T:~$ paplay sweep.wav I recorded one sine wave for each: Here are the three sine wave files: |
@ZhendanYang thanks, good info - btw its best to use a constant frequency sine wave in the future, that way it's easy to work out duration of any glitches. Can you confirm that PA was enabled during the aplay test (i.e. PA was running during aplay usage). I need to rule out if this was paplay only issue. Fwiw looks like PA (via paplay) is using period of 84ms and buffer of 340ms
but it is rewinding
This could be a race between PA writing data and DSP reading during the rewind. |
@lgirdwood |
@ZhendanYang since it's paplay only issue (and nobody uses paplay directly) I've moved to P3 as it may be paplay trying to rewind too close to the pointers. |
@ZhendanYang @lgirdwood |
@keqiaozhang |
@ZhendanYang can you confirm pulseaudio running when playing youtube ? |
@lgirdwood If pulseaudio is disabled, then paplay can't work and youtube videos are all silent. |
@ZhendanYang ok, so you are confirming that pulseaudio is running whilst using youtube is playing ? (btw, web browsers can still play youtube media with pusleaudio disabled). If yes, this issue is more to do with pulseaudio and certain client configurations playing audio. I've changed the title and can you attempt to reprodue with aplay + pulseaudio (but use aplay command line switch to use same buffer/period sizes as paplay) |
@lgirdwood I'm confirming that pulseaudio is running whilst using youtube is playing.
I can't reproduce noise issue using aplay. Actually, except for paplay .wav file, system sounds also have such kind of noise, for example, the sound that I type 'Tab' key to automatically complete a word. |
@lgirdwood I retested pulseaudio on both apl and byt, got the result: Step: Env: Logger is blocked by #551 |
@Jiangxinx good investigative work ! DPIB mode should be enabled by default in kernel config (please check). Difference with DPIB position readback is accuracy and latency compared to IPC/SRAM position readback (where position reported can be up to 1ms old) probably causing PA to render to close to the DSP pointer. I will close this since it's not a problem with DPIB mode and aplay works fine, it just appears to be mostly related to paplay. @plbossart fyi. |
@keyonjie fyi who enables DPIB mode :-) However, Baytrail has no DPIB support and so always using IPC position update. So I expect MinnowBoard (BYT) can still suffer from this problem occasionally. |
Summary:
on BYT minnowboard and APL up2, pulseaudio playback is not smooth and has sticky noise. There is no error log in dmesg or sof-logger.
Reproduce step:
Test env:
up2 and minnowboard both with codec
sof-master: e101263
sof-stable1.2: 7dd4b
soft-master: b5eb15
kernel sof-dev: 03cadf8
tplg: sof-apl-pcm512x.tplg on up2 and test-ssp2-mclk-0-I2S-volume-s16le-s16le-48k-24000k-codec.tplg
Log:
sof-logger without parameter -t are both empty.
sof-logger with -t on BYT is empty.
logger-t-apl.txt
dmesg-apl.log
dmesg-byt.log
The text was updated successfully, but these errors were encountered: