Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I don't know how to start debugging it, but when I play music using XBMC it sounds a lot better than when using Clementine. I know it is a little subjective, but although I love XBMC great features, Clementine has other qualities, like a better search.

First my setup: my computer has a s/pdif coaxial output which I connect to my old Pioneer receiver. The receiver connects to my pair of speakers.

I'm playing high quality MP3 files.

In Clementine -> Preferences -> General -> Playback I have configured:

  • "Choose automatically" for the output plugin of GStreamer audio engine.
  • Album replay gain is checked,
  • Pre-amp is 0.0db.
  • Apply compression to prevent clipping is checked.

XBMC has more configuration options:

  • Audio ouput: Optical/Coax
  • Speaker configuration: 2.0
  • Boost volume level on downmix: checked
  • Dolby Digital (AC3) capable receiver: checked
  • DTS capable receiver: unchecked
  • Audio ouput device: default
  • Passthrough output device: iec958

I've changed XBMC configurations from the default. It was "analog audio". The quality improved.

Ubuntu audio settings doesn't give me many options.

I'm using Ubuntu 12.10, with default audio configuration.

How can I improve Clementine quality? References explaining what are all these options are welcome.

share|improve this question

I've upgraded Ubuntu to 13.04. XBMC also upgraded and now it sounds as bad as Clementine. Problem solved :-(

But, wait! After delving more in the problem, it looks like the guilty is Pulse Audio, the newest Linux sound architecture that promised to solve all of your audio problems.

After reading a lot and understanding a little, it looks like that PulseAudio decodes and re-encode the audio signal degrading it. This long thread taught me a lot: Bit Perfect Audio in Linux.

I've managed to get my high quality sound again configuring Clementine to directly access the Alsa S/PDIF channel. No resampling involved and the sound is a lot better. To do it, go to Tools -> Preferences -> Playback and change Output plugin to "Audio Sink (ALSA)" and the output device to the E958 direct hardware device.

Discover your own direct device with the command aplay -L. Here is a the relevant part of the command output in my computer:

    HDA Intel, ALC888 Digital
    Direct sample snooping device
    HDA Intel, ALC888 Analog
    Direct hardware device without any conversions
    HDA Intel, ALC888 Digital
    Direct hardware device without any conversions

So my outupt device is the "direct hardware" and digital. The key info is the "Direct hardware device without any conversions". You may have more than one, like one for your hdmi video port and another for your sound device. I should fill it with hw:0,1(hw is the device, 1 is the DEV and I have no idea where the first zero comes from).

Since nothing is easy, you should first turn off pulse audio and run Clementine this way:

pasuspender -- clementine

Voilá! Now I've got high music quality.

The problem is that the spdif output was busy with Pulse audio. It looks like you can't share an alsa output. I've changed my setup.

In pulse audio I've changed my default sound output to Analog Stereo, and reconnected my old 2.1 speakers. Now every application will play to this channel. The SPDIF output is connected to my stereo and Clementine is hardcoded to use it exclusively. Don't forget to uncheck the "Cross-fade" preferences in Clementine so it doesn't have to share the channel with itself.

Now my I can hear high quality music in my stereo and all other applications use the low fidelity computer speakers.

share|improve this answer
how is that even possible. How can developers reconvert a standard audio stream by default. Every convertion step is a risk for potential quality loss. This is the perfect example why linux has never been competing in the professional and semiprofessional audio-sector. In my opinion this is a serious issue and needs a fix if not already fixed in one of the new ubuntu versions. I'm glad the audio issues have decreased with pulse but quality of audio is a very important thing to many users i know. – zulu34sx Nov 30 '15 at 4:50

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.