Working sound setup for raspis

This commit is contained in:
Martin Bauer
2020-05-10 15:25:38 +02:00
parent caf6232dfb
commit d8c9a491d1
40 changed files with 815 additions and 43 deletions

View File

@@ -0,0 +1,24 @@
Repository: https://github.com/ralph-irving/squeezelite.git
Version: 779fe9035a2dfcaeeb5335497a012d5e7241a409
Custom Makefile based on Makefile.rpi:
```Makefile
OPTS = -DLINUX -DUSE_SSL -DLINKALL -I./include -I./include/opus -I./include/alac -I/usr/local/include -s -march=armv6 -mfloat-abi=hard -mfpu=vfp
LDFLAGS=-L./lib -L/usr/local/lib -s -lgomp -lasound
include Makefile
```
Required packages:
```bash
apt-get install libasound2 libasound2-dev libflac-dev libmad0-dev libfaad-dev libmpg123-dev libvorbis-dev
```
- no RPI switch (this is only when wanting to do switiching based on GPIO headers)
- manually added -lasound (don't know why it wasn't in there)
Then just build with
make -f mymakefile (on a raspi)

Binary file not shown.

View File

@@ -0,0 +1,17 @@
---
- name: Uninstall system package of squeezelite
apt: name=squeezelite state=absent
- name: Remove old config file if present
file: path=/etc/default/squeezelite state=absent
- name: Copy over custom compile version of squeezelite
copy: src=squeezelite dest=/opt/squeezelite mode=700
- name: Install systemd service file
template: src=squeezelite.service dest=/lib/systemd/system/
- name: Enable sysdweb autostart
systemd: name=squeezelite state=restarted enabled=yes daemon_reload=yes
- name: Add to sysdweb
include_role:
name: pi-sysdweb
vars:
sysdweb_name: squeezelite

View File

@@ -0,0 +1,10 @@
[Unit]
Description=Squeezelite
After=network.target
[Service]
ExecStart=/opt/squeezelite -n {{squeezelite_name}} -s {{squeezeserver}} -o softvol_squeezelite
Restart=on-failure
[Install]
WantedBy=multi-user.target