Choppy Audio When Using Line-In
Version, Distribution, Desktop Environment:
Distribution: Arch Linux
Desktop Environment: dwm Versions:
pipewire 1:0.3.26-1
pipewire-jack 1:0.3.26-1
pipewire-jack-dropin 3-1
pipewire-media-session 1:0.3.26-1
pipewire-pulse 1:0.3.26-1
pulseaudio-alsa 1:1.2.2-2
Description of Problem:
When I connect any port from the Line-In card to the same output device that Spotify is playing to, audio gets very choppy when Discord plays a notification sound.
How Reproducible: Essentially 100% of the time
Steps to Reproduce:
- Configure Spotify to play back to a device
- Connect the Line-In sound card to the same device
- Set Discord to use the same device
- Play music on Spotify
- Have discord play any sound (Note: This does not work if you're currently in a voice channel)
Actual Results:
Audio gets really choppy and the following is output in journalctl
:
May 01 17:47:38 aus-box pipewire[743245]: alsa-pcm front:1: follower delay:8203 target:512 resync -0.000005 -0.000008 -0.000016
May 01 17:47:39 aus-box pipewire[743245]: alsa-pcm front:1: follower delay:518 target:512 resync 0.004407 0.002867 0.000109
May 01 17:47:39 aus-box pipewire[743245]: alsa-pcm front:1: follower delay:519 target:512 resync 0.003619 0.001814 0.000041
May 01 17:47:39 aus-box pipewire[743245]: alsa-pcm front:1: follower delay:513 target:512 resync 0.003062 0.001302 0.000022
May 01 17:47:39 aus-box pipewire[743245]: alsa-pcm front:1: follower delay:527 target:512 resync 0.003015 0.001189 0.000018
May 01 17:47:39 aus-box pipewire[743245]: alsa-pcm front:1: follower delay:527 target:512 resync 0.002764 0.000999 0.000013
May 01 17:47:39 aus-box pipewire[743245]: alsa-pcm front:1: follower delay:513 target:512 resync 0.002369 0.000773 0.000009
May 01 17:47:39 aus-box pipewire[743245]: alsa-pcm front:1: follower delay:514 target:512 resync 0.002236 0.000689 0.000007
May 01 17:47:39 aus-box pipewire[743245]: alsa-pcm front:1: follower delay:532 target:512 resync 0.002388 0.000734 0.000008
May 01 17:47:39 aus-box pipewire[743245]: alsa-pcm front:1: follower delay:524 target:512 resync 0.002161 0.000621 0.000006
May 01 17:47:39 aus-box pipewire[743245]: alsa-pcm front:1: follower delay:539 target:512 resync 0.002280 0.000656 0.000007
May 01 17:47:39 aus-box pipewire[743245]: alsa-pcm front:1: follower delay:526 target:512 resync 0.002019 0.000541 0.000005
May 01 17:47:39 aus-box pipewire[743245]: alsa-pcm front:1: follower delay:538 target:512 resync 0.002108 0.000564 0.000005
May 01 17:47:39 aus-box pipewire[743245]: alsa-pcm front:1: snd_pcm_status error: Broken pipe
May 01 17:47:40 aus-box pipewire[743245]: alsa-pcm front:1: follower delay:16394 target:16384 resync 0.006021 0.005634 0.000516
May 01 17:47:40 aus-box pipewire[743245]: alsa-pcm front:1: follower delay:9096 target:512 resync 0.000050 0.000050 0.000011
May 01 17:47:40 aus-box pipewire[743245]: alsa-pcm front:1: follower delay:531 target:512 resync 0.001641 0.000281 0.000000
May 01 17:47:40 aus-box pipewire[743245]: alsa-pcm front:1: follower delay:533 target:512 resync 0.001884 0.000465 0.000004
May 01 17:47:40 aus-box pipewire[743245]: alsa-pcm front:1: follower delay:543 target:512 resync 0.001964 0.000487 0.000004
May 01 17:47:40 aus-box pipewire[743245]: alsa-pcm front:1: follower delay:519 target:512 resync 0.001607 0.000363 0.000003
May 01 17:47:40 aus-box pipewire[743245]: alsa-pcm front:1: follower delay:526 target:512 resync 0.001655 0.000374 0.000003
May 01 17:47:40 aus-box pipewire[743245]: alsa-pcm front:1: follower delay:534 target:512 resync 0.001698 0.000384 0.000003
May 01 17:47:40 aus-box pipewire[743245]: alsa-pcm front:1: follower delay:539 target:512 resync 0.001735 0.000391 0.000003
May 01 17:47:41 aus-box pipewire[743245]: alsa-pcm front:1: follower delay:549 target:512 resync 0.001798 0.000407 0.000003
May 01 17:47:41 aus-box pipewire[743245]: alsa-pcm front:1: follower delay:517 target:512 resync 0.001409 0.000287 0.000002
May 01 17:47:41 aus-box pipewire[743245]: alsa-pcm front:1: follower delay:523 target:512 resync 0.001441 0.000294 0.000002
May 01 17:47:41 aus-box pipewire[743245]: alsa-pcm front:1: follower delay:527 target:512 resync 0.001463 0.000298 0.000002
May 01 17:47:41 aus-box pipewire[743245]: alsa-pcm front:1: follower delay:533 target:512 resync 0.001499 0.000306 0.000002
May 01 17:47:41 aus-box pipewire[743245]: alsa-pcm front:1: follower delay:538 target:512 resync 0.001530 0.000313 0.000002
May 01 17:47:41 aus-box pipewire[743245]: alsa-pcm front:1: follower delay:545 target:512 resync 0.001564 0.000320 0.000002
May 01 17:47:41 aus-box pipewire[743245]: alsa-pcm front:1: follower delay:548 target:512 resync 0.001565 0.000318 0.000002
May 01 17:47:41 aus-box pipewire[743245]: alsa-pcm front:1: follower delay:556 target:512 resync 0.001609 0.000328 0.000002
May 01 17:47:41 aus-box pipewire[743245]: alsa-pcm front:1: follower delay:515 target:512 resync 0.001191 0.000215 0.000001
May 01 17:47:41 aus-box pipewire[743245]: alsa-pcm front:1: snd_pcm_status error: Broken pipe
May 01 17:47:41 aus-box pipewire[743245]: alsa-pcm front:1: follower delay:16395 target:16384 resync 0.006021 0.005634 0.000516
Expected Results:
The audio plays normally
Additional Info Eg. pw-dump -N > file
(As Attachment Please):
This does not appear to affect mpd
, but does affect mpv
but to a lesser extent of Spotify. I'm also thinking that this has something to do with the buffer size that Pipewire is currently using. When Spotify is being played, the buffer size is set to 8192
, as reported through Catia. However, whenever Discord plays notifications, it changes the buffer size to 256
. When connected to voice on Discord, the Sample Rate appears to be fixed at 1024
and does not change, despite playing notification sounds.