Posts Projects //TODO Links->

Listening to Line-In With Pipewire

As per my last post, I've been busy futzing around with an old PC, and in doing so I wanted to hear it's audio output. Due to a rather restricted setup I reasoned the best way to do this would be to use the line-in on my main PC since it's pretty much always on when I use that other machine. In Windows this was very easy indeed, visit the old sound settings panel (not the new UI one), go to input devices and check the box to "listen" to that device, in other words, monitor it.

That's all well and good, but under Pop!_OS I wasn't having anywhere near as much luck.

Hello, Pipewire

I've used Linux on and off since the late 90s (with BeOS and BSDs thrown in too), and I remember when alsa was the hot new thing. Then came along pulse audio, which I've been vaguely aware of but until this year I've not used a Linux distro as a main OS for a long while. I was blisfully unaware of Pipewire, but what I read about it sounded good. Best of all it has a module for Pulse compatibility, meaning I should still be able to use things like alsamixer to mess with settings. Except, I can't.

No, I don't know why, the services are loaded etc. and running in the userland systemd environment but I have zero joy trying to run various commands like alsamixer:

matt@pop-os:~$ alsamixer
ALSA lib pulse.c:242:(pulse_connect) PulseAudio: Unable to connect: Connection refused

cannot open mixer: Connection refused

or pactl:

matt@pop-os:~$ pactl info
Connection failure: Connection refused
pa_context_connect() failed: Connection refused

As of yet I've been unable to find a solution to this problem, but while attemping to learn more about Pipewire I did find Arch's excellent write-up on it, and in there discovered Helvum, which is a patchbay for pipewire and while I thought about building it from source I figured it was worth a quick look in the Pop!_OS store first - sure enough there's a flatpack build in there.

Patching the Plumbing

It took all of two seconds to install Helvum, a couple more to launch it and barely any more than that to solve my problem. All I had to do was click and drag from the two (Left and Right Channel) nodes for the line-in source on motherboard and hooked them to them to the playback nodes for my graphics card as I use HDMI audio via my monitor (it's actually then connected via an analogue connection to an old amp with only one input, but it does avoid any noise on the signal from the PC by doing the first bit digitally). Job done.

Screen shot of Helvum showing the connection between line-in and my output device

There is a bit of noise on the sound from the retro PC, but I believe the source of that noise is my modern motherboard, not least because it's worse when scrolling windows. It's not terrible though and not really noticable at comfortable volume levels.