[pve-devel] Audio support, dummy/none
Gilles Pietri
contact+dev at gilouweb.com
Mon Jan 4 18:55:29 CET 2021
Le 03/01/2021 à 01:55, Gilles Pietri a écrit :
> Hi!
>
> Happy new year to everyone, especially the devs working on Proxmox, it's
> still awesome in 2021 ;)
>
> I'm interested in replicating a qemu audio setup that uses the dummy
> driver (called "none") on Proxmox, but the enum $audio_fmt
> (PVE/QemuServer.pm) for drivers only contains spice as a choice, which
> is all nice, but a bit restrictive!
>
> Since this is used only (?) to generate the audio conf (through
> conf_has_audio), which generate the audio devices through audio_devs,
> which in turn generates both the -device param and the -audiodev
> backend,id=xxx, it seems there wouldn't be any side effect if we fed
> "none" instead of spice, as the id param is valid and works the same here.
>
> I haven't tried patching that, but it might be that this would boil down to:
>
> diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
> index bca5669..54278e5 100644
> --- a/PVE/QemuServer.pm
> +++ b/PVE/QemuServer.pm
> @@ -211,7 +211,7 @@ my $audio_fmt = {
> },
> driver => {
> type => 'string',
> - enum => ['spice'],
> + enum => ['spice', 'none'],
> default => 'spice',
> optional => 1,
> description => "Driver backend for the audio device."
>
I tried it, it went on generating the kvm command line with none instead
of spice as:
-device 'ich9-intel-hda,id=audiodev0,bus=pci.2,addr=0xc' -device
'hda-micro,id=audiodev0-codec0,bus=audiodev0.0,cad=0,audiodev=none-backend0'
-device
'hda-duplex,id=audiodev0-codec1,bus=audiodev0.0,cad=1,audiodev=none-backend0'
-audiodev 'none,id=none-backend0'
instead of the original:
-device 'ich9-intel-hda,id=audiodev0,bus=pci.2,addr=0xc' -device
'hda-micro,id=audiodev0-codec0,bus=audiodev0.0,cad=0,audiodev=spice-backend0'
-device
'hda-duplex,id=audiodev0-codec1,bus=audiodev0.0,cad=1,audiodev=spice-backend0'
-audiodev 'spice,id=spice-backend0'
And this works flawlessly…
However, I guess I need to deploy the full version to have the webui
integrating it, but I can follow up on that…
Regards,
Gilles
More information about the pve-devel
mailing list