• WANTED: Happy members who like to discuss audio and other topics related to our interest. Desire to learn and share knowledge of science required. There are many reviews of audio hardware and expert members to help answer your questions. Click here to have your audio equipment measured for free!

BEGINNER QUESTION : Getting "BitPerfect" output in Linux ?

xykreinov

Senior Member
Forum Donor
Joined
Nov 16, 2019
Messages
424
Likes
678
Hi, I have a few things to say:
  • While PulseAudio will likely never technically be able to be configured to be bit perfect, it will likely be quite a deal more convenient than most other alternatives for awhile longer. Especially is the case when dealing with multiple streams of different sample rates, when you don't feel like messing with a new distro install too much, etc. I recommend this leddit post and this medium post to achieve audibly better audio fidelity from PulseAudio. Though, it's worth mentioning that making PulseAudio avoid re-sampling is the only made that has no foreseeable CPU/RAM performance drawbacks (it actually improves CPU performance). While it's not bit perfect, there are times when up-sampling the bit depth to 32 bit while maintaining a faithful sample rate between track changes would be close enough in accordance to my convenience-related needs.
  • I highly recommend DeaDBeeF or Audacious as graphical music players. I've done lots of digging, and they've been my endgame choices for awhile now. To summarize, DeaDBeeF is essentially foobar2000 except Linux-native, and Audacious has an ultra nice default setup that is more coherent with themes in QT desktop environments than anything else IMHO. DeaDBeeF is also the only free player I'm aware of that can play DSD files (not including non-organizing players like MPV). Also, with DeaDBeeF's built in EQ, you can achieve bit-perfect equalized audio (so long as you've set the output to the proper alsa digital audio output)
 

Sal1950

Grand Contributor
The Chicago Crusher
Forum Donor
Joined
Mar 1, 2016
Messages
14,068
Likes
16,598
Location
Central Fl
Also, with DeaDBeeF's built in EQ, you can achieve bit-perfect equalized audio (so long as you've set the output to the proper alsa digital audio output)
If it's been eq'd how can it be bit-perfect to the source file?
 

Echoa

Member
Joined
Dec 26, 2019
Messages
34
Likes
11
Really the only way to do bit perfect on Linux is to use Alsa/Hardware directly and bypass Pulse and Jack on top of a good real time kernel. Pulse/Jack will make life easier but if perfection is your goal you'll have to put up with not having their luxury.

Pulseaudio can be configured to give a pretty good experience, I use Pulse because I'm too lazy to deal with anything else. I recommend the Arch wiki which has an obnoxious amount of information on setting up anything you might want to for most anything Linux related. I use Manjaro on unstable branch so it's pretty close to Arch and have really enjoyed it.
 
OP
P

PenguinMusic

Addicted to Fun and Learning
Joined
Dec 20, 2019
Messages
622
Likes
368
If it's been eq'd how can it be bit-perfect to the source file?

Hi,

Wondered about that too...

I am not even sure that if you're enabling the "ReplayGain" feature, you end up with something that can be considered as "Bit Perfect".

Anyways, I like the "Mosaic" presentation of my albums.
I think it is quite helpful to find your way out if you have a rather large music collection.
This is why, despite it's qualities, I decided not to go with deadBeef :-(

Strawberry has the ability to display the "Cover Manager" but you have to call that function from the menu. No shortcut :-(
But I must admit that Strawberry has it's strength.

So far I am still in an hesitation :
- MPD with Cantata front end (that is what I use at the moment) ;
- gmusicbrower ;
- Strawberry.

But that is a matter of tastes and convenience...
 
OP
P

PenguinMusic

Addicted to Fun and Learning
Joined
Dec 20, 2019
Messages
622
Likes
368
Really the only way to do bit perfect on Linux is to use Alsa/Hardware directly and bypass Pulse and Jack on top of a good real time kernel. Pulse/Jack will make life easier but if perfection is your goal you'll have to put up with not having their luxury.

Pulseaudio can be configured to give a pretty good experience, I use Pulse because I'm too lazy to deal with anything else. I recommend the Arch wiki which has an obnoxious amount of information on setting up anything you might want to for most anything Linux related. I use Manjaro on unstable branch so it's pretty close to Arch and have really enjoyed it.

Hi thanks a lot for taking time to reply :)

I am also a user of Manjaro but I am on the stable branch :)
I really like it and PulseAudio is indeed quite the nice way to go...
But as I have heard it downsamples (or upsamples...) everything to 16/44...
It might be purely subjective, but I would like to get benefit of my 24/44, 24/88 or 24/96 downloads :)

So far, I am using MPD/Cantata with JACK plug-in configured to bridge into ALSA.

But if you'd if you have a good tutorial to bypass Pulse entirely and use ALSA only instead, I'd be grateful if you could share :)

And by the way : happy new year to everyone :)
 
Last edited:

Echoa

Member
Joined
Dec 26, 2019
Messages
34
Likes
11
Hi thanks a lot for taking time to reply :)

I am also a user of Manjaro but I am on the stable branch :)
I really like it and PulseAudio is indeed quite the nice way to go...
But as I have heard it downsamples (or upsamples...) everything to 16/44...
It might be purely subjective, but I would like to get benefit of my 24/44, 24/88 or 24/96 downloads :)

So if you have a good tutorial to bypass Pulse entirely and use ALSA only instead, I'd be grateful if you could share :)

And by the way : happy new year to everyone :)

You can set Pulse to whatever bit depth & khz your output supports, if you want to tinker in Pulse start here https://wiki.archlinux.org/index.ph...fragment_number_and_buffer_size_in_PulseAudio

The files there are where you can tweak pulse to your liking

Remember though that it won't be "bit perfect". As for playing with Alsa you can Google for Alsa on the Arch wiki and see what's there. I'm really not experienced enough on Linux audio to help with anything but Pulse which is what I use personally.
 
OP
P

PenguinMusic

Addicted to Fun and Learning
Joined
Dec 20, 2019
Messages
622
Likes
368
ERASED !

Not within the scope of a science site as this stated highly subjective perception.

Apologies.

Will try not to do it again.
 
Last edited:

Sal1950

Grand Contributor
The Chicago Crusher
Forum Donor
Joined
Mar 1, 2016
Messages
14,068
Likes
16,598
Location
Central Fl
OP
P

PenguinMusic

Addicted to Fun and Learning
Joined
Dec 20, 2019
Messages
622
Likes
368
Probably caused by a difference in playback level..

So you are saying two things :
- that ALSA has a higher output than PulseAudio à 100% ?
- that ALSA and PulseAudio cannot produce any difference.

If you say so, then so it must be.

Of course, the fact that I mentioned that this result may be highly subjective is totally irrelevant... because this site is ONLY about SCIENCE.

So I apologize and take it all back... Post erased indeed.
 

graz_lag

Major Contributor
Joined
Oct 13, 2018
Messages
1,296
Likes
1,583
Location
Le Mans, France
@PenguinMusic

This report might be interesting to you:
https://archimago.blogspot.com/2015/10/measurements-look-at-linux-audio-alsa.html

Currently, to me the approach is very simple:

Music-PC (No office tasks, only Music, configuration as per the attached screenshot)
PulseAudio disabled, ALSA - as the very first layer, interfaces with the playback hardware's at the Linux kernel level. On top of it, I have MPD as engine layer (JACK might be an alternative). And as 3rd layer of course the music player layer(s), Cantata for me, but one has here dozen of players available to chose from (Audacious, DeadBeeF, GMusicBrowser ...)
Playback hardware's:
USB DAC: Topping D10; Topping DX7 PRO
UPnP/DLNA: MinimServer as Music Server, DietPi as OS on my two Rendering Points based on the Odroid C2 & the on-board HiFi Shield 2 DAC package, BubbleUPnP (Android phones) as Control Point

I went thru several different ways over the years, the above-detailed represents to me the best compromise between all the involved factors.

Workstation-PC (low resolution music from the Internet: Radios, YouTube, Spotify ...)
PulseAudio enabled, PulseAudio Volume Control (pavucontrol)
Playback hardware: on-board sound card
OS: dual boot - same Ubuntu 18.04.03 LTS as per my Music-PC; Windows 7 Professional
 

Attachments

  • PC-HT.png
    PC-HT.png
    47.4 KB · Views: 251
OP
P

PenguinMusic

Addicted to Fun and Learning
Joined
Dec 20, 2019
Messages
622
Likes
368
Hi,

Well thanks a lot for all those infos.
I'll give them a look and report in PM if you don't mind.
So we can maybe even talk in french ?

And maybe I can ask for your advice as I am planning a Pi audio server... and it seems you have one :)

Regards.
 

Gringo

New Member
Joined
Jan 23, 2020
Messages
1
Likes
0
Hi,long term linux user here.
I use linux mint and MXlinux on different laptops,both set up with bit perfect playback mainly using gmusicbrowser and Deadbeef.
Sound quality through alsa is fantastic,but I have a question about volume control.
In the past I have used usb powered dac/amps like the Dragonflys,and have always set my harware volume to 100% and then used the software music player to set the volume.
I have just bought a topping dx 3,which is a wired usb/dac.To get the best sound quality I am now setting both the laptops hardware and software volumes to 100%, and setting the volume using the amps volume control.Is this the correct way to do things?
 

Sal1950

Grand Contributor
The Chicago Crusher
Forum Donor
Joined
Mar 1, 2016
Messages
14,068
Likes
16,598
Location
Central Fl
So you are saying two things :
- that ALSA has a higher output than PulseAudio à 100% ?
- that ALSA and PulseAudio cannot produce any difference.

If you say so, then so it must be.

Of course, the fact that I mentioned that this result may be highly subjective is totally irrelevant... because this site is ONLY about SCIENCE.

So I apologize and take it all back... Post erased indeed.
The thing is, any time you attempt to do a subjective assessment of sound quality the first thing to be addressed is equalized levels. It is possible for either of the architects to effect level so without measurements it is impossible to do a accurate determination. ;)
 
OP
P

PenguinMusic

Addicted to Fun and Learning
Joined
Dec 20, 2019
Messages
622
Likes
368
Hi,long term linux user here.
I use linux mint and MXlinux on different laptops,both set up with bit perfect playback mainly using gmusicbrowser and Deadbeef.
Sound quality through alsa is fantastic,but I have a question about volume control.
In the past I have used usb powered dac/amps like the Dragonflys,and have always set my harware volume to 100% and then used the software music player to set the volume.
I have just bought a topping dx 3,which is a wired usb/dac.To get the best sound quality I am now setting both the laptops hardware and software volumes to 100%, and setting the volume using the amps volume control.Is this the correct way to do things?

Hi,

Cannot really say scientifically.
But I hope that this is the right way to do things.
Because that is what I do too.

But each time I say something on this site, I always get an answer :"Show me meausrements"... Which I can not.
So it is only a wild guess.

Someone will most probably tell you scientifically why you (and I) are doing it right (or wrong).

Regards.
 
OP
P

PenguinMusic

Addicted to Fun and Learning
Joined
Dec 20, 2019
Messages
622
Likes
368
The thing is, any time you attempt to do a subjective assessment of sound quality the first thing to be addressed is equalized levels. It is possible for either of the architects to effect level so without measurements it is impossible to do a accurate determination. ;)

Hi,

This is a real problem but this is not the place to start a debate about the scopes of science.
Basically is science a goal or is science a way ?

I wouldn't mind the latter.
Common rule here seems to be the first.

Look at how things are done :
- First : measurements. Second : listening tests. Science is a goal.
- First : listening tests. Second : measurements. Science is a way.

I would like science to explain to me why I prefer the sound coming out of those speakers to the sound coming out of those other speakers.
I would hate science telling me : get those speakers because measurements say they're better that those other speakers.

Conclusion : this site is not the place to find my answers.

Regards.
 

JohnYang1997

Master Contributor
Technical Expert
Audio Company
Joined
Dec 28, 2018
Messages
7,175
Likes
18,292
Location
China
Hi,

This is a real problem but this is not the place to start a debate about the scopes of science.
Basically is science a goal or is science a way ?

I wouldn't mind the latter.
Common rule here seems to be the first.

Look at how things are done :
- First : measurements. Second : listening tests. Science is a goal.
- First : listening tests. Second : measurements. Science is a way.

I would like science to explain to me why I prefer the sound coming out of those speakers to the sound coming out of those other speakers.
I would hate science telling me : get those speakers because measurements say they're better that those other speakers.

Conclusion : this site is not the place to find my answers.

Regards.
Science will tell you everything you want. People won't.
 

Sal1950

Grand Contributor
The Chicago Crusher
Forum Donor
Joined
Mar 1, 2016
Messages
14,068
Likes
16,598
Location
Central Fl
I would like science to explain to me why I prefer the sound coming out of those speakers to the sound coming out of those other speakers.
I would hate science telling me : get those speakers because measurements say they're better that those other speakers.
Conclusion : this site is not the place to find my answers.
It's a good place to learn how to find your answers.
If you really want to begin to answer your first question start by reading Floyd Toole's book,


Sound Reproduction: The Acoustics and Psychoacoustics of Loudspeakers and Room
That question is much more complex than can be answered in a couple short forum posts..
On the other hand, if you hate the idea of science telling you one speaker or component is more accurate to the source and you just want to purchase what you like the sound of, then yes, this might not be the place to find your answers.
Like any other scientific experiment, you could start by stating your results (A sounds better than B) but you must at least follow up with the conditions of you approach. The science part asks many details, were the levels matched and how did you match them, etc etc. These things count on any science based platform.
You can't just say, "here take this pill and it will make you feel better" without detailing how you came to that conclusion.
 
OP
P

PenguinMusic

Addicted to Fun and Learning
Joined
Dec 20, 2019
Messages
622
Likes
368
It's a good place to learn how to find your answers.
If you really want to begin to answer your first question start by reading Floyd Toole's book,


Sound Reproduction: The Acoustics and Psychoacoustics of Loudspeakers and Room
That question is much more complex than can be answered in a couple short forum posts..
On the other hand, if you hate the idea of science telling you one speaker or component is more accurate to the source and you just want to purchase what you like the sound of, then yes, this might not be the place to find your answers.
Like any other scientific experiment, you could start by stating your results (A sounds better than B) but you must at least follow up with the conditions of you approach. The science part asks many details, were the levels matched and how did you match them, etc etc. These things count on any science based platform.
You can't just say, "here take this pill and it will make you feel better" without detailing how you came to that conclusion.

OK.

World of numbers or world of feelings.
I made my choice.
It is not on par with the scopes of this site.
Debate closed.

Regards.
 

xykreinov

Senior Member
Forum Donor
Joined
Nov 16, 2019
Messages
424
Likes
678
If it's been eq'd how can it be bit-perfect to the source file?
Bit-close* :)
So long as you have the player's volume disabled, the effects on frequency done by the EQ are close to the only modification to source being made. This is in great contrast to all of the processing PulseAudio, or, in the case of Wangblows, DirectSound would do on top of it in another scenario.
 
Top Bottom