I could be wrong but I could have sworn I saw qubes supporting surround sound when the computer is connected to an AVR on my old setups. Is this right, because on 4.2 and 4.3rc2 with a couple newer Z890 boards I only see HDA Intel PCH Digital Stereo (HDMI)?
Unfortunately the answer is no. Not only Qubes OS never supported over 2 channels, but also the sample rate of those two channels is limited to 44.1KHz (not even 48KHz). And 16 bit bit-rate. If you need/want better quality audio in specific qube, your best bet would be hardware pass-through (e.g. a dedicated external USB sound card or DAC) to the target qube and attaching speakers to it.
Honestly talking, full understanding and deep study of the workflow has been on my personal todo list. Code is available in qubes-gui-daemon, qubes-gui-agent-linux and qubes-gui-agent-windows repositories. I believe it is done at Pipewire level at this moment. But I am not certain.
I see, thanks for response.
Somewhere there we had a regression (in R4.2) that added crackling noises to all Windows 10 qubes for me. The output physical device does not matter in my case: analog, S/PDF, external card - all have the same sound issue.
If I install virtual sound card in Windows 10 qube, connect it to fedora qube via networking, and stream all sound from Windows 10 qube to fedora and play there on fly - it works without crackling. But I failed to make such setup without lags and huge delays to make a work-around for the issue.
I have been looking at some Qubes audio code recently. And while I am at it, maybe we could look at this together. It might be fun.
Here is how the sample rate is decided in daemon side (dom0 or sys-audio):
Here is how the equivalent sample rate is set in Linux based qubes (with current Pipewire workflow):
There is also a legacy Pulse module in the same repo. But I guess it would be better ignored.
And for Windows, I believe there is none. For Windows I believe an intermediate stubdomain is used to emulate Intel ich6 interface which Windows does not require a driver for.
Yes, we should expect frequency to be hardcoded as 44.1kHz (as mentioned on github by @DemiMarie).
In Windows the user can select the “output” frequency in a wide range of values. But in case of Qubes OS they are working all the same, as it seems. I have the same windows qube restored from backup, so no drivers running inside this qube were changed.
So, the question that I think can be helpful: what exactly had changed in R4.2 compared to R4.1 with frequencies of audio-stack in dom0. I know that it was migrated from pulseaudio to pipewire, but what can be the source of this regression.