[PATCH 2/4] conf: allow to map sound device to host device
Daniel P. Berrangé
berrange at redhat.com
Wed Jul 22 14:42:53 UTC 2020
On Wed, Jul 22, 2020 at 08:55:02AM +0200, Gerd Hoffmann wrote:
> Hi,
>
> > IIUC, QEMU can expose multiple sound devices to the guest too.
> >
> > I think this means that we can have a M:N relationship between
> > a sound device, and an audio backend, not just 1:1.
>
> It's 1:N. Sound devices have a single backend, but a backends can
> service multiple sound devices.
Sigh yes, of course, wasn't thinking right.
> > Assuming I'm right about the M:N relationship, I assume that
> > of multiple cards all do playback concurrently, something
> > will have todo mixing of the streams ?
>
> In general it is a good idea to go with 1:1 if possible. With
> pulseaudio this works fine. You'll have two streams to pulseaudio
> then, pulseaudio does the mixing, and you'll see both streams in
> mixer apps.
>
> OSS devices tend to not like being opened multiple times, so you
> have to go with 1:N if you want multiple sound devices. qemu mixes
> the playback streams then. Not fully sure what happens with
> recording, probably all sound devices see the very same stream.
Ok, so it sounds like we need the XML schema I illustrated. Even though
we'll recommend 1:1 for general use, we'll want the option to supoort
1:N setups.
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