HiFi/HiRes Audio in Linux/Pipewire

First off, I want to say that I’m not an audio expert, but I could say I’m an enthusiast, so don’t expect anything marvelous from what I’m writing… Initially, I had an old SoundBlaster X-Fi (below average), I used it with the RCA output and a converter to 3.5mm, eventually, I upgraded to a FiiO BTR15 DAC and was surprised that with newer hardware I couldn’t achieve an audio quality level anywhere close to what I had with my SoundBlaster.

Spoiler alert: This journey is crazy, since not everything is as “plug and play” as one would hope, so I decided to see what would happen if I thoroughly checked and finally found some configuration parameters that greatly improved the audio quality.

Here, I’m going to share my initial findings:

  • Forget Bluetooth, the 2.4GHz frequency is too saturated to transmit audio at the quality I desire… Although it claims to transmit at 96Khz, there was less blending in the 44Khz over USB, both on the computer and the Android phone, meaning: the instruments were more distinguishable.
  • Dual DAC? Don’t forget to activate this option from your FiiO Control (Android App). On paper, it should improve audio, in practice… don’t expect much.
  • 3.5mm vs Balanced Audio 4.4mm: (Waiting for the cable), this should greatly improve the audio. When you get a new DAC, nobody tells you (at least the noobs like me) that using balanced outputs is not just a matter of power; it also improves quality. Something similar happens when you connect your headphones to the headphone port of the SoundBlaster vs the RCA port… you get not only more power but also significantly higher audio quality at lower volumes (bingo).
  • 44Khz? Most people use 44Khz audio, I have nothing more than Spotify or a couple of FLACs that come in 44Khz… and in fact, all the comments say that the “audio source” in any operating system is going to set the transmission rate to the DAC are not really true, you can change it and make some difference…

What did I discover about 44Khz?

Maybe other OS’s will switch the DAC to upper transmission rates, but this isn’t particularly true in Linux, you can manually change the transfer rate to the DAC from Linux, and this really seems to make a difference, greatly reducing the
blending even more…

How to change the transmission rate it in Linux?

Very simple (or not so much for some), but it goes something like this:

In Fedora, there isn’t a /etc/pipewire directory by default, so you must create it:

cp -a /usr/share/pipewire /etc/

And now we create a configuration file for the transfer rate:

cd /etc/pipewire/pipewire.conf.d/
cp -a ../pipewire.conf.avail/10-rates.conf .

And we edit it:

nano /etc/pipewire/pipewire.conf.d/10-rates.conf

The file should end up looking something like this:

context.properties = {
    default.clock.rate          = 384000
    default.clock.allowed-rates = [ 48000 44100 96000 192000 384000 ]
}

And for wireplumber, we copy a similar file:

cd /etc/wireplumber/main.lua.d/
cp -a /usr/share/wireplumber/main.lua.d/50-alsa-config.lua .

We edit the file:

nano /usr/share/wireplumber/main.lua.d/50-alsa-config.lua

And uncomment and modify the following lines (`audio.rate`/`audio.allowed-rates`):

      ["audio.rate"]             = 384000,
      ["audio.allowed-rates"]    = "44100,48000,96000,192000,384000",

After restarting your computer… the audio will be better.

In my case (for some reason), even if the source is 44Khz, improving this audio.rate improved the overall audio performance to an acceptable level, however, the sound blaster X-Fi using the RCA port is still a little bit better at this point and I’m still waiting to test the balanced audio using the FiiO(test pending…).

Some other recommendations:

  • Do not put the DAC in an overloaded USB HUB, as it won’t get enough power to function properly.
  • Keep the DAC away from energy-emitting sources (e.g., Bluetooth/WiFi/GSM devices).
  • Don’t forget to set Spotify to download at the best quality at all times and turn off the “auto adjust quality”… and remember that this may consume extra data and put extra-wait times.
  • FLAC files and other better/HiFi streaming sources will also make a huge difference.
  • If you can’t hear the audio after this, try downgrading the audio.rate and the default.clock.rate in both files (192Khz, 96Khz…)
  • Use pavucontrol to select the FiiO BTR15 “Pro Audio” profile.
  • PLEASE!! don’t forget to use the balanced connection…

Leave a Reply