[libvirt] [PATCH] qemu: sound: Support intel 'hda' model

Daniel P. Berrange berrange at redhat.com
Mon Jan 10 18:06:50 UTC 2011


On Mon, Jan 10, 2011 at 12:58:09PM -0500, Cole Robinson wrote:
> On 01/10/2011 12:44 PM, Eric Blake wrote:
> > On 01/10/2011 10:19 AM, Cole Robinson wrote:
> >> In QEMU, the card itself is a PCI device, but it requires
> >> -device hda-output in order to actually get sound to the host. AIUI this
> >> is just HDA configuration and does not require stable addressing, so
> >> is not presently represented in the XML.
> >>
> >> Additionally, qemu supports audio input with '-device hda-duplex', however
> >> that provides guests access to the host's microphone, so probably isn't
> >> what we want by default.
> > 
> > Is there room for future XML expansion if we do decide to expose the
> > choice between -device hda-output vs. -device hda-duplex via the XML?
> > The patch looks fine as-is, but I'm a bit hesitant to ack until we've
> > thought about a potential upgrade path for the future, in case it
> > implies rearranging any of this patch.
> > 
> 
> I imagined some generic <sound> property like microphone="on|off" or
> input="on|off", or a <sound> child element. From an XML perspective I
> don't think it should conflict with this patch.
> 
> However I realize now that this patch is introducing inconsistent
> semantics WRT audio input, since it seems like es1370 and ac97 support a
> microphone (though I haven't tested it). So maybe this should use
> hda-duplex. Anyone have an opinion?

If we add extra 'mic=on|off' in the XML later, we need to be able to
pick the default for them. It is easier to pick the default if we
can pick the same default for all device types. So if all existing
devices are full duplex we should use that for HDA too, otherwise
apps would see a change in semantics when updating to newer libvirt.

Regards,
Daniel




More information about the libvir-list mailing list