Improve quality of sound in PULSEAUDIO for GNU/Linux distros

Discussion in 'Soundcards, Speakers HiFI & File formats' started by anticupidon, Nov 26, 2017.

  1. anticupidon

    anticupidon Ancient Guru

    Likes Received:
    Hello gurus!
    Sound quality in modern distros is and was a pet peeve of mine, I can't stand muddy, mushy sound when I know that the same hardware in Windows just rocks...
    So, I wanted to share a nice tweak with notable improvement in sound quality for the modern distros.

    Before anything, make a back-up of the /etc/pulse/daemon.conf, to revert to it, in the case of any issue.

    Alright, follow me.
    Open the terminal with root privileges and type:

    sudo nano /etc/pulse/daemon.conf
    I use nano for editing etc/ configuration files, you can use whatever you want (vim, gedit, leafpad, kate...)

    After you opened the configuration file look for this lines:

        ; resample-method = speex-float-1
        ; default-sample-format = s16le
        ; default-sample-rate = 44100

    The last 2 lines are together, the first is found a bit closer to the beginning of the configuration file.
    Change the 3 lines to the following :

        ; resample-method = src-sinc-best-quality
        ; default-sample-format = s24le
        ; default-sample-rate = 96000
    Press Ctrl+O to save the changes, press Enter, and Ctrl+X to exit.
    You need to uncomment the lines, as in deleting the "; " sign and deleting the blank space between the line and the left part of the configuration file (just to make sure that the code is clean).

    After, that you need to restart PulseAudio with the following commands:

    pulseaudio -k
    pulseaudio –start
    Or you can log out, then log in your account.The sound quality will improve, and for me, it was a night and day difference.In the case that sound quality has not improved, or should you experience some bugs or some issues, revert to the default values.
    RzrTrek likes this.
  2. RealNC

    RealNC Ancient Guru

    Likes Received:
    EVGA GTX 980 Ti FTW
    The src resampler is deprecated. It eats too much CPU for no benefit. The speex float resampler is recommended. speex-float-5 is enough even for hardcore audiophiles.

    Also, unless you remove the leading ";" from these lines, they have no effect.

    Furthermore, if you don't use 96kHz material, you should stick to 48kHz. PulseAudio will switch between 44 and 48 depending on what you play, meaning no resampling is done when not needed.
  3. Alexander The Sexy

    Alexander The Sexy New Member

    Likes Received:
    NVIDIA GTX 660
    Hi there,

    If I may make a suggestion?
    Have you considered testing the Open Sound System (OSS)?
    I have used it successfully on my Linux system, and the difference between it and the included ALSA driver is night and day; much higher resolution.
    Apparently, the OSS driver feeds a higher voltage to the sound hardware (in summary) and probably does some other "voodoo" (forgive the pun).
    But I must say, the audio improvement was drastic.

    There is one catch.... no audio in Mozilla FireFox, and the latest version of Google Chrome. The audio did work in version of Chrome, but stopped after updating to the latest version. Both browsers are compiled to use ALSA.
    But every other major software audio player works flawlessly.
    Just remember to completely disable ALSA and reboot the system before installing OSS. The process is reversible.

    My two cents... Cheers.
  4. anticupidon

    anticupidon Ancient Guru

    Likes Received:
    After months of tweaking, I think I finally found the best settings and from a very reliable source. Anyone here knows Wendel from Level1?
    Here it goes:


    default-sample-format = float32le
    default-sample-rate = 19200
    alternate-sample-rate = 96000
    default-sample-channels = 5.1
    default-channel-map = front-left, front-right, rear-left, rear-right, center, LFE
    default-fragments = 2
    default-fragment-size-msec = 125
    resample-method = speex-float-10
    enable-lfe-remixing = yes
    high-priority = yes
    nice-level = -11
    realtime-scheduling = yes
    realtime-priority = 9
    rlimit-rtprio = 9
    daemonize = no

  5. sverek

    sverek Ancient Guru

    Likes Received:
    NOVIDIA -0.5GB
    I am not familiar with this program, but 19200 for default sample rate is weird. Why not just use 44100 or 48000 which is half of 96000.

    Most sources will be 44100 / 48000.
    INSTG8R likes this.
  6. RzrTrek

    RzrTrek Ancient Guru

    Likes Received:
    RX 580 ❤ MESA 19.2
    Your solution didn't improve my audio, but I found that my levels were a bit low in alsamixer and I had to bump my 4/8/16kHz with +3dB in pulseeffects.

    However I've not found an easy fix for youtube always normalizing my videos, though I remember having this issue back on Windows 10 as well.

    I know there was a switch back in Windows, where I could change the power from performance, standard and extreme (very loud), but I've not found the setting anywhere.

    Also having bought a new pair of 250 ohm headphones (will get them next week), it will be interesting to see what kind of soundcards has proper driver support,

    but I know there's a dedicated thread for that topic:
    Last edited: Nov 11, 2019
  7. tdog87

    tdog87 New Member

    Likes Received:
    amd R9 380+
    ... some correction i had to figure out the hard way ... also remove ( ; ) for setting to work "over-ride defaults
    1. (default-sample-format = float32le) --- this is set different for almost every CPU/MB . and should be set to your system , as in my default is (s16le) , and was changed to (s32le) for 32bit sound... when i used float32le my CPU use went into 5-10% and lagged every game... and did not sound as good as s32le ... you need to figure out what your default is then change (16 to "24, or 32"
    ) so if you have float16le , change to float32le or s16be to s32be

    2. (default-sample-rate) .. to run at 96k is strait up - a wast of CPU and on "good/premium hard-ware" sounds Poopy ... 48k sounds best , and minimal impact to CPU, .. use 96k for your (alternate-sample-rate)
    the biggest impact to sound while up scaling is (resample-method) and to my ears (soxr-vhq) sounded best and i have no performance penalty ..

    resample-method = soxr-vhq
    default-sample-format = s32le
    default-sample-rate = 48000
    alternate-sample-rate = 96000
    ; default-sample-channels = 2
    ; default-channel-map = front-left,front-right

    (my setup is )
    sound blaster x-fi (PCI)
    Crusher Wireless, bass you can feal (S6CRW) "using audio cord wired in"
  8. anticupidon

    anticupidon Ancient Guru

    Likes Received:
    Well, I have to finish my build and install from 0 .
    Will test your settings, and give some feed back. Your contribution matters.
    And welcome to the forums, enjoy!

Share This Page