Projects/xq/MusicPi.md
... ...
@@ -10,7 +10,6 @@ A music playback device based on a Raspberry Pi 3
10 10
11 11
[Installation instructions](https://archlinuxarm.org/platforms/armv8/broadcom/raspberry-pi-3)
12 12
13
-
14 13
### Create the required users
15 14
```
16 15
useradd --home-dir /var/run/pulse pulse
... ...
@@ -30,7 +29,7 @@ alsa-ucm-conf
30 29
31 30
### Adjust config files
32 31
33
-### `/etc/pulse/system.pa`
32
+#### `/etc/pulse/system.pa`
34 33
35 34
Append to the config file:
36 35
... ...
@@ -45,7 +44,7 @@ load-module module-zeroconf-publish
45 44
load-module module-alsa-card device_id=0 sink_name="Stereoanlage"
46 45
```
47 46
48
-### `/etc/systemd/system/pulseaudio.service`
47
+#### `/etc/systemd/system/pulseaudio.service`
49 48
50 49
Create this file:
51 50
... ...
@@ -63,240 +62,60 @@ RestartSec=5
63 62
WantedBy=multi-user.target
64 63
```
65 64
65
+This defines a new systemd service called `pulseaudio` which will run [pulseaudio](https://www.freedesktop.org/wiki/Software/PulseAudio/)
66
+
67
+#### `/boot/config.txt`
68
+
69
+Append to the file:
70
+```
71
+dtparam=audio=on
72
+audio_pwm_mode=2
73
+```
74
+
75
+This change enables the audio DAC and provides an alsa soundcard.
76
+
77
+### Enable the services:
78
+
79
+```sh
80
+systemctl --global disable pulseaudio.service pulseaudio.socket # disable all user pulse audio
81
+systemctl enable pulseaudio # enable our systemwide pulse audio service
82
+systemctl enable avahi-daemon # enable zeroconf discovery
83
+```
84
+
85
+### Reboot the Pi to enable the sound card:
86
+
87
+```
88
+reboot
89
+```
90
+
91
+After this, the pulseaudio sink is readily configured to be used with other pulseaudio installations
66 92
67 93
## Auxiliary commands
68 94
69
-**dry run:**
95
+### Adjust volume
96
+
97
+Use `alsamixer` to adjust the volume for PCM audio
98
+
99
+### dry run
100
+
101
+This runs the pulseaudio like in the service
102
+
70 103
```
71 104
/usr/bin/pulseaudio --system --disallow-exit --disallow-module-loading
72 105
```
73 106
107
+### test alsa
74 108
75
-## Packages
109
+This downloads a small example file (sounds like a coin in super mario world) and plays it via `aplay` to test if the soundcard works:
76 110
77
-debugging/testing:
78 111
```
79
-pulsemixer
112
+curl -O https://mq32.de/public/mariocoin.wav
113
+aplay mariocoin.wav
80 114
```
81 115
82
-unchecked:
116
+## Packages
117
+
118
+debugging/testing:
83 119
```
84
-acl
85
-archlinuxarm-keyring
86
-argon2
87
-attr
88
-audit
89
-base
90
-bash
91
-binutils
92
-boost-libs
93
-bzip2
94
-ca-certificates
95
-ca-certificates-mozilla
96
-ca-certificates-utils
97
-coreutils
98
-cracklib
99
-crda
100
-cryptsetup
101
-curl
102
-db
103
-dbus
104
-device-mapper
105
-dhcpcd
106
-dialog
107
-diffutils
108
-dnssec-anchors
109
-e2fsprogs
110
-elfutils
111
-expat
112
-file
113
-filesystem
114
-findutils
115
-firmware-raspberrypi
116
-flac
117
-gawk
118
-gcc
119
-gcc-libs
120
-gdbm
121
-gdk-pixbuf2
122
-gettext
123
-git
124
-glib2
125
-glibc
126
-gmp
127
-gnupg
128
-gnutls
129
-gpgme
130
-gpm
131
-grep
132
-gzip
133
-haveged
134
-hwids
135
-iana-etc
136
-icu
137
-iproute2
138
-iptables
139
-iputils
140
-iw
141
-js60
142
-json-c
143
-kbd
144
-keyutils
145
-kmod
146
-krb5
147
-ldns
148
-less
149
-libarchive
150
-libassuan
151
-libasyncns
152
-libcap
153
-libcap-ng
154
-libcroco
155
-libdaemon
156
-libedit
157
-libelf
158
-libffi
159
-libgcrypt
160
-libgpg-error
161
-libice
162
-libidn2
163
-libjpeg-turbo
164
-libksba
165
-libldap
166
-libmicrohttpd
167
-libmnl
168
-libmpc
169
-libnetfilter_conntrack
170
-libnewt
171
-libnfnetlink
172
-libnftnl
173
-libnghttp2
174
-libnl
175
-libnotify
176
-libnsl
177
-libogg
178
-libp11-kit
179
-libpcap
180
-libpng
181
-libpsl
182
-libpulse
183
-libsamplerate
184
-libsasl
185
-libseccomp
186
-libsecret
187
-libsm
188
-libsndfile
189
-libsoxr
190
-libssh2
191
-libtasn1
192
-libtiff
193
-libtirpc
194
-libtool
195
-libunistring
196
-libusb
197
-libutil-linux
198
-libvorbis
199
-libx11
200
-libxau
201
-libxcb
202
-libxdmcp
203
-libxext
204
-libxfixes
205
-libxi
206
-libxml2
207
-libxtst
208
-licenses
209
-linux-api-headers
210
-linux-firmware
211
-linux-raspberrypi
212
-lz4
213
-mkinitcpio
214
-mkinitcpio-busybox
215
-mpfr
216
-nano
217
-ncurses
218
-net-tools
219
-netctl
220
-nettle
221
-npth
222
-openresolv
223
-openssh
224
-openssl
225
-orc
226
-p11-kit
227
-pacman
228
-pacman-mirrorlist
229
-pam
230
-pambase
231
-pamixer
232
-pciutils
233
-pcre
234
-pcre2
235
-perl
236
-perl-error
237
-perl-mailtools
238
-perl-timedate
239
-pinentry
240
-polkit
241
-ponymix
242
-popt
243
-procps-ng
244
-psmisc
245
-pulseaudio
246
-pulseaudio-zeroconf
247 120
pulsemixer
248
-python
249
-python-appdirs
250
-python-cachecontrol
251
-python-chardet
252
-python-colorama
253
-python-contextlib2
254
-python-distlib
255
-python-distro
256
-python-html5lib
257
-python-idna
258
-python-msgpack
259
-python-ordered-set
260
-python-packaging
261
-python-pep517
262
-python-pip
263
-python-progress
264
-python-pyparsing
265
-python-requests
266
-python-resolvelib
267
-python-retrying
268
-python-setuptools
269
-python-six
270
-python-toml
271
-python-urllib3
272
-python-webencodings
273
-raspberrypi-bootloader
274
-raspberrypi-bootloader-x
275
-raspberrypi-firmware
276
-readline
277
-rtkit
278
-sed
279
-shadow
280
-shared-mime-info
281
-slang
282
-speexdsp
283
-sqlite
284
-systemd
285
-systemd-libs
286
-systemd-sysvcompat
287
-tar
288
-tdb
289
-tzdata
290
-util-linux
291
-vi
292
-webrtc-audio-processing
293
-which
294
-wireless-regdb
295
-wireless_tools
296
-wpa_supplicant
297
-xcb-proto
298
-xorgproto
299
-xz
300
-zlib
301
-zstd
302
-```
303 121
\ No newline at end of file
122
+```