ydzheng123
Posts: 1
Joined: Fri Aug 09, 2013 1:27 pm

Re: Preconfigured Airplay speaker (Shairport) - Rasp. Pi Ima

Fri Aug 09, 2013 2:03 pm

I installed this on my pi and airplayed music from my ipad . the pi worked ok in the beginning, Then, it crashed after several songs played, I had to reset the pi in order to make it play music again. It crashed again after several songs. Please advise how to solve this problem. Thanks for your help,

Y. D. Zheng

danico
Posts: 6
Joined: Thu Aug 22, 2013 3:01 am
Location: Perth, Australia

Re: Preconfigured Airplay speaker (Shairport) - Rasp. Pi Ima

Thu Aug 22, 2013 3:18 am

This sounds great - will fit nicely into the current project of setting up multiroom music in the house.

Can Shairport control the Pi GPIO pins, so that when audio begins to stream, it can power on the amplifier, and when streaming stops, the amplifier is turned off?
The implementation of the relay is not of concern (lots of threads about that), but just the smarts from Shairport to output the GPIO control.

Any thoughts on this?

elfary
Posts: 3
Joined: Thu Aug 22, 2013 8:51 am

Re: Preconfigured Airplay speaker (Shairport) - Rasp. Pi Ima

Thu Aug 22, 2013 9:04 am

Hi,
unfortunately it doesn't work for me. I've installed the image but Honey or Twonky in Android or Airfoil in a PC don't see my Pi to send sound.

What can i do?

Thx

rapsberrye
Posts: 21
Joined: Sat Jul 07, 2012 12:25 am

Re: Preconfigured Airplay speaker (Shairport) - Rasp. Pi Ima

Thu Aug 22, 2013 9:30 pm

elfary wrote:Hi,
unfortunately it doesn't work for me. I've installed the image but Honey or Twonky in Android or Airfoil in a PC don't see my Pi to send sound.

What can i do?

Thx
Are you using a wifi dongle? I am releasing a new version later this week which will have a better startup script for using wifi dongles.

elfary
Posts: 3
Joined: Thu Aug 22, 2013 8:51 am

Re: Preconfigured Airplay speaker (Shairport) - Rasp. Pi Ima

Fri Aug 23, 2013 9:23 am

No, for the moment the Pi is connected via Ethernet.

elfary
Posts: 3
Joined: Thu Aug 22, 2013 8:51 am

Re: Preconfigured Airplay speaker (Shairport) - Rasp. Pi Ima

Mon Aug 26, 2013 11:20 am

It works now!
Just needed to install pulseaudio

rapsberrye
Posts: 21
Joined: Sat Jul 07, 2012 12:25 am

Re: Preconfigured Airplay speaker (Shairport) - Rasp. Pi Ima

Sat Aug 31, 2013 3:23 pm

New version is currently being uploaded. :geek:

The build instructions are already updated:
http://snippets.khromov.se/raspberry-pi ... tructions/

rapsberrye
Posts: 21
Joined: Sat Jul 07, 2012 12:25 am

Re: Preconfigured Airplay speaker (Shairport) - Rasp. Pi Ima

Sat Aug 31, 2013 11:04 pm

New image is out! Check first post!

danico
Posts: 6
Joined: Thu Aug 22, 2013 3:01 am
Location: Perth, Australia

Re: Preconfigured Airplay speaker (Shairport) - Rasp. Pi Ima

Wed Sep 11, 2013 2:54 am

I downloaded the preconfigured Raspian and Shairport build as detailed in the first post, wrote to the SD card, and hey presto, it worked seamlessly the first time! Couldn't be easier! But...
I noticed the background hiss, so did the search and found many posts about the average audio quality from the 3.5mm analogue output, so got hold of a USB sound card from ebay - a bargain at $6!
So next issue was how to re-direct the audio from the 3.5mm analogue to the USB card, so again did the search and found several methods particular to Shairport. Only problem with them, is each time they reference a file to modify or check, that file was either no longer there, or no longer had the same parameters - I guess the Shairport build is constantly evolving..

The procedure at http://drewlustro.com/hi-fi-audio-via-a ... spberry-pi seemed to do what I was after, so began to follow that.
The first change from the preconfigured image, was

in /etc/modprobe.d/alsa-base.conf
Comment out the line and add the following after:

Code: Select all

#options snd-usb-audio index=-2
options snd-usb-audio nrpacks=1
I did this, and again hey presto, audio out the USB sound card! No hiss, good quality, very happy. But...
I did not complete the procedure (primarily as "asound.conf" is no longer used), and I am not that confident of what I have done to make it operate through USB!

Can someone please advise if this was the right way to go about the change, and what the change to alsa-base.conf actually does?

Many thanks!

rapsberrye
Posts: 21
Joined: Sat Jul 07, 2012 12:25 am

Re: Preconfigured Airplay speaker (Shairport) - Rasp. Pi Ima

Wed Sep 11, 2013 1:32 pm

Hi danico,

As long as the sound works after you reboot, it should be fine!

What you can try is to to find the configuration file manually by executing:

Code: Select all

sudo find / -name asound.conf
If you can't find it, perhaps it's not automatically created. In that case you can create it manually.

I did add the tutorial you linked to the main post!

texy
Forum Moderator
Forum Moderator
Posts: 5144
Joined: Sat Mar 03, 2012 10:59 am
Location: Berkshire, England

Re: Preconfigured Airplay speaker (Shairport) - Rasp. Pi Ima

Thu Oct 31, 2013 9:11 pm

Hi,
I am downloading the new version now - 1.7GB - :o
Before I try it I was wondering if it is possible to tap in to the id3 information?
I would like to add one of my screens to the pi and show track, author, album art if possible.

Texy
Various male/female 40- and 26-way GPIO header for sale here ( IDEAL FOR YOUR PiZero ):
https://www.raspberrypi.org/forums/viewtopic.php?f=93&t=147682#p971555

rapsberrye
Posts: 21
Joined: Sat Jul 07, 2012 12:25 am

Re: Preconfigured Airplay speaker (Shairport) - Rasp. Pi Ima

Thu Oct 31, 2013 9:26 pm

texy wrote:Hi,
I am downloading the new version now - 1.7GB - :o
Before I try it I was wondering if it is possible to tap in to the id3 information?
I would like to add one of my screens to the pi and show track, author, album art if possible.

Texy
Hi texy,

The size is big because it's a full Raspbian image. You can use the build instructions (linked in first post) to build your own version, but I recommend you try the image first just to make sure it works with your network and devices.

I do not think Shairport exposes any of the id3 data. I would advise you to make an issue on their GitHub and ask regarding this (and if you do, post a link here because I'm also interested. :))
https://github.com/abrasive/shairport

texy
Forum Moderator
Forum Moderator
Posts: 5144
Joined: Sat Mar 03, 2012 10:59 am
Location: Berkshire, England

Re: Preconfigured Airplay speaker (Shairport) - Rasp. Pi Ima

Thu Oct 31, 2013 9:34 pm

Various male/female 40- and 26-way GPIO header for sale here ( IDEAL FOR YOUR PiZero ):
https://www.raspberrypi.org/forums/viewtopic.php?f=93&t=147682#p971555

blarrkan
Posts: 1
Joined: Fri Nov 15, 2013 3:05 pm

Re: Preconfigured Airplay speaker (Shairport) - Rasp. Pi Ima

Fri Nov 15, 2013 3:07 pm

I have a problem. I have installed using the image, but to be able to the RaspAir in Airfoil I have to write the following command

Code: Select all

sudo service avahi-daemon restart
I have tried both on ethernet and wireless. Also I have waited 20 minutes and the machines is not showed. But as soon as I restart avahi-daemon, the machine shows.

Anyone else has this problem? Also, how can I tell the raspberry to run this command at boot so all works directly :)?

jbnhf23
Posts: 10
Joined: Sat Nov 03, 2012 10:37 am

Re: Preconfigured Airplay speaker (Shairport) - Rasp. Pi Ima

Thu Nov 28, 2013 8:45 pm

how to setup a wifi USB adpater in the Preconfigured image ?

jawedsoft
Posts: 15
Joined: Tue Dec 10, 2013 8:04 am

Re: Preconfigured Airplay speaker (Shairport) - Rasp. Pi Ima

Tue Dec 10, 2013 8:16 am

Thank you !...this is just awesome. It worked first time....
I could get it up and running in less than one hour.

thank you.

Jawed, India

jawedsoft
Posts: 15
Joined: Tue Dec 10, 2013 8:04 am

Re: Preconfigured Airplay speaker (Shairport) - Rasp. Pi Ima

Tue Dec 10, 2013 11:47 am

danico wrote:This sounds great - will fit nicely into the current project of setting up multiroom music in the house.

Can Shairport control the Pi GPIO pins, so that when audio begins to stream, it can power on the amplifier, and when streaming stops, the amplifier is turned off?
The implementation of the relay is not of concern (lots of threads about that), but just the smarts from Shairport to output the GPIO control.

Any thoughts on this?
Hi Danico,
Were you able to do this?
I too am looking at something similar.
I have a relay circuit (specifically made for ardui/rasp)which can be controlled from the GPIO. Have connected it to the input of the amplifier(its a small one).
Now I am looking for the place in code where one needs to insert the command for taking the GPIO pin output to high to trigger the relay to on position.
I am new to world of raspberry but can find my way around with a little help from google.
If anyone has done something like this please point me to the right direction.

thanks,
Jawed Ahmed India

jbnhf23
Posts: 10
Joined: Sat Nov 03, 2012 10:37 am

Re: Preconfigured Airplay speaker (Shairport) - Rasp. Pi Ima

Sun Dec 15, 2013 7:14 pm

I am trying to install jackd2 on the preconfigured airplay image.
I have been following this guide: http://wiki.linuxaudio.org/wiki/raspberrypi

my soundcard is listed here:

Code: Select all

 cat /proc/asound/cards
 0 [PCM2702        ]: USB-Audio - Burr-Brown Japan PCM2702
                      Burr-Brown Japan Burr-Brown Japan PCM2702 at usb-bcm2708_usb-1.3, full speed
 1 [ALSA           ]: BRCM bcm2835 ALSbcm2835 ALSA - bcm2835 ALSA
                      bcm2835 ALSA
But when I try to start jackd2 with this

Code: Select all

jackd -P70 -p16 -t2000 -dalsa -dhw:0 -p128 -n3 -r44100 -s & 
I get this error:

Code: Select all

jackdmp 1.9.9
Copyright 2001-2005 Paul Davis and others.
Copyright 2004-2012 Grame.
jackdmp comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it
under certain conditions; see the file COPYING for details
JACK server starting in realtime mode with priority 70
control device hw:0
control device hw:0
Failed to connect to session bus for device reservation Unable to autolaunch a dbus-daemon without a $DISPLAY for X11

Failed to acquire device name : Audio0 error : Invalid argument
Audio device hw:0 cannot be acquired...
Cannot initialize driver
JackServer::Open failed with -1
Failed to open server
anyone with a good idea how to solve this?

a-spence7
Posts: 6
Joined: Tue Jul 10, 2012 10:51 am

Re: Preconfigured Airplay speaker (Shairport) - Rasp. Pi Ima

Tue Dec 17, 2013 9:06 pm

Just a couple of questions as I've been looking round for a suitible distribution with an airplay client.

Can the audio be played via HDMI instead of the 3.5mm jack?
Is this a standard Linux desktop environment and not something like XBMC?

hephaestoskin
Posts: 9
Joined: Fri Jul 26, 2013 4:18 am

Re: Preconfigured Airplay speaker (Shairport) - Rasp. Pi Ima

Fri Dec 27, 2013 5:19 am

Is there an audio visualizer I can run from the command line that will work on any audio being output through the HDMI? The screen sleeps black while playing music and that is fine, but I would really like a visualizer for some added flair.

Thanks!
Ben
I'm an artist, patience is a virtue!

rrjwilson
Posts: 1
Joined: Mon Jan 06, 2014 6:36 pm

Re: Preconfigured Airplay speaker (Shairport) - Rasp. Pi Ima

Mon Jan 06, 2014 8:04 pm

When you start shairport usually you supply the -a argument to supply its name.
This preconfigured image is called AirPi
I've gone into the startup configuration script /etc/init.d/shairport and for the life of me I cannot see the -a argument.
Am I looking for the wrong thing? Am I missing something?

I have to say thank you for this as I got shairport working almost instantly then moved to another project then thought I'd like to do that again. Instead of the couple hours taping I just loaded the image and WHAM!!! It's fantastic. So thank you for this effort.

For those googling airtunes, airplay, shairport raspbian, raspberry pi for help guides etc.
This image works out of the box for ethernet connected RPi but wireless needs some setup after that its done.
I have tested it across gigabit ethernet and WPA-PSK 802.11n with iPad 2 (iOS7.0.4), iPad Air (iOS7.0.4), iPhone4S (iOS7.0.4), iPhone5 (iOS7.0.4), MacBook Pro (OS10.8.4 iTunes11.0.4), Windows 7 (iTunes 11.1).
Not many places list all the types of testing so I hope this helps others.

massayoshi
Posts: 9
Joined: Fri Jan 04, 2013 7:06 pm

Re: Preconfigured Airplay speaker (Shairport) - Rasp. Pi Ima

Tue Jan 07, 2014 6:46 am

Just downloaded and flashed this image to my sd card and the strangest thing happened. I was able to login using the credentials but switched. Username was "pi" and passwords "raspberry". Other than that, worked out of the box! Getting a few pops though. Using an usb soundcard.

Using this http://www.aliexpress.com/store/product ... o_detail_a

User avatar
Paul Webster
Posts: 753
Joined: Sat Jul 30, 2011 4:49 am
Location: London, UK

Re: Preconfigured Airplay speaker (Shairport) - Rasp. Pi Ima

Tue Jan 07, 2014 7:40 am

That is the usual way round (username pi).

User avatar
Mrbcsimpson
Posts: 17
Joined: Tue Jan 07, 2014 9:29 pm
Location: Lincolnshire, UK
Contact: Website

Re: Preconfigured Airplay speaker (Shairport) - Rasp. Pi Ima

Tue May 06, 2014 9:08 pm

After using a headless OpenELEC setup, I wasn't happy with the slow loading of songs and stuttering as the music made its way across the network. I came across this setup, have just loaded and configured and we're away.

Running flawlessly so far plugged into:

- A Lepai LP-268 Mini-Amp
http://www.dx.com/p/lepai-lp-268-25w-2- ... 2lMWa1dUaI
- A set of Mission 760iSE speakers
http://www.mission.co.uk/
- TrendNET Powerline
http://www.dabs.com/products/trendnet-p ... tml?src=15 adapter for connectivity.

Controlled from the iPad, iPhone or MacBook with iTunes running from my main Server, all appear to work a treat!

ten_zip
Posts: 2
Joined: Sun Jul 14, 2013 7:47 pm

Re: Preconfigured Airplay speaker (Shairport) - Rasp. Pi Ima

Mon Jun 30, 2014 4:36 am

Very impressive. I spent many hours trying to get Shairport working on the Pi, but couldn't get it working.
Decided to give this a shot and it worked like a charm. Currently testing with the wife's iPhone (iOS 7) and listening through headphones on the Pi's audio port. Next will play with some Android apps. Thanks for putting it together.

Return to “Graphics, sound and multimedia”