Bit Perfect Audio from Linux
Jun 25, 2015 at 11:23 PM Post #361 of 543
If your new to Linux, I wouldn't use either of the Vim or EMACS text editors right now.

Use gedit or nano.

But I -highly- recommend taking some time to get up to speed with Vim.
Once you're past its learning curve, you'll write like a bat outta hell, and you can do anything you want with it.

Someone else will chime in with a similar sentiment about EMACS. Both are extremely fine and full-featured tools.
 
Last edited:
Oct 14, 2015 at 3:00 PM Post #363 of 543
  @Rizlaw (re Post #3)
 
You are the man....sometimes I love Linux (when people far more intelligent and knowledgeable than me tell me what to do).
 
Thank you :)

"far more intelligent" probably not.  But, I'm glad my post helped you.
 
Oct 22, 2015 at 9:12 AM Post #364 of 543
 
  @Rizlaw (re Post #3)
 
You are the man....sometimes I love Linux (when people far more intelligent and knowledgeable than me tell me what to do).
 
Thank you :)

"far more intelligent" probably not.  But, I'm glad my post helped you.

I see you've got Windows installed on your PC as well. As much as I would like to refrain from discussing such nonsense(?) as one operating system sounding better than another, I can't help but hear a difference. Don't you think Windows sounds better than Linux? To me, JRMC/Winyl > WASAPI > ODAC on Windows outdoes Deadbeef/Clementine > ALSA > ODAC on Arch Linux. Windows sounds sharper, kind of hi-res — just right — while Linux sounds fuzzier and as if the music was downsampled to 32khz. That is one of very few reasons making me keep Windows on my hard drive. Maybe there's an option in ALSA's configs that makes it tamper with the sound in some way?
 
Oct 22, 2015 at 12:51 PM Post #365 of 543
  I see you've got Windows installed on your PC as well. As much as I would like to refrain from discussing such nonsense(?) as one operating system sounding better than another, I can't help but hear a difference. Don't you think Windows sounds better than Linux? To me, JRMC/Winyl > WASAPI > ODAC on Windows outdoes Deadbeef/Clementine > ALSA > ODAC on Arch Linux. Windows sounds sharper, kind of hi-res — just right — while Linux sounds fuzzier and as if the music was downsampled to 32khz. That is one of very few reasons making me keep Windows on my hard drive. Maybe there's an option in ALSA's configs that makes it tamper with the sound in some way?

 
eimis,
 
What you describe is certainly not my experience with Linux. I hear no fuzziness or downsampling effects in any of my Linux media players. I don't use Clementine. While I prefer Ubuntu Linux, I have tried several Ubuntu derivatives (like Mate, Mint, Kubuntu), as well as Antergos (an Arch based distro), Sabayon (Gentoo based), Red Hat Fedora and a few others, sonically, they all sound the same to me. Ultimately, there are simply too many variables that factor in to what you or I ultimately hear in our respective systems.
 
For about a year or two, I dual booted Win7 with Ubuntu Linux to compare the two OSs for music playback.  It was during this period of music playback testing that I finally switch to Linux permanently because I felt Linux was sonically as good as Windows and maybe better.  During the test period, I used my licensed copy of JRMC as well as Foobar2000 for Windows bit perfect music playback. For Linux I used: gmusicbrowser, guayadeque, Quod Libet, and Deadbeef (these are the players capable of bypassing Pulse Audio for direct bit perfect playback via ALSA without resampling. All the music files consisted of my entire CD collection ripped, over the years to FLAC, using a combination of EAC (Exact Audio Copy), JRMC and dbpoweramp under WinXP, Win 7 and for Linux using "Asunder" and WINE/Crossover for running dbpoweramp. When set up for bit perfect output, I heard no perceptible differences and none of the kind you describe. The very minor differences I "thought" I heard were not worth mentioning as they were not repeatable.
 
Bottom line: to the best of my limited knowledge while your ALSA config files can be tweaked, it shouldn't be necessary if Deadbeef is properly setup to bypass PulseAudio and the Linux resampler which is better than the Window's resampler, but still leaves much to be desired. In my setup I have Deadbeef's "Preferences > "Sound" Tab set to:
 
Output plugin:  ALSA output plugin
Output device: 32bit 384kHz DSD Interface, USB Audio
                       Direct hardwdare device without any conversions
 
For me, the device in question is my W4S DAC-2seDSD, and I would add that there are 12 different variations for the same "output device" so you have to be careful which one you pick. Pick the wrong one and you won't get bit perfect stereo output.
 
Under Deadbeef:  Preferences > Plugins > ALSA output plugin > Configure button :
 
                                                                                                                            Uncheck "Use ALSA resampling
                                                                                                                            Check    "Release device while stopped"
 
Finally, I'm not familiar with your ODAC, but if it has a front panel display of the incoming music data file, or perhaps an led that lights up, you should be able to tell if the audio files you are playing via Deadbeef are being output and received as bit perfect 16/44.1 or 24/96 or 24/192 files and not resampled to a different rate.
 
P.S. I recently purchased ($150) Signalyst's HQ Player for Linux (also available for Windows and Mac). It does sound interestingly different. It's available for a free 30 day trial with no limitations in use (except under Linux it only works for 20 minutes at a time. Not sure why). The GUI is poor and need much work as it is designed for a tablet and not a desktop machine.
 
Nov 1, 2015 at 11:46 PM Post #367 of 543
Unless you still have pluseaudio running, using alsa and playing back a supported rate will ALWAYS result in bit perfect playback.


I had to reinstall Linux Mint the other day and I'm having difficulties again figuring out how to get proper, bit perfect output to my DAC. Just as before, the audio sounds like there's some kind of preprocessing going on even though I have ALSA selected as the output device in gmusicbrowser. The audio is sounding a bit animated and somewhat spatially flattened. It's a bit annoying without the proper settings
confused.gif
.
 
This is a problem I'd encountered using other media players in the past in both Ubuntu and Mint installations even though ALSA was selected as the output device. I'm pretty sure it had to do with PulseAudio but I can't find the solution again.
 
FYI: I used to listen to Windows->WASAPI->DAC->amp. Then tried Linux and wasn't impressed at first until I came across a bitperfect output that circumvented pulseaudio... then I was sold. I'm not into going back to Windows for my media playback.
 
I'll keep searching for my solution but if anyone can suggest how to get around pulseaudio I'd appreciate it.
 
Nov 2, 2015 at 9:06 AM Post #369 of 543
 
I had to reinstall Linux Mint the other day and I'm having difficulties again figuring out how to get proper, bit perfect output to my DAC. Just as before, the audio sounds like there's some kind of preprocessing going on even though I have ALSA selected as the output device in gmusicbrowser. The audio is sounding a bit animated and somewhat spatially flattened. It's a bit annoying without the proper settings
confused.gif
.
......
 
I'll keep searching for my solution but if anyone can suggest how to get around pulseaudio I'd appreciate it.

 
 
Please read my post (noted below) on setting up gmusicbrowser for proper playback. It should resolve your issue provided you enter the correct information under "Advanced Options > Alsa Device". Just setting gmusicbrowser to ALSA is not enough without also entering correct info into the "Alsa device" field.
 
To find your ALSA device info, in a terminal window, use the command "aplay -l" to determine your sound card's settings. If you have more than one sound card device, select the primary one you use for digital playback. It's also a good idea to disable the motherboard sound chip in your BIOS to avoid future confusion.  There really is no need to remove pulseaudio, you just need to bypass pulseaudio and talk directly to ALSA/hardware for bit perfect playback.
 
http://www.head-fi.org/t/561961/bit-perfect-audio-from-linux#post_7596563
 
Nov 2, 2015 at 7:39 PM Post #370 of 543
Thanks guys... bookmarked. Being just a little more than a casual Linux user I'm one of those guys who, at this point in time, knows just enough to get into trouble. Much appreciated.
 
Dec 5, 2015 at 3:48 PM Post #371 of 543
@Rizlaw: great thread - many thanks, you really helped me out. I hope to be able to repay a little here.
 
My PC has 2 graphics cards, a USB sound card and an Asus Xonar STX. This can cause problems with the order in which the sound devices are assigned, so the numbering scheme you propose to use does not always work. Here my suggestions when using gmusicbrowser (might be good for other players too):
 
1. Open a terminal and enter the following (copy & paste):
 
aplay -l | awk -F \: '/,/{print $2}' | awk '{print $1}' | uniq
 
You will get one or more names for available audio devices, depending on how many you got. In my case I get:
 
STX
HDMI
Device
 
2. Inside gmusicbrowser, select Settings -> Audio:
 
3. Select output device = ALSA
 
4. Click "advanced options"
 
5. Enter the device of choice you found above into the "alsa device" field as follows: hw:STX,0
 
I selected the STX option which represents the Asus Xonar STX.
 
6. To make sure you got the right entry, double check using the following terminal command:
 
aplay -l
 
Here the output on my PC (shortened list):
 
**** List of PLAYBACK Hardware Devices ****
card 0: STX [Xonar STX], device 0: Multichannel [Multichannel]
  Subdevices: 0/1
  Subdevice #0: subdevice #0
card 0: STX [Xonar STX], device 1: Digital [Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: HDMI [HDA ATI HDMI], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
...
 
 
Hope it helps.
 
Dec 5, 2015 at 4:08 PM Post #372 of 543
 
I had to reinstall Linux Mint the other day and I'm having difficulties again figuring out how to get proper, bit perfect output to my DAC. Just as before, the audio sounds like there's some kind of preprocessing going on even though I have ALSA selected as the output device in gmusicbrowser. The audio is sounding a bit animated and somewhat spatially flattened. It's a bit annoying without the proper settings
confused.gif
.
 
This is a problem I'd encountered using other media players in the past in both Ubuntu and Mint installations even though ALSA was selected as the output device. I'm pretty sure it had to do with PulseAudio but I can't find the solution again.
 
FYI: I used to listen to Windows->WASAPI->DAC->amp. Then tried Linux and wasn't impressed at first until I came across a bitperfect output that circumvented pulseaudio... then I was sold. I'm not into going back to Windows for my media playback.
 
I'll keep searching for my solution but if anyone can suggest how to get around pulseaudio I'd appreciate it.


I'm running Linux Mint and gmusicbrowser and Rizlaw's instructions work. I tested it by playing a 24bit / 192kHz file and checked as follows (terminal command):
 
cat /proc/asound/card0/pcm0p/sub0/hw_params
 
The above is for card 0, sub 0. Check with aplay -l which card (number) you need to specify. With 24bit files the output looks like that:
 
user@PC ~ $ cat /proc/asound/card0/pcm0p/sub0/hw_params
access: RW_INTERLEAVED
format: S32_LE
subformat: STD
channels: 2
rate: 192000 (192000/1)
period_size: 1920
buffer_size: 38400
 
The rate above is 192000 Hz compared to my regular music files using 48000 Hz, so there is no resampling.
 
Dec 5, 2015 at 8:47 PM Post #373 of 543
If your new to Linux, I wouldn't use either of the Vim or EMACS text editors right now. 

Use gedit or nano. 

But I -highly- recommend taking some time to get up to speed with Vim. 
Once you're past its learning curve, you'll write like a bat of hell, and you can do anything you want with it.

Someone else will chime in with a similar sentiment about EMACS.  Both are extremely fine and full-featured tools.


I'm an Emacs guy, but I agree that vim is well worth learning to use. The reason being that vi (the text editor that vim is an improved version of) is part of the POSIX standard and can be found on just about any Unix-like installation, whereas Emacs usually needs to be installed after the fact. In practice, that means if your system is ever messed up to the point of not having an internet connection (or even a gui), you can count on vi to be there, even if it's a fresh install. I had to learn to use vi on a broken Debian install on my laptop in college...at 8AM...in my bathrobe...using a friend's laptop to google the documentation.

Yeah, if you're going to be messing around with Linux, learning vi can potentially save a lot of headaches.
 
Dec 12, 2015 at 10:14 PM Post #374 of 543
I'm an Emacs guy, but I agree that vim is well worth learning to use. The reason being that vi (the text editor that vim is an improved version of) is part of the POSIX standard and can be found on just about any Unix-like installation, whereas Emacs usually needs to be installed after the fact. In practice, that means if your system is ever messed up to the point of not having an internet connection (or even a gui), you can count on vi to be there, even if it's a fresh install. I had to learn to use vi on a broken Debian install on my laptop in college...at 8AM...in my bathrobe...using a friend's laptop to google the documentation.

Yeah, if you're going to be messing around with Linux, learning vi can potentially save a lot of headaches.

I'm an emacs guy as well. I will give a warning, though focus on core vi over vim if you are worried about recovery systems. There are some minor differences, but you will find vi everywhere. I learned only the very basics of vi to use in busybox instances. Busybox has vi, not vim, so it tripped up a couple of users. Another editor you will find on a lot of linux systems is nano.
 
Dec 13, 2015 at 10:23 PM Post #375 of 543
Thanks for the note on the original Bell Visual Editor and POSIX vim.  I'm used to Joe's Own Editor, /usr/bin/joe, which is not likely to be in a LinUX system's /bin directory.  Any good manuals for /bin/vi and/or /bin/vim?
 

Users who are viewing this thread

Back
Top