There are many Apps that allow you to connect your iPhone or iPad to your smart TV.
If you have a Raspberry Pi and you want to use your TV as a spear to stream music, or if you have a Speaker and want to use it as a wireless device, this may help you.
It’s definitely fun to do. Took me a few minutes of research and below i’ll show you how I set up my Raspberry Pi and I am now using it as an AirPlay receiver to stream audio from my iOS devices.

Requirements

I’m going to assume you already have your Raspberry Pi setup and running.

  • Raspberry Pi
  • Speakers or TV/Monitor through HDMI
  • Ethernet Cable

Install Updates

Make sure that the Pi’s software is all up to date by entering the following into the command line:

sudo apt-get update
and then
sudo apt-get upgrade

Installing Needed Software

We need to install additional software that isn’t included as standard. This software will help us set up the AirPlay receiver:

  • avahi-utils
  • build-essential
  • chkconfig
  • git
  • libao-dev
  • libavahi-client-dev
  • libcrypt-openssl-rsa-perl
  • libio-socket-inet6-perl
  • libssl-dev
  • libwww-perl
  • pkg-config

To install the software packages, we’re going to use the following command:

sudo apt-get install avahi-utils build-essential chkconfig git libao-dev libavahi-client-dev libcrypt-openssl-rsa-perl libio-socket-inet6-perl libssl-dev libwww-perl pkg-config

ShairPort

Now we will download ShairPort, configure and setup ShairPort.

We will use previously installed git to clone ShairPort from GitHub.

git clone -b 1.0-dev git://github.com/abrasive/shairport.git

Once completed, we go into it’s directory using the following command line:

cd shairport

Prepare ShairPoint for install and then we will install it.

sudo ./configure && sudo make && sudo make install

After that has completed ShairPort will be ready to go.

Starting ShairPort

To start ShairPort, enter the following command:

shairport -a ‘AirPLayer’

I decided to call it AirPlayer but you can call it whatever you like. 
Raspberry Pi will state that it’s “Listening for connections” which means it’s ready to go.

Finishing Off

I found the HDMI quality to be better, sounds great out of my TV.
I will update this entry with making ShairPort startup on reboot etc.