juhovh / shairplay

Apple airplay and raop protocol server
Other
1.35k stars 228 forks source link

With PulseAudio on Raspberry Pi there is only noise after ~2 seconds #47

Closed kindfulkirby closed 6 years ago

kindfulkirby commented 9 years ago

I have shairplay running on my RPi witl PulseAudio installed.

When I play music from my iPad it plays about two seconds, then it turns to noise.

I've tried attaching a (truncated) log file to this issue, but it doesn't work, so here's a pastebin: http://pastebin.com/NJXS2isM

When I disable PulseAudio it works just fine and the log is clean.

juhovh commented 8 years ago

Hmm, everything seems quite normal in the log, not sure why it would turn to noise after a certain timeframe... Each audio frame is decoded separately so skipping some shouldn't affect the result. I'm suspecting the problem might be somewhere else, maybe something in how PulseAudio and libao are configured.

Lerentis commented 8 years ago

I have had the same problem on my Pi 3, but could solve it. Did you load the required modules correctly? These were required by me, but for oss

snd-bcm2835
snd_pcm_oss
snd_mixer_oss

also I had to switch to oss. you can do this by editing /etc/libao.conf

#default_driver=alsa
#dev=default
default_driver=oss

Also what device are you using as output? 3.5 mm jack or HDMI? For jack you have to edit /boot/config.txt

dtparam=audio=on
audio_pwm_mode=2

Please keep in mind that I am using arch armv7 as a distribution for my Pi

SilvesterHsu commented 7 years ago

@Lerentis It works!

juhovh commented 6 years ago

Not a shairplay issue, closing.