Giter Site home page Giter Site logo

rpi-audio-receiver's Introduction

Raspberry Pi Audio Receiver

A simple, light weight audio receiver with Bluetooth (A2DP), AirPlay, Spotify Connect and UPnP.

Features

Devices like phones, tablets and computers can play audio via this receiver.

Requirements

  • Raspberry Pi with Bluetooth support (tested wth Raspberry Pi 3, 4 and Zero W) or USB dongle
  • Raspbian Buster Lite (tested with June 2019 version)
  • Internal audio, HDMI, USB or I2S Audio adapter (tested with Adafruit USB Audio Adapter, pHAT DAC, and HifiBerry DAC+)

Installation

The installation script asks whether to install each component.

wget -q https://github.com/nicokaiser/rpi-audio-receiver/archive/master.zip
unzip master.zip
rm master.zip

cd rpi-audio-receiver-master
./install.sh

Basic setup

Sets hostname to e.g. airpi, the visible device name ("pretty hostname") to AirPi.

Bluetooth

Sets up Bluetooth, adds a simple agent that accepts every connection, and enables audio playback through BlueALSA. A udev script is installed that disables discoverability while connected.

AirPlay

Installs Shairport Sync AirPlay Audio Receiver.

This script comes with a backported version of shairport-sync from Raspbian Bullseye (see SimpleBackportCreation for details) and can be replaced with the original (but older) one in Raspbian Buster or a sef-compiled one (not part of this project).

Spotify Connect

Installs Spotifyd, an open source Spotify client).

UPnP

Installs gmrender-resurrect UPnP Renderer.

Snapcast

Installs snapclient, the client component of the Snapcast Synchronous multi-room audio player.

Read-only mode

To avoid SD card corruption when powering off, you can boot Raspbian in read-only mode. This is described by Adafruit in this tutorial and cannot be undone.

Limitations

  • Only one Bluetooth device can be connected at a time, otherwise interruptions may occur.
  • The device is always open, new clients can connect at any time without authentication.
  • To permanently save paired devices when using read-only mode, the Raspberry has to be switched to read-write mode (mount -o remount,rw /) until all devices have been paired once.
  • You might want to use a Bluetooth USB dongle or have the script disable Wi-Fi while connected (see bluetooth-udev), as the BCM43438 (Raspberry Pi 3, Zero W) has severe problems with both switched on, see raspberrypi/linux/#1402.
  • The Pi Zero may not be powerful enough to play 192 kHz audio, you may want to change the values in /etc/asound.conf accordingly.

Disclaimer

These scripts are tested and work on a current (as of January 2020) Raspbian setup on Raspberry Pi. Depending on your setup (board, configuration, sound module, Bluetooth adapter) and your preferences, you might need to adjust the scripts. They are held as simple as possible and can be used as a starting point for additional adjustments.

References

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.