From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id E4DD566180 for ; Tue, 5 Jan 2021 12:43:19 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id DB6FC27B64 for ; Tue, 5 Jan 2021 12:43:19 +0100 (CET) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [212.186.127.180]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS id 0B79B27B31 for ; Tue, 5 Jan 2021 12:43:19 +0100 (CET) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id CD44E456FE for ; Tue, 5 Jan 2021 12:43:18 +0100 (CET) To: pve-devel@lists.proxmox.com References: <309fe8ad-2589-5699-be3d-4f5a1ac0cbea@gilouweb.com> From: Aaron Lauterer Message-ID: <819af18e-a533-013e-023a-6105de644eaa@proxmox.com> Date: Tue, 5 Jan 2021 12:43:17 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL -0.021 Adjusted score from AWL reputation of From: address KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment NICE_REPLY_A -0.001 Looks like a legit reply (A) RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [proxmox.com, qemuserver.pm] Subject: Re: [pve-devel] Audio support, dummy/none X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Jan 2021 11:43:20 -0000 On 1/4/21 6:55 PM, Gilles Pietri wrote: > 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… Adding support for the 'none' backend should not be too hard to implement. Besides changes in QemuServer.pm, the GUI (pve-manager) needs to be adapted as well because right now the backend is hard coded. Adding support for ALSA and / or pulseaudio is probably a bit more complicated to get it working "out of the box" and AFAICT our qemu build currently does not support the PA backend. If you want to take the challenge to implement the support for the none backend yourself, you are welcome to do so! Have a look at our Dev documentation [0]. We would also need a signed CLA[1] send to office@proxmox.com Alternatively you can create an enhancement request in our bugtracker so we can keep track of it. [0] https://pve.proxmox.com/wiki/Developer_Documentation [1] file:///tmp/mozilla_alauterer0/Proxmox-Individual-CLA.pdf [2] https://bugzilla.proxmox.com/ > > Regards, > Gilles > > _______________________________________________ > pve-devel mailing list > pve-devel@lists.proxmox.com > https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel >