Proper support for multi-channel audio interfaces
Created by: kamilner
This is a bit of a complex thing to deal with because there are different cases and different requirements depending on whether the environment is for "pro-audio" work or generic desktop support.
The issue stems from there being different types of multi-channel audio devices, including:
- "Home cinema" style interfaces, such as 5.1, where all the channels are related to each other in a specific way. Standard 2-channel stereo I/O devices are a subset of this.
- "Pro audio" interfaces where each channel is, nominally, separate and unrelated to others. For instance, channel 1 could be a guitar, channel 2 could be vocals. These are routed and handled separately, for instance, into a DAW.
- Specialist audio interfaces where channels are related, but may contain alternative content. Examples of this include modern BOSS/Roland audio devices which appear as 4 channel I/O devices, but is actually two stereo channels containing similar content which need to be separate managed/routed.
Jack is very good at handling the latter two scenarios as it makes no assumptions about the purpose or routing of the channels. In a pro-audio context, the user will normally wish to manually connect I/O channels to a (for instance) DAW input and output. Pulseaudio handles this situation dreadfully as it assumes any multi-channel system is a 5.1 system, and names the channels and configures the routing accordingly. This also restricts the routing as apps using Pulseaudio seem to connect to channels based on their naming, with no option to alter this.
More seriously, with multi-channel cards, Pulseaudio automatically processes stereo audio across 6 output channels as if it was a 5.1 system rather than allowing the signal to be output to two channels.
On the other hand, in many situations, where a user has a multi-channel home cinema audio card, they just want it to work with VLC, etc. without having to manually configure each channel. This is where Pulseaudio works better.
The issue is most obvious when trying to interwork PA and Jack on a multi-channel "pro-audio" card with the pulseaudio-jack bridge as, due to the inflexible and, effectively, "hard-coded" routing/processing within the Pulseaudio domain, not possible to direct the audio from Pulseaudio apps to/from the required channels on the audio device, especially if PA converts to a 5.1 mix. In this case the audio received by Jack from PA is pretty much corrupted anyway.
It's not a trivial issue to solve, but it would be nice if this could be addressed in Pipewire in some way.