Steam for Linux

Steam for Linux

Enigmatic Nov 13, 2020 @ 8:48pm
Vanilla ALSA vs Pulseaudio
I've noticed something. Vanilla Alsa puts out way punchier sound. Comes out cleaner, It's actually pretty damn loud. My headphone amp is turned pretty low as well
I am using Shure 940s
and Electric Avenues PA2V2
Last edited by Enigmatic; Nov 14, 2020 @ 7:04pm
Originally posted by Aoi Blue:
Originally posted by Marlock:
proton games won't choose to use pulse or alsa, because they are made for windows where neither exists, so the choice must be made by Proton itself in that case

check protonDB for specific fixes for that one game... and maybe whatever windows users have been doing to fix it on their end is possible to do inside the proton prefix too?
To be specific it's libfaudio that choose the driver for them.
< >
Showing 1-15 of 29 comments
SIGKILL Nov 13, 2020 @ 11:57pm 
ALSA provides the low-level hardware sink with no default mixing. Pulse uses ALSA as a backend while providing a mixed sink for applications in a multitasking environment.

Most of the 'mushiness' from Pulse comes from the default fast-and-dirty mixing and resampling methods it uses. Flat volume adds more weirdness to the mix as well. You can configure ALSA's internal mixer (dmix) and remove Pulse entirely, but even Firefox gutted ALSA sink support, so goodl luck :(

Pulse has a lot of flaws, but there's enough middleware that can only interface with a PA sink that it's a bit of a necessary evil. You'll run into a bit of the same with Jack too.

Basically, for total 'audio purity', you don't want to perform any mixing / resampling at all, which means exclusive device access.

You can, however, tweak Pulse for better quality (at the expense of slightly more CPU overhead) by avoiding resampling and using greater precision mixing -- or force pulse to share a dmix sink with other applications that can directly use ALSA (can require a bit of tinkering)

If you do try out Jack, make sure to switch to a realtime kernel.
Last edited by SIGKILL; Nov 14, 2020 @ 12:04am
Enigmatic Nov 14, 2020 @ 12:58am 
My distro maintainer builds Firefox-esr with Alsa support. So never have any issues using ALSA only. Only from Hardware sometimes certain laptops are bit of a pain ie Speakers and Headphones at same time. But you can write quick scripts to switch your asound.conf. Desktop you sometimes have audio defaulting to Intel Integrated HDMI. It's simple to pipe everything through line out or Video card HDMI. Than your good to go. just a quick asound.conf and it's set up


But still only real issue I have. Is Civ 6. Seems like artificial barrier. The Voice doesn't work, but than it did work. As if something not on my end was going on. But than it wasn't working any more. (Edit: I did have an issue with Civ6 but seems it's resolved now)
Last edited by Enigmatic; Nov 14, 2020 @ 1:30am
SIGKILL Nov 14, 2020 @ 1:42am 
I understand what you mean about preferring ALSA. I use a pure ALSA config with HTPC, emulator and similar projects. Mostly because Pulse mutilates multichannel audio and its 'passthrough mode' is worthless where it matters most. Being able to set up upmix channel maps with ALSA is really nice too. Pure ALSA is great if you can get all your apps to play along and don't mind a little extra legwork.

I've definitely run across a good number of programs which only see Pulse audio sinks, which has led me to its use, somewhat begrudgingly.

Not sure if you just want to complain (which I've done plenty of myself haha) or want solutions. Like I said though, to maintain good compatibility you can make Pulse sound better, or let PA share a dmix sink for the software which won't play nice.
Last edited by SIGKILL; Nov 14, 2020 @ 1:43am
Enigmatic Nov 14, 2020 @ 3:08am 
I'm not sure how to build a dmix sink just for specific software.
How do you make pulse sound a little better? I might dig into this didn't know it was possible.
Marlock Nov 14, 2020 @ 5:22am 
Maybe PipeWire is a viable drop-in replacement already?
https://www.gamingonlinux.com/2020/09/bringing-together-audio-and-video-pipewire-for-linux-is-really-coming-along
PipeWire should also work directly with anything made for ALSA, PulseAudio and JACK - so you shouldn't see breakage with it.

Last I heard about it it was working fine when replacing ALSA in a system where original PulseAudio is running... so maybe by now its replacement for PulseAudio is good to go too? Worth investigating...

IIRC one of the things it was praised for is exactly making it easier to have higher quality and lower latency sound for software interfacing with PulseAudio instead of directly to ALSA.
Last edited by Marlock; Nov 14, 2020 @ 5:22am
[GNU] Debian Nov 14, 2020 @ 6:16am 
vanilla alsa + lower latency kernel, with jack 2
(if u know what ure doing)
Else, stick with pulse (u can install pavucontrol to help you to make pulseaudio suck less)
Last edited by [GNU] Debian; Nov 14, 2020 @ 6:18am
SIGKILL Nov 14, 2020 @ 2:18pm 
Originally posted by Jack Rubenstein:
I'm not sure how to build a dmix sink just for specific software.
You would create a normal dmixer, the configure pulse to share it the same as other applications. This prevents PA itself from taking advantage of hardware mixing (if available) so a little more CPU overhead is the tradeoff.

Originally posted by Jack Rubenstein:
How do you make pulse sound a little better?
Check the links I posted above. Also try testing with 'flat volume' enabled / disabled and see which you prefer.
Aoi Blue Nov 14, 2020 @ 4:54pm 
To improve how pulse sounds, I recommend improving the remix algorithm quality. I also recommend bumping the output sample rate to the maximum your sound card can handle.

It is worth noting there is also a minimal alternative to pulse available which runs like pulse without all the bulk. I'm not sure of a complete list of it's capabilities, though.
SIGKILL Nov 14, 2020 @ 5:36pm 
Originally posted by Aoi Blue:
recommend bumping the output sample rate to the maximum your sound card can handle.
While this seems like a good idea in theory, it usually leads to quality loss due to forced upsampling.

If you set your hardware playback sample rate to say 96khz, and 99% of your media is 48khz (which is a good sampling frequency, mind you), then that all has to undergo a 2x upsample, meaning every frame gets 'played' twice which doesn't at all improve the granularity of the audio signal, but still perceptibly changes it (less pure). Time stretching can occur more often depending on clock jitter.

If you play back 44khz audio and it gets upscaled to 96khz, it has to undergo a non-integer scaling (96k / 44k = 2.1818...) which stretches audio frames unevenly over the time signature. This results in constant micro-artifacting which, of course, reduces playback quality.

Letting the mixer adjust the hardware to match the input rate is really the best method where possible. Otherwise, if 99% of your media is 48khz forcing your hardware to match that rate is better than forcing upsampling / downsampling. A few lower quality (8khz-22khz) samples getting upsampled to 44khz / 48khz matter a little less since they sound like ass either way ; )
Enigmatic Nov 14, 2020 @ 5:44pm 
Upsampling actually does kinda help. It's not perfect but if you do that AND use a Digital to Analog conversion. It maybe can sound better.
Aoi Blue Nov 14, 2020 @ 5:59pm 
Yes, you can also improve the upsample algorithm in the config file. It defaults to rather low quality in order to save processor time. By switching to speex-float-6 from speex-float-1 you can drastically improve quality.

As a note, I do default sample type as s24ne (ne means use native byte order to the processor which is slightly faster. It's saves changing that entry when creating it on different platforms such as ARM)

for sample rate I use the maximum of my card (192000)


To do all this I uncoment and change the following lines in my pulsaudio daemon.conf. (/etc/pulse/daemon.conf)

resample-method = speex-float-6

default-sample-format = s24ne
default-sample-rate = 192000
Last edited by Aoi Blue; Nov 14, 2020 @ 6:14pm
SIGKILL Nov 14, 2020 @ 6:15pm 
Originally posted by Jack Rubenstein:
Upsampling actually does kinda help. It's not perfect but if you do that AND use a Digital to Analog conversion. It maybe can sound better.
A DAC is a non-optional component for digital audio, lol.

But no, even integer upscaling does not improve sound quality. It will never be more pure than the source. You cannot "improve" digital audio quality over the source, you can change it by adding fake stuff to it, or taking stuff away.

Similarly, the analogue audio path in EQs, DACs, amplifiers, etc. change the signal in some way, but this is effectively distortion. Some people prefer certain types of distortion, like tube amps, but it's effectively reducing signal purity. When you're dealing with digital signals, the typical goal is not to mess them up before they get to the pre-amp ; )

There's plenty of ignorant mysticism surrounding audiophile circles -- you're guaranteed to hear type every of bs there is.
Last edited by SIGKILL; Nov 14, 2020 @ 6:34pm
SIGKILL Nov 14, 2020 @ 6:27pm 
Originally posted by Aoi Blue:
Yes, you can also improve the upsample algorithm in the config file. It defaults to rather low quality in order to save processor time. By switching to speex-float-6 from speex-float-1 you can drastically improve quality.

As a note, I do default sample type as s24ne (ne means use native byte order to the processor which is slightly faster. It's saves changing that entry when creating it on different platforms such as ARM)

for sample rate I use the maximum of my card (192000)


To do all this I uncoment and change the following lines in my pulsaudio daemon.conf. (/etc/pulse/daemon.conf)

resample-method = speex-float-6

default-sample-format = s24ne
default-sample-rate = 192000
You're forcing upsampling pretty much 100% of the time, but choosing a less-bad method for doing so, when the real goal is to avoid resampling as much as possible. Unless you're near-exclusively playing back 192khz audio this is 100% bad advice.
Enigmatic Nov 14, 2020 @ 6:43pm 
Yeah no that is true.

Originally posted by (LINUX) Hot Sick:
But no, even integer upscaling does not improve sound quality. It will never be more pure than the source. You cannot "improve" digital audio quality over the source, you can change it by adding fake stuff to it, or taking stuff away.

Similarly, the analogue audio path in EQs, DACs, amplifiers, etc. change the signal in some way, but this is effectively distortion.
Yes, this is true. However. If sample rate is low on source, upsampling can only help a little if at all. It is 'distortion' from source yes. Upsampling to 192000 is pretty intense. But there isn't as much harm in upsampling as maybe you are saying. I look at it like Head Room, with an amp and everything you kinda want some room so things don't sound oversaturated or maxed out. On a laptop I'd actually say probably you'd lose battery life aha. Even if it was minimal.
But his sound card is probably pretty sweet.

Again ALSA I haven't seen any output higher than 100% where Pulse can actually boostt -DB output by a fair amount.
Last edited by Enigmatic; Nov 14, 2020 @ 6:43pm
< >
Showing 1-15 of 29 comments
Per page: 1530 50

Date Posted: Nov 13, 2020 @ 8:48pm
Posts: 29