sound from Windows HVM

259 views
Skip to first unread message

Eric Shelton

unread,
Nov 19, 2016, 9:27:06 AM11/19/16
to qubes-devel
Although I do not have a current working solution (the main workaround I have heard discussed is passing through a USB controller and using a USB audio device), there are a few development possibilities I wanted to note:

(1) Windows PV audio drivers from OpenXT (https://github.com/OpenXT/xc-windows/tree/master/xenaud).  This might provide most of the framework needed to implement a Qubes-compatible PV audio driver.
(2) Linux stubdom + QEMU emulated audio device.  This might be a convenient way to get audio working in all HVMs (Windows, Linux, etc), since QEMU provides a number of options for emulated devices (ES1370, AC97, Intel HDA, and others).
(3) Xen upstream PV audio support.  There have been several attempts and renewed attempts at implementing a "sndif" in mainline Xen (once a candidate feature for Xen 4.6: https://lists.xenproject.org/archives/html/xen-devel/2015-05/msg00129.html, recent xen-devel discussion: https://lists.xenproject.org/archives/html/xen-devel/2015-05/msg00129.html).

I am guessing (2) is the most likely path, although I would be interested in Rafał's take on (1).

Eric

Marek Marczykowski-Górecki

unread,
Nov 19, 2016, 12:48:14 PM11/19/16
to Eric Shelton, qubes-devel
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
I'd also go with (2). As for (1) it is also interesting, but I guess
Rafał will not manage to get around this anytime soon.

- --
Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAEBCAAGBQJYMJBYAAoJENuP0xzK19csTjYH/j8KsWE0SrUtsla3D+tj6M8Z
EaAyGaQwNjEZFPrzPRx9Fk36eDE+qVwfSViuCWvuoBqoOFd6+ag2oycJ9Sj0HxNi
iC2VIC9fOYtUQGF7zVhjQZYvXrpM12ujrfXo3MrLXkfZJOSuunwQQ3399g1du/uw
PSAU5b6J9HEkupmOHQg43b71Tj1eCKuTGGCy/Rbn8IvtTXjdyDJQyGkqcumai+UG
tZeRmpwjRR5JuBTxIVwa2rQO5qG+RZNX5yz+c+fqgNZkdVcE2amXmZCH2cQA8rTq
noNIIOuiywOKGrcOtBVTvjrZ3qqVYHAYyLTwy9sB5U9Ov72FAWzjFfl7Kt95pvM=
=pn/4
-----END PGP SIGNATURE-----

Radoslaw Szkodzinski

unread,
Nov 21, 2016, 2:34:48 AM11/21/16
to Qubes...@googlegroups.com

On 19 Nov 2016 18:48, "Marek Marczykowski-Górecki" <marm...@invisiblethingslab.com> wrote:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
> On Sat, Nov 19, 2016 at 06:27:05AM -0800, Eric Shelton wrote:
> > Although I do not have a current working solution (the main workaround I
> > have heard discussed is passing through a USB controller and using a USB
> > audio device), there are a few development possibilities I wanted to note:
> >
> > (1) Windows PV audio drivers from OpenXT
> > (https://github.com/OpenXT/xc-windows/tree/master/xenaud).  This might
> > provide most of the framework needed to implement a Qubes-compatible PV
> >

> > (2) Linux stubdom + QEMU emulated audio device.  This might be a convenient
> > way to get audio working in all HVMs (Windows, Linux, etc), since QEMU
> > provides a number of options for emulated devices (ES1370, AC97, Intel HDA,
> > and others).

These drivers are a tiny bit iffy, as only PulseAudio and ich9 seem to work well in Windows.

It requires extra environment variables to be passed to qemu, such as more often audio interrupt and smaller buffer for low latency. I also had problems setting it to output 32-bit depth in Windows.

That said, given real-time configured PulseAudio server (in a real-time configured sound vm) it can deliver latencies low enough for recording monitoring on KVM (increase scheduler granularity) and on Xen with rtds scheduler. Getting stubdom to set up correctly required some scripting.

Make sure to enable threadirqs in the host and that VM. (kernel boot option)

You can have more than one device and each shows up as a separate stream. Surround sound is supported.

> > (3) Xen upstream PV audio support.  There have been several attempts and
> > renewed attempts at implementing a "sndif" in mainline Xen (once a
> > candidate feature for Xen
> > 4.6: https://lists.xenproject.org/archives/html/xen-devel/2015-05/msg00129.html,
> > recent xen-devel
> > discussion: https://lists.xenproject.org/archives/html/xen-devel/2015-05/msg00129.html).

Sorta works but is Xen only.

R.

Reply all
Reply to author
Forward
0 new messages