A few weeks ago, my wife commented to me that she liked listening to my weekly paper and dice roll playing sessions on Discord. My laptop does not have very good speakers though and so from that point until now I researched and worked to integrate our home entertainment system (just a TV, chromecast, and a raspberry pi) with my Murkfall server to create a central place to link into for audio.
The first hurdle was hardware, I needed a male-male audio jack cable. A quick search on Amazon yielded the hardware I needed and I ordered it right away. Since I had not attempted something like this before, I didn't bother trying to configure pulse audio on Murkfall right away since I wouldn't be able to test anything until I had the cable. I waited impatiently for it to show up and was pleasantly surprised to find it waiting for me on the table several days later.
I set to work rearranging cables and getting everything set up the way it needed to be physically. The physical topology as it is now is configured like this:
ChromeCast --> TV
Raspberry Pi --> TV
TV --> Murkfall Server
Murkfall Server --> Speakers
The next hurdle was getting PulseAudio on Murkfall and getting it configured to pass the audio from the TV (Through the mic port) which is known as a source, to the speakers (Through the headphone port) which is known as a sink. I knew this would not be a viable project if I changed how the majority of the system worked. My wife would not be too happy if she had to watch her netflix without sound. The solution to this was to enable loopback in PulseAudio, I won't go into the details of that right here, but the majority of what I used for research was on the Arch Wiki pages for PulseAudio. So, first we enable loopback, this tells pulse audio to create a couple extra devices, a virtual input and output, with that, it then can connect the mic source to the headphone sink in a way that PulseAudio understands.
I did this but I still did not have any sound from the TV, after several hours of trying different things and staring at the list of devices in PulseAudio, I finally went and found a command line based mixer and installed that on Murkfall. As soon as I opened it up I saw the problem, the input and output for the mic and headphone jacks were both muted. I didn't think things all the way through here and set the volume to 100% before realizing that it was muted, and so when I unmated it I nearly gave my wife a heart attack. With that I had completed the prerequisite to my project, if that had not worked I would not be able to continue with the part that I wanted to do.
Next it was time to get my laptop to see the sinks provided by Murkfall. I tried several methods which all failed, one in particular RTP broadcasting, actually brought down our wifi by flooding the network with broadcast packets. What finally worked was using zeroconfig, I added the zeroconfig broadcast module to Murkfalls PulseAudio and the zeroconfig discover module to pulseaudio on my laptop. Then just to cover my bases, I restarted PulseAudio on both computers and I restarted a daemon called avahi, as soon as I restarted that on my laptop (it apparently was not running to begin with) Murkfalls sinks popped right up.
That about did it, I did take a look at the PulseAudio troubleshooting page to fine tune some things on the server. But other than that, I can now use our home entertainment system as a network attached speaker system for my laptop.