Can see airplay, but no sound output

Hi all,

This is my first dive into the world of linux and Raspberry Pi. Been a learning curve, but enjoying it!

Getting pi musicbox up and working was relatively straight forward. I can stream internet radio no problems using the web interface from my laptop.

BUT I can’t seem to get airplay working. I can see the Raspberry Pi in iTunes on my laptop, I can select it and play music and adjust volume, but get absolutely no audio output.

I am using the standard analog output for now while I try to get it working. This is my settings.ini file below. Any help would be very appreciated!

# ---------------------
# | MusicBox Settings |
# ---------------------
# To secure your device, change the default password to something else.
# For security, the value in this file will be automatically cleaned out when the password is set in MusicBox
root_password = ""

# Automatically resize the filesystem and use all available space on your SD card. 
# Use at your own risk, you could lose data on your card.  
# (If so, you can put the original MusicBox image on it again and start over) 
resize_once = false

# Scan on startup for new music files on the SD card or the network shares (could take a while!).
# Local files work ok for moderate size collections. Large music database sizes could cause problems.
# IMPORTANT: if you enable scan_always this will scan on every boot.
# If your music doesn't change or you only stream music set scan_once instead. 
#scan_once = true
scan_always = true

# MusicBox can automatically start playing a stream/song after startup.
# It will wait a number of seconds before trying to do so for the system to first become ready. 
# The wait required varies per device, network and configuration so if it doesn't work then increase the time.
# e.g. autoplay = or local:track:MusicBox/Music%20File.mp3 (on the SD Card)
autoplay = ""
autoplaywait = 60

# -------------
# | Streaming |
# -------------
# Set these options to enable streaming to Pi MusicBox
# AirTunes (using Shairport-sync):
enable_shairport = true

# DLNA/uPnP/OpenHome (using upmpdcli):
enable_upnp = false

# ------------------
# | Audio Settings |
# ------------------
# Because of limitations with some USB-DACs, MusicBox downsamples USB sound to 44k by default. Set to false to disable.
downsample_usb = false

# Set default audio output. This overrides the automatic detection (which sets to usb audio if an usb audio device
# is found, else to hdmi (if hdmi is connected at boot), and otherwise just to the analog out).
# i2s cards (e.g. HifiBerry etc) are not detected automatically and must be explicitly set here.
# Options: analog, hdmi, usb, hifiberry_dac, hifiberry_digi, hifiberry_dacplus, hifiberry_amp, iqaudio_dac
output = analog

# Set the startup volume of MusicBox
# Values: from 0 to 100
mixer_volume = 100

# --------------------------------------------------------------------------
# | OTHER Settings                                                         |
# | You probably don't want to edit the settings below this line. Really.  |
# | Unless you know what you're doing, or you want to change the webclient |
# --------------------------------------------------------------------------
# This sets the gstreamer buffer. It's a bit tricky...
# If you have problems with stuttering sound, try other values here, like:
# or
#output = alsasink buffer-time=300000 latency-time=20000
#output = alsasink buffer-time=200000 latency-time=10000
#output = alsasink

mixer = software

# Optionally, you can use alsamixer. This enables you to use hardware mixers of usb/audiocards.
# Set the previous setting to:
#mixer = alsamixer
# And set the card and contol below. E.g. 
#card =  
#control = PCM
# Run the command 'amixer scontrols' from the commandline to list available controls on your system
# See
card = 1
control = Master

enabled = true
protocols = http, https, mms, file, rtmp, rtmps, rtsp, udp, mmsh

enabled = true
hostname =
port = 6680
#Disable zeroconf
zeroconf = ""

First up it’s probably worth double/triple checking the sound output is not just really quiet. You can use alsamixer to check the volume.

Otherwise you can try to get some debug logs by enabling verbose logging with the -v option. Do this by changing line 63 of /etc/init.d/shairport-sync to:

start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- -d -a "$MBNAME (MusicBox)" -w -B "/usr/bin/mpc stop" -vvv || return 2

Then if you reboot (or just restart the service by running service shairport-sync restart) it should start logging extra info. I’m not 100% sure where it logs to, probably something like /var/log/shairport-sync but maybe @mikebrady can verify that,

Hi and thanks for the details.

I thought I would try my ipad this morning… and it airplay worked from there!
Out of interest I checked the alsamixer volume and it was at 93 so no issues there.

Sound is terrible (original pi so DAC is woeful) so good excuse to buy a new DAC!

Now to try to work out why it doesn’t work from the laptop…

EDIT: Turns out it was my antivirus was blocking it airplay. I disabled it and bingo it works! So just need to workout what sort of exception to add and away we go. Awesome!

Just seeing this now (!). I’m glad you got it working. For reference, Shairport Sync logs to the standard log on the Raspberry Pi. On Wheezy it is at /var/log/syslog. On Jessie, you use the journalctl system.

I had to reinstall musicbox recently on my RPi 2B and now airplay won’t work. Before reinstalling it was working flawlessly with my i5s.

When I play a song on my phone the option to send the audio to musicbox.local (as it appears in the airplay menu) is not there.

Yes, both my phone and the Pi are in the same wifi network. I’m running out of ideas here.

I found the solution to my problem here