We have moved to a new Sailfish OS Forum. Please start new discussions there.

Poor audio quality (Sailfish X, Jolla 1)

asked 2017-10-12 22:34:45 +0300

NevilClavain gravatar image

updated 2020-01-24 19:45:55 +0300

schmittlauch gravatar image

Hi there,

I used to use my Jolla 1 as my main phone, and I loved it. The one thing that bugged me was the sound quality when using headphones (or the jack in general). The problem is that whenever there is sound produced there are also some failt artifacts. Almost distortion or noise. It sounds a bit like there is extremely overcompressed audio playing in the background, but the sound that is being played in the foreground sounds fine.

I assumed that this was the Jolla 1 and that it just had a subpar DA-converter chip, but I've been using my Xperia X for months now and it sounds great, but as soon as I put sailfish on it the artifacts are back.

As with Jolla 1 when playing at high volumes it's not really noticable, but when playing at low volumes, particularly speach, it is downright jarring! Using an adapter to rise the resistence of the earbuds helps, but now that I understand that it is NOT due to hardware I cannot help think that this should be fixed.

Edit: This has been brought up in a community meeting, but unfortunately nothing really new has surfaced on this issue. These are the meeting minutes.

edit retag flag offensive close delete


I didn't notice it on Jolla 1 much, but on Xperia X it's pretty obvious. Low volume audio is pretty distorted, you notice it for instance when a song starts or ends. It's not so noticable in the middle of a piece of music. This must be a fixable bug, as I'm sure it's not the hardware. Perhaps chip power-saving or sampling errors?

wvh ( 2017-11-09 15:23:07 +0300 )edit

I am so glad this is not just me. The audio quality and noise is intolerable, and makes for the worst media experience of any phone I've used. Please fix.

Sethdove ( 2017-11-14 22:32:16 +0300 )edit

I just changed the jack input on my Xperia X and it did nothing to the digital noise, so there is work to be done by Jolla here.

NevilClavain ( 2017-11-15 00:25:23 +0300 )edit

I can confim these noisy artifacts on Sailfish X when playing music on low volume.

Jorg ( 2017-12-09 14:36:33 +0300 )edit

I have the same problem with my Xperia X. Some kind of annoying distortion at low volume.

Wienerschnitzel ( 2017-12-20 09:40:39 +0300 )edit

2 Answers

Sort by » oldest newest most voted

answered 2019-03-19 01:36:49 +0300

vmatare gravatar image

updated 2019-03-19 04:50:46 +0300

I'm pretty sure these artifacts stem from a fully powered final amplifier stage that drives the headphone jack. This theory is confirmed by the fact that they are most noticeable with low-impedance headphones. In fact, when I use my heavy 80 Ohm studio headphones, they are practically gone, whereas with tiny in-ears it's almost impossible to listen to music.

The root of the problem is that somehow the volume control only scales the waveform in software, while the final amplifier is always at maximum volume. As a result, the artifacts are sometimes even louder than the audio material itself.

So high-impedance headphones can be used as a workaround since they simply require more power. I've also heard of impedance-increasing adaptors (essentially a resistor) that may help.

However the real fix would be if we somehow figured out how to reduce the power output of the final stage amplifier, or better: scale it with the PulseAudio volume like it's done in a correct setup.

Edit: Did some more research and I think the WCD9335 is the chip responsible: https://developer.qualcomm.com/qfile/35460/lm80-p2751-29_a.pdf.

Looked through sysfs but couldn't find any helpful knobs to fiddle with. From the block diagram there should be some way to control the HPH_R and HPH_L gain, which I suspect control the amplifier volume. However I'm not sure whether the Xperia X uses an external headphone amplifier instead. It would be helpful if someone could post a link to the source code of the actual Sony kernel used on the device.

edit flag offensive delete publish link more


I very much agree with your point of view. Do you have a solution now?

xbt123ufo ( 2019-07-03 14:15:45 +0300 )edit

answered 2020-01-23 18:44:41 +0300

mia gravatar image

The artifacts actually sound like aliasing to me, and are also audible at the maximum volume level. If that is true then the volume control is unlikely to play a role in this, and we would instead have to make sure PulseAudio a) uses a sample rate supported by the hardware and b) does not use subpar resampling algorithms. I think it sounds a lot like dumb linear interpolation — not quite as bad as a zero-order hold, but still terrible. Fixing this doesn’t require using slow and potentially power-hungry sinc-based algorithms, however — the much faster Speex resamplers are perfectly fine.

edit flag offensive delete publish link more


The other possibility is that this is actually quantization noise. In that case, the amplifier stage would have to use lower power for low impedance headphones (such as IEMs), explaining vmatare’s observation. If this is done through digital volume control, poking the hardware volume control will probably not achieve anything either. Just guessing, but increasing the chip clock frequency or using higher bit depth might.

mia ( 2020-01-23 18:50:42 +0300 )edit

The thing is: This issue didn't appear under Android on the Xperia X ond neither under Sailfish on the XA2. So it is neither a general hardware or software issue but arises from the interaction of both.

schmittlauch ( 2020-01-23 20:35:07 +0300 )edit

I tried toggling some pulse audio settings in /etc/pulse/daemon.conf, none of them made the distortions go away:

  • avoid-resampling = true
  • resample-method = speex-fixed-10 or speex-float-1 or ffmpeg
  • default-sample-rate = 48000

So this doesn't look like a (re)sampling problem to me.

schmittlauch ( 2020-01-23 20:59:40 +0300 )edit
Login/Signup to Answer

Question tools



Asked: 2017-10-12 22:34:45 +0300

Seen: 1,336 times

Last updated: Jan 24 '20