[libvirt] [PATCH 3/6] qemu: explicitly disable audio if there is no sound device

Daniel P. Berrange berrange at redhat.com
Tue Nov 21 11:48:20 UTC 2017


On Tue, Nov 21, 2017 at 12:44:44PM +0100, Peter Krempa wrote:
> On Tue, Nov 21, 2017 at 11:24:06 +0000, Daniel Berrange wrote:
> > On Tue, Nov 14, 2017 at 02:45:08PM +0100, Pavel Hrdina wrote:
> > > If there is no sound device configured for the guest we can disable the
> > > audio output because hot-plugging sound devices isn't supported.
> > 
> > Are you sure about that. While libvirt may not have wired up ability to
> > hotplug sound devices, I'm pretty sure that QEMU is able to hotplug
> > them.
> 
> At least the USB sound card should allow hotplug in qemu, so I agree
> with this...
> 
> On the other hand the output should be a property which can be
> configured individually for every sound card. I think it's desirable to
> have a soundcard dedicated to one output method and a second one for a
> different output method and let the guest OS decide on which cards the
> sound will play.
> 
> > Ff libvirt forceably disables the audio backend, now, and then future
> > libvirt enables the pre-existing QEMU support for hotplug, existing VMs
> > will be doomed.
> > 
> > IOW, I don't think this patch is desirable.
> 
> We could allow hotplug only if qemu will allow to specify the sound
> output per-soundcard which would avoid this problem.

I agree that having ability to configure distinct outputs per sound card
might be useful, I don't think it is a blocking feature for hotplugging
sound cards. ie, there's no reason why a user should not be able to
unplug their current sound card, and plug in a new sound card for a
running guests - they would only ever have 1 sound card present at
a time in that scenario, so distinct outputs is not a requirement
for that usecase.

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|




More information about the libvir-list mailing list