public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Aaron Lauterer <a.lauterer@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: Re: [pve-devel] Audio support, dummy/none
Date: Tue, 5 Jan 2021 12:43:17 +0100	[thread overview]
Message-ID: <819af18e-a533-013e-023a-6105de644eaa@proxmox.com> (raw)
In-Reply-To: <c0a12014-ba61-aaf4-2698-5fff80883793@gilouweb.com>



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
> 




  reply	other threads:[~2021-01-05 11:43 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-03  0:55 Gilles Pietri
2021-01-04 15:55 ` Aaron Lauterer
2021-01-04 16:22   ` Gilles Pietri
2021-01-04 17:55 ` Gilles Pietri
2021-01-05 11:43   ` Aaron Lauterer [this message]
2021-01-05 19:33     ` Gilles Pietri

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=819af18e-a533-013e-023a-6105de644eaa@proxmox.com \
    --to=a.lauterer@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal