7

While browsing idly the Internet, I found a topic on a computer forum when a person was claiming to have failed to achieve bit-perfect¹ audio on Linux: http://www.bleepingcomputer.com/forums/t/617127/sorry-guys-no-more-linux-for-me/ He says he has quit using Linux for this very reason.

Is it really impossible to achieve bit-perfect audio on Linux for any fundamental reason? If not, how to do this?


¹ Bit-perfect is a strict term; it means that the audio output is identical to the input – for example, if audio output is redirected to an USB drive, then the resulting file will be identical to the original file. Audio that has been resampled, or that has passed through a mixer, is not bit-perfect.

gaazkam
  • 1,410
  • 8
    Bit-perfect audio is easy in Linux. (I'm not going to look at the discussion you linked to; I'm not interested in people complaining they don't want to learn or spend any effort.) Use ALSA directly -- as in the hardware devices ALSA provides -- instead of pulseaudio. Pulseaudio is the mixer most Linux distributions use, and it likes to resample and mix the audio from multiple sources (leading to non-bit-perfect audio). If you'd looked a bit harder, you'd found guides on how to set this up, for example here. – Nominal Animal Oct 30 '16 at 22:15
  • 1
    The same fallacy as ever. If audio passes through the mixer but mixer does nothing to it - is it bit-perfect? Pulseaudio is bit-perfect when the only thing playing is an audio of the same samplerate as pulseaudio main rate. – Barafu Albino Apr 05 '17 at 13:08

2 Answers2

8

Yes, of course you can, have a lock at this link:

https://www.head-fi.org/threads/bit-perfect-audio-from-linux.561961/

  1. You need to install a music player that allows you to select certain ALSA settings. Each of my recommendations has pluses and minuses. IMO, the closest to perfection is "gmusicbrowser". My 4 recommendations for top notch music players are:

    1. DeaDBeef http://deadbeef.sourceforge.net/
    2. Gmusicbrowser https://launchpad.net/~shimmerproject/+archive/ppa
    3. Guayadeque http://sourceforge.net/projects/guayadeque/
    4. Quod Libet https://code.google.com/p/quodlibet/
  2. To get bit-perfect output from each of the above:

    DeaDBeef:

    1. Click on the Edit menu, then Preferences.
    2. In the Preferences window under "Sound" tab > "Output plugin" = "ALSA" and "Output device" = "HDA Intel ALC889,IEC958, S/PDIF" NOTE: the "Output device" choice will depend on the type of sound card in your computer. It may be labeled differently from the one I have.

    3. In the same Preferences window select > Plugins In the left column select "Alsa Output Plugin" and then click the "Configure" button In the configuration window make sure that ALSA resampling is unchecked and that you place a check in box to "Release device when stopped". > You are now done setting up DeaDBeeF for bit perfect playback.

    Quod Libet:

    1. click on the Music menu > Preferences > Player tab
    2. for the "Output pipeline" type "alsasink device=hw:0,1" (omit quotes)

    Gmusicbrowser: see post 5 in this thread:

    Guayadeque:

    1. click on Library menu > Preferences and select "Playback" from left column
    2. for Output device = ALSA and in the white box to the right type "hw:0,1" or "plughw:0,1" (omit quotes)

I'm using Ubuntu studio because the kernel is in real time, a real time kernel is required by jackd, for example. Anyway it works fine.

Bye

thecarpy
  • 3,935
Amedeo
  • 81
  • 1
  • 3
1

If you like the look of Amarok 1.4 and Clementine, but want an updated player with more advanced settings for audio output and alsa, you can check out my fork of Clementine called Strawberry: https://github.com/jonaski/strawberry/releases It's aimed at audio enthusiasts and users who play local music files. It has support for multiple backends (gstreamer, xine and VLC), with advanced audio device options, like setting a custom alsa device string.