Welcome Guest ( Log In | Register )

Configuring Linux ALSA/Pulseaudio for best sound
post Mar 18 2012, 21:27
Post #1

Group: Members
Posts: 3
Joined: 18-March 12
Member No.: 97891

So I have been listening to a bunch of hokum and voodoo at some other head hifi forum where abx testing is banned and I need some reeducation.

I run linux at home and I use kde. As I understand little about sound and how all the parts of the linux sound system work together, I would like to help to make sure that my sound is being output in the best fidelity possible.

So I used KDE that means I have the phonon sound system on top of the pulseaudio sound server on top of the ALSA sound system (whew!).

My onboard soundcard is an HDA-Intel Realtek ALC275 that does 16/24 bitrate and 44.1-192 sampling.

So most of my music is in 16/44.1 FLAC format, but some is 24/96 FLAC.

I use amarok and deadbeef to play my music.

I just want to make sure that I am not doing any resampling that will introduce any distortion or noise.

Sorry if this a topic that has been answered numerous times, but I searched and couldn't find anything that helped answer this.

Thanks for the input.
Go to the top of the page
+Quote Post
Start new topic
post Mar 19 2012, 19:47
Post #2

Group: Developer
Posts: 1455
Joined: 4-May 04
From: France
Member No.: 13875

In order to be able to play several sounds at the same time (like, music coming from your player + system sounds, or the ability to pause your music and watch a YouTube video), you have to use a common sampling rate, there's no getting around it. At best, you can stop using Pulse Audio (i.e. have all your software output to an ALSA device directly), and any software playing sound will be blocking the device for the duration of playback (no resampling involved unless your sound card doesn't support the sampling rate that your software is outputting).

If you choose to use Pulse Audio (or ALSA's dmixer, or jackd or whatever) and thus have to resort to resampling (defaults to 48kHz IIRC, but don't quote me on that), you can set the quality of the resampling algorithm to something that doesn't suck (i.e. that doesn't introduce any audible distortion). One way to do that is to install libsamplerate and alsa-plugins, and add the following line at the top of your /etc/asound.conf or ~/.asoundrc file:

defaults.pcm.rate_converter "samplerate"

You can change the quoted value to "samplerate_medium" or "samplerate_best", which will give you increasing levels of quality at the expense of CPU usage, but "samplerate" should be sufficient. To make sure that your system is indeed taking your configuration into account, you may set the quoted value to "samplerate_best" and watch your CPU usage while playing some music or a movie, it should be significant.

Hope that helps. If you require more help, I refer you to #alsa on Freenode (IRC).

This post has been edited by skamp: Mar 19 2012, 19:49

See my profile for measurements, tools and recommendations.
Go to the top of the page
+Quote Post

Posts in this topic

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:


RSS Lo-Fi Version Time is now: 27th November 2015 - 01:13