[libvirt] [PATCH v3] qemu: sound: Support intel 'ich6' model
Eric Blake
eblake at redhat.com
Fri Jan 21 23:04:47 UTC 2011
On 01/21/2011 03:53 PM, Cole Robinson wrote:
> In QEMU, the card itself is a PCI device, but it requires a codec
> (either -device hda-output or -device hda-duplex) to actually output
> sound. Specifying <sound model='ich6'/> gives us -device intel-hda
> -device hda-duplex I think it's important that a simple <sound model='ich6'/>
> sets up a useful codec, to have consistent behavior with all other sound cards.
>
> diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
> index c20f031..627ec43 100644
> --- a/src/qemu/qemu_command.c
> +++ b/src/qemu/qemu_command.c
> @@ -1774,11 +1774,13 @@ qemuBuildSoundDevStr(virDomainSoundDefPtr sound)
> goto error;
> }
>
> - /* Hack for 2 wierdly unusal devices name in QEMU */
> + /* Hack for wierdly unusal devices name in QEMU */
Pre-existing double typo, but you might as well fix it while touching
this line:
s/wierdly unusal/weirdly unusual/
>
> +static char *
> +qemuBuildSoundCodecStr(virDomainSoundDefPtr sound,
> + const char *codec)
> +{
> + virBuffer buf = VIR_BUFFER_INITIALIZER;
> + int cad = 0;
> +
> + virBufferVSprintf(&buf, "%s", codec);
> + virBufferVSprintf(&buf, ",id=%s-codec%d", sound->info.alias, cad);
> + virBufferVSprintf(&buf, ",bus=%s.0", sound->info.alias);
> + virBufferVSprintf(&buf, ",cad=%d", cad);
It's slightly more efficient to use a single virBufferVSprintf with
multiple arguments, but I don't know if it would hurt read-ability. So
no problems if you keep it this way.
ACK with the spelling nit fixed.
--
Eric Blake eblake at redhat.com +1-801-349-2682
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20110121/e4138788/attachment-0001.sig>
More information about the libvir-list
mailing list