Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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

1 Answer 1

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 log: 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:

hw:CARD=Intel,DEV=0
    HDA Intel, ALC888 Analog
    Direct hardware device without any conversions
hw:CARD=Intel,DEV=1
    HDA Intel, ALC888 Digital
    Direct hardware device without any conversions
plughw:CARD=Intel,DEV=0
    HDA Intel, ALC888 Analog
    Hardware device with all software conversions

So my outupt device is the "direct hardware" and digital. I should fill it with hw:0,1.

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

pasuspender -- clementine

Voilá! Now I've got good music.

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

Your Answer

 
discard

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.