Skip to content

Instantly share code, notes, and snippets.

@rowantran
Last active December 5, 2021 06:12
Show Gist options
  • Save rowantran/01630c60a0016eb493474ce1a79597c7 to your computer and use it in GitHub Desktop.
Save rowantran/01630c60a0016eb493474ce1a79597c7 to your computer and use it in GitHub Desktop.

Findings regarding USB DAC/Amp Audio Distortion on PulseAudio

All info is using the Audioengine D3. Unknown if these issues apply to other DACs as well. These issues likely apply to any DAC/amp setup, based on ArchWiki.

The problem was originally noted when using the D3 (via a USB extension cord but same issues occurred when plugged directly into motherboard) on an ASUS ROG Strix B350-F Gaming motherboard. When playing any audio over the DAC, it was severely distorted with a constant metallic bit-crushed effect. This issue was resolved when plugging the DAC into a USB2 port on the motherboard rather than a USB3 port.

After switching motherboards to an MSI B550-A Pro, the issue returned, even when using a USB2 port. After troubleshooting again, I found that the problematic lines were these two config lines in /etc/pulse/daemon.conf:

default-fragments = 2
default-fragment-size-msec = 2

Changing the default-fragment-size-msec parameter to 5 resolved the distortion issue. ArchWiki (as always) has a relevant section with the same findings, suggesting that these issues are caused by a too-small fragment size: https://wiki.archlinux.org/title/PulseAudio/Troubleshooting#Setting_the_default_fragment_number_and_buffer_size_in_PulseAudio

However, I am unsure why for the B350 motherboard, connecting to a USB2 port allowed me to use a 2ms fragment size, while connecting to a USB3 port didn't.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment