Airplay receiver with Orange Pi. How to make your HiFi sound system wireless.

Orange PI Lite
# file name in my case:
# Armbian_5.35_Orangepilite_Ubuntu_xenial_default_3.4.113_desktop.7z
brew install p7zip xz
7za e Armbian_5.35_Orangepilite_*.7z
$ diskutil list
...
/dev/disk2 (external, physical):
#: TYPE NAME SIZE IDENTIFIER
0: FDisk_partition_scheme *31.0 GB disk2
1: Linux 30.7 GB disk2s1
$ diskutil unmountDisk /dev/disk2
Unmount of all volumes on disk2 was successful
sudo dd if=Armbian_5.35_Orangepilite_Ubuntu*.img of=/dev/disk2 bs=1m

root/1234

apt-get update
apt-get upgrade
# fix locale first
apt-get install --reinstall language-pack-en -y
locale-gen
echo "LC_ALL=C" >> /etc/environment
dpkg-reconfigure locales
# enable swap file (disabled by default)
sudo swapoff -a
sudo rm /var/swap
# choose location and size for the swap file, say 512Mb on SD card:
sudo dd if=/dev/zero bs=1M count=512 of=/var/swap
sudo chmod 0600 /var/swap
sudo /sbin/mkswap /var/swap
sudo nano /etc/sysctl.conf
# change here vm.swappiness=0 to vm.swappiness=32 and save
h3consumption -m 1000
h3consumption -p
#Active settings:
#cpu 1008 mhz allowed, 1200 mhz possible, 4 cores active
# install avahi daemon
apt-get install avahi-daemon
# now log try to SSH it on your laptop:
ssh root@orangepilite.local
# change `orangepilite` to something else (if you want) in following files:
# /etc/hostname
# /etc/hosts
$ root@orangepilite:~# nmcli dev wifi
SSID MODE CHAN RATE SIGNAL BARS SECURITY
MacNetwork Infra 7 54 Mbit/s 67 *** WPA2evdoty Infra 12 54 Mbit/s 50 ** WPA1 WPA2SN_103_3 Infra 11 54 Mbit/s 49 ** WPA2
nmcli device wifi connect "MacNetwork" password "mypassword"
root@orangepilite:~# nmcli device status
DEVICE TYPE STATE CONNECTION
wlan0 wifi connected MacNetwork
lo loopback unmanaged --
# check syslog
tail -f /var/log/syslog
# there will be a message that audio device was connected
# add your user to `audio` just in case
sudo adduser root audio
# check if your sound card is available
root@orangepilite:~# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: audiocodec [audiocodec], device 0: SUNXI-CODEC sndcodec-0 []
...
card 1: sndhdmi [sndhdmi], device 0: SUNXI-HDMIAUDIO sndhdmi-0 []
...
card 2: S2 [Sound Blaster Play! 2], device 0: USB Audio [USB Audio]
defaults.pcm.card 2
defaults.ctl.card 2
pcm.!default {
type plug
slave.pcm {
type dmix
ipc_key 1024
slave {
pcm "hw:2"
# rate 48000 # this line is only needed for USB DACs which only support 48khz
period_time 0
period_size 1920
buffer_size 19200
}
}
}
ctl.!default {
type hw
card 2
}
reboot# let's see if it works, you should hear a noisy sound
speaker-test
alsamixer
# use arrows to change volume and ESC to exit
# save settings
alsactl store
add-apt-repository ppa:dantheperson/shairplay-sync
apt-get update
apt-get upgrade
apt-get install shairport-sync
reboot
# remove installed version
apt-get remove shairport-sync
apt-get install build-essential git xmltoman autoconf automake libtool libdaemon-dev libpopt-dev libconfig-dev libasound2-dev avahi-daemon libavahi-client-dev libssl-devgit clone https://github.com/mikebrady/shairport-sync.git --depth 1cd shairport-sync
autoreconf -i -f
./configure --with-alsa --with-avahi --with-ssl=openssl --with-systemd --with-metadata
checkinstall
This package will be built according to these values:0 -  Maintainer: [ root@orangepilite ]
1 - Summary: [ AirTunes emulator. Multi-Room with Audio Synchronisation ]
2 - Name: [ shairport-sync ]
3 - Version: [ 3.1.7 ]
4 - Release: [ 1%{?dist} ]
Enter a number to change any of them or press ENTER to continue: 4Enter new release number:
>> 1
Done. The new package has been installed and saved to
/root/shairport-sync/shairport-sync_3.1.7-1_armhf.deb
You can remove it from your system anytime using:
dpkg -r shairport-sync
systemctl enable shairport-sync
service shairport-sync start

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store