I installed shairport on my raspberry pi 2 as described here. When I start a song on my Macs iTunes, by configuring the airplay inside iTunes, the output quality on the analogue jack of the raspberry is ok. When I configure my mac, s. t. all audio is to be transferred via airplay, the quality decreases drastically and one can constantly hear a loud noise. How can I counter that problem, where is the bottleneck? Is it likely to be a shairplay overstressing or did anyone came across this problem with an apple TV as well?

  • Have a look with top to see if this really is a resource/bottleneck issue. I have not used shairplay, but I have used pulseaudio on the pi as a sound server and at best it suffers from noticable latency, but that is not because of any particular resource issue or excessive load on the system. It would seem to be intrinsic to the design of pulseaudio itself. It doesn't look like shairplay is dependent on pulseaudio, so if the latter is running on your system, you might try disabling that. – goldilocks Jun 1 '15 at 14:41

The audio via the audio out plug on the raspberry Pi does suffer from interference from other activities on the device. People who want to use their rPi for HiFi audio know this, and they typically use a DAC converter shield/HAT board on top of their rPi. Those boards might be too expensive for what you are trying to do, but I get good results using a simple, cheap usb-audio device like this one ($3 on ebay). You might want to give this a try.

  • I am very well thinking about buying additional hardware for a better audio quality, but first I wanted to make sure that the occuring problem can indeed be solved by discarding the analogue audio out. If that system-wide airplay would have been a known problem, then any investment in additional hardware would be senseless in my case. Your answer implies, that switching that airplay option causes more activities on the device. Could you elaborate why this might be the case? – Milla Well Jun 1 '15 at 14:42
  • My answer is rather generic - i.e. it's a known fact that audio playback via the normal audio out suffers from interference. If you want to find out what is causing the specific interference in your case, I would suggest a process of elimination: 1) Do you have another Airplay receiver (ideally an apple product) - what happens if you airplay to that device? 2) Do you have another Apple device from which you can activate Airplay and does it exhibit similar behaviors? 3) Have you tried playing a whole playlist from iTunes and is the audio-quality OK all the time? – Phil B. Jun 1 '15 at 14:49
  • If you want an example of the potential interference: raspberrypi.stackexchange.com/questions/24476/… I have to say it is a very minor problem for me (not persistent, and only marginally audible). If by "quality decreases drastically" you mean there is stuttering or some other issue obviously caused by the sound processing then it would not cause that. It might cause the background noise. – goldilocks Jun 1 '15 at 15:43
  • 1
    If the problem is interference, wouldn't it affect all audio played via the jack rather than just some from select sources? – bobstro Jun 3 '15 at 14:54

The problem is that the volume levels are really low by default so the noise from the raspberry pi's internal sound card is too loud compared to signal. The sound quality from iTunes is better because the volume in the app is probably set to the maximum.

The solution is to raise the level of the signal by using the alsamixer. Just type alsamixer in the bash, and increase the volume, it works like charm with shairport-sync. If it's still not enough, you can set

ignore_volume_control = "yes"

in your shairport-sync.conf file (probably can be found in /etc) to always have the volume at 100% no matter the source's own volume control.

I think you can further improve the signal-noise ratio by buying a cheap USB sound card, but I don't have any experience with those.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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