Blame


1 84302400 2020-10-03 op Like I said in the previous entry I don't like to write howtos: the information tend to rot away if not carefully updated, and I don't have all that stamina. Anyway, I felt like writing this, and so here we are.
2 84302400 2020-10-03 op
3 8eb658e5 2020-11-07 op => /post/openbsd-tethering.gmi Previous entry: Automatic USB Tethering on OpenBSD
4 84302400 2020-10-03 op
5 84302400 2020-10-03 op Due to events that are outside the scope of this entry, I moved my computer in a place where I cannot comfortably attach a jack to it. (I realized this only after the rearrangement, shame on me!)
6 84302400 2020-10-03 op
7 84302400 2020-10-03 op While any sane person would have just bought a longer cable (that I should have somewhere anyway) I decided that was the right time to test the network capabilities of sndio, the audio server of my OS of choice.
8 84302400 2020-10-03 op
9 84302400 2020-10-03 op I have to admit that while at a first glance sending audio over the network may seem complicated, I was surprised by how easy it was.
10 84302400 2020-10-03 op
11 84302400 2020-10-03 op The plan™ was to route all the audio from my OpenBSD workstation to a raspberry pi through the LAN. Why a raspberry? Because I had one spare that was accumulating dust.
12 84302400 2020-10-03 op
13 84302400 2020-10-03 op So, I installed void linux on the raspberry (OpenBSD should run on the raspberries, but for the installation you need to use the serial, and I don't have an adapter). The setup was really quick:
14 84302400 2020-10-03 op
15 84302400 2020-10-03 op ```
16 84302400 2020-10-03 op # xbps-install sndio
17 84302400 2020-10-03 op # xbps-install alsa-utils # for alsamixer
18 84302400 2020-10-03 op # echo 'OPTS="-L-"' > /etc/sv/sndiod/conf
19 84302400 2020-10-03 op # ln -s /etc/sv/sndiod /var/service/
20 84302400 2020-10-03 op ```
21 84302400 2020-10-03 op
22 84302400 2020-10-03 op (the -L- is to tell sndiod to accept connection from anywhere.)
23 84302400 2020-10-03 op
24 84302400 2020-10-03 op And for the pi that's all. (except that I still have to increase the volume with alsamixer after every boot). Now, back on the workstation I added this to my .xsession
25 84302400 2020-10-03 op
26 84302400 2020-10-03 op ```
27 84302400 2020-10-03 op export AUDIODEVICE=snd@192.168.1.12/0
28 84302400 2020-10-03 op ```
29 84302400 2020-10-03 op
30 84302400 2020-10-03 op (You probably want to change the ip address, and only that! snd@ IS NOT a username. The same goes for the /0: it's the device number, not some CIDR notation.)
31 84302400 2020-10-03 op
32 84302400 2020-10-03 op Now all the audio is transparently sent through the network to my pi, and from there to my headphones via my (short) jack cable. Awesome.
33 84302400 2020-10-03 op
34 84302400 2020-10-03 op That's really all. Now the bad news: you could have same some time by reading the FAQ on the OpenBSD website instead of this post :P