diff --git a/README.md b/README.md index c8b34bb..b9bc3dd 100644 --- a/README.md +++ b/README.md @@ -4,9 +4,9 @@ # Setup - OS Setup, [Instructions](/marcio.fernandes/raspberrypi) -- HiFiBerry Setup ([information source](https://www.hifiberry.com/docs/software/configuring-linux-3-18-x/)) +- HiFiBerry Setup ([Information source](https://www.hifiberry.com/docs/software/configuring-linux-3-18-x/)) - - Remove the line from /boot/config.txt if it exists, for disabling onboard sound. + - Remove/comment from /boot/config.txt if it exists, for disabling onboard sound. dtparam=audio=on @@ -14,6 +14,8 @@ force_eeprom_read=0 dtoverlay=hifiberry-dacplus + + - Copy file etc/asound.conf - Reboot @@ -27,11 +29,32 @@ tar -xvzf download + - Move untar file file to /usr/bin/ + + sudo mv squeezelite /usr/bin + + - Check if is executable + + ls -la /usr/bin/squeezelite - - - - + - If not make executable + + sudo chmod +x /usr/bin/squeezelite + + - Start on boot (as a service) + + - Download/copy file [etc/systemd/system/squeezelite.service]() to /etc/systemd/system/ + *check file for squeezelite configurations* + *squeezelite --help for arguments* + + - Start service + + sudo systemctl start squeezelite + + - Enable service on boot + *if used with bluealsa only one can be used on boot* + + sudo systemctl enable squeezelite diff --git a/etc/asound.conf b/etc/asound.conf new file mode 100644 index 0000000..38c200c --- /dev/null +++ b/etc/asound.conf @@ -0,0 +1,6 @@ +pcm.!default { + type hw card 0 +} +ctl.!default { + type hw card 0 +} \ No newline at end of file diff --git a/etc/systemd/system/squeezelite.service b/etc/systemd/system/squeezelite.service new file mode 100644 index 0000000..034c985 --- /dev/null +++ b/etc/systemd/system/squeezelite.service @@ -0,0 +1,22 @@ +# file located at /lib/systemd/system/ + + +[Unit] +Description=Squeezelite + +Requires=network.target sound.target +After=network.target sound.target + +[Service] +Type=simple + +# change for user you want! +User=root + +# note use your mac address as given by ifconfig and the name you wish to give your player +#ExecStart=/usr/bin/squeezelite -n "PlayerName" +#by default use pi name +ExecStart=/usr/bin/squeezelite + +[Install] +WantedBy=multi-user.target \ No newline at end of file