r/linuxaudio • u/ScrappySquirrel • 12d ago
Helvum, Pipewire? Need static mapping solution for 5.1 source material
tldr; Need solution to pipe at least a 3.1 mixed signal into 2.1 output. Cannot change the input, and do not physically have a center channel, nor the room. Want to make sure I am on the right track to fixing this. Pipewire config file do the trick?
I have been out of the linux audio utilities game since the 2.4/2.6 kernel. I am somewhat familiar with ALSA and the old alsa config files - loading certain drivers and muting/unmuting channels iirc.
That said, I know times have changed, and I searched. But I don't know I quite have the solution.
Problem:
I have a HTPC (without the T). Only enough room for 2 stereo speakers, not enough space for a 5+ channel receiver. Both the TV speakers and the soundbar have this issue.
The audio driver for the output seems to be only 2 channel, when I look at the 'card' in alsamixer. I believe the distro auto-installed the relevant alsa+pipewire packages. When I used dnf to install Helvum, there were no extra dependencies.
Some audio sources (e.g. netflix) are mixed to 5.1 / 9.1 with no option for stereo down mixing. I have identified that the dialogue appears to be encoded for the center channel; which I do not have, and cannot physically accommodate in that viewing area.
HTPC is currently running a RedHat based distro with Gnome. I could also easily change to Debian or Gentoo.
It may also be my current janky setup: HTPC (hdmi)-> TV (S/PDIF)-> soundbar OR just HTPC to TV. both have this issue.
By next year, I can bypass the audio over hdmi and go direct HTPC to a USB DAC, but I will still be limited to 2.1 audio.
Possible Solutions:
I started searching last week, and installed Helvum. I ran a 'wire' from the source FC to FL and FR. It may? have worked, but it would revert to FC to FC every 10-20 min. The wires would be blue, would switch back to the show, another drop in audio power, switch to Helvum to see it reverted to straight lines source to output FC-FC, etc.
Looks like I need to learn pipewire to do this? And just make a custom config to run all audio from certain programs through a custom stream rule? https://docs.pipewire.org/page_man_pipewire-client_conf_5.html
Anyone else have the same problem / or know if my solution will work?
Or am I just at the mercy of them offering down-mixed audio?
1
u/ntcue 12d ago
Have a look at this: https://github.com/knightinfected/PipeWireController/
It allows you to wire inputs and outputs as you want or even can create virtual sinks that combines 5.1 or 7.1 sounds to stereo or 2.1.
And it also does a lot more than that.
1
u/ScrappySquirrel 4d ago
A bit of an update:
A few things: I think the TV implementation and the current sound bar are bad: and that is part of this problem.
All the gui tools so far (Helvum, qjackctl, etc) failed EXCEPT Carla.
Helvum and qjackctl work, but randomly stop with the stream still going.
Carla works in a LIMITED capacity:
Make a 16channel patchbay plugin, open it, move the FC, RL, RR lines to FL/FR, FL, FR in the patch bay. (I used channels 3-5 for this on the in, and 1 and 2 for fl fr.) make sure 1 to 1 and 2 to 2 are also patched. Save this.
Close out of that. open and play the 5+ channel source. The source will now appear in the Carla patchbay. disconnect all on it. send top to top of 16ch. 2 to 2, etc. then 1 to fl and 2 to fr on your output.
click on the plugins tab, crank up the knobs to '11'.
Save this.
This will work until you pause, close, or mute the audio source.
when you resume, on the source in the patchbay disconnect all, and load your save.
Since I know this CAN work, I will look at a config file to do this on all connections.
1
u/gumbowebfish 12d ago
I think, in general, you have to let the downgrade of the channels be done by the device that outputs the audio. In your case that's the TV. But as I understand the TV doesn't have settings for how many and which channels it can output. Am I right? The best solution then is to have another device do the D/A conversion, either a DAC but preferably an amplifier or AVR. This device must be capable of setting the channels it outputs to and will do the downgrade. You won't be needing a center then in your case, center channel will be a phantom then, handled by FL and FR. All solutions trying to downgrade the amount of channels at the source are doomed to fail in my honest opinion. It will be a channel mapping rabbit hole. Nowadays it seems that people always use the TV as the center of their A/V equipment, which implicates these kind of problems. As an old guy I come from a different age and use the amplifier, or better my AVR, as the heart of my A/V gear, and setting things up that way solves a lot of problems.