[libvirt] [PATCH v2 3/4] qemu: Extend qemu_command with 'hda-output'
Erik Skultety
eskultet at redhat.com
Mon May 21 10:02:11 UTC 2018
On Sat, May 19, 2018 at 01:01:50PM +0200, Filip Alac wrote:
> Extend qemu_command with 'hda-output' codec support.
> Extend xml2argvtest for testing 'output' codec.
>
> Signed-off-by: Filip Alac <filipalac at gmail.com>
> ---
> src/qemu/qemu_command.c | 5 ++++-
> tests/qemuxml2argvdata/sound-device.args | 2 ++
> tests/qemuxml2argvdata/sound-device.xml | 2 ++
> tests/qemuxml2argvtest.c | 1 +
> 4 files changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
> index f3724a7..2ddf128 100644
> --- a/src/qemu/qemu_command.c
> +++ b/src/qemu/qemu_command.c
> @@ -139,7 +139,8 @@ VIR_ENUM_DECL(qemuSoundCodec)
>
> VIR_ENUM_IMPL(qemuSoundCodec, VIR_DOMAIN_SOUND_CODEC_TYPE_LAST,
> "hda-duplex",
> - "hda-micro");
> + "hda-micro",
> + "hda-output");
^This needs to be moved to patch 1, otherwise patch 1 doesn't compile.
Technically, you could leave the following test hunk in this patch, but I'd
just strip that too and create a separate patch solely to be consistent within
the series, since we need to move the test changes from patch 1 into a separate
patch after this one.
Erik
> diff --git a/tests/qemuxml2argvdata/sound-device.args b/tests/qemuxml2argvdata/sound-device.args
> index ee8313b..f97050a 100644
> --- a/tests/qemuxml2argvdata/sound-device.args
> +++ b/tests/qemuxml2argvdata/sound-device.args
> @@ -33,10 +33,12 @@ server,nowait \
> -device intel-hda,id=sound5,bus=pci.0,addr=0x6 \
> -device hda-micro,id=sound5-codec0,bus=sound5.0,cad=0 \
> -device hda-duplex,id=sound5-codec1,bus=sound5.0,cad=1 \
> +-device hda-output,id=sound5-codec2,bus=sound5.0,cad=2 \
> -device ich9-intel-hda,id=sound6,bus=pci.0,addr=0x7 \
> -device hda-duplex,id=sound6-codec0,bus=sound6.0,cad=0 \
> -device ich9-intel-hda,id=sound7,bus=pci.0,addr=0x8 \
> -device hda-micro,id=sound7-codec0,bus=sound7.0,cad=0 \
> -device hda-duplex,id=sound7-codec1,bus=sound7.0,cad=1 \
> +-device hda-output,id=sound7-codec2,bus=sound7.0,cad=2 \
> -device usb-audio,id=sound8,bus=usb.0,port=1 \
> -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x9
> diff --git a/tests/qemuxml2argvdata/sound-device.xml b/tests/qemuxml2argvdata/sound-device.xml
> index bceb9d1..c544e93 100644
> --- a/tests/qemuxml2argvdata/sound-device.xml
> +++ b/tests/qemuxml2argvdata/sound-device.xml
> @@ -32,11 +32,13 @@
> <sound model='ich6'>
> <codec type='micro'/>
> <codec type='duplex'/>
> + <codec type='output'/>
> </sound>
> <sound model='ich9'/>
> <sound model='ich9'>
> <codec type='micro'/>
> <codec type='duplex'/>
> + <codec type='output'/>
> </sound>
> <sound model='usb'/>
> <memballoon model='virtio'/>
> diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
> index 78454ac..e2eec96 100644
> --- a/tests/qemuxml2argvtest.c
> +++ b/tests/qemuxml2argvtest.c
> @@ -1515,6 +1515,7 @@ mymain(void)
> DO_TEST("sound", NONE);
> DO_TEST("sound-device",
> QEMU_CAPS_HDA_DUPLEX, QEMU_CAPS_HDA_MICRO,
> + QEMU_CAPS_HDA_OUTPUT,
> QEMU_CAPS_DEVICE_ICH9_INTEL_HDA,
> QEMU_CAPS_OBJECT_USB_AUDIO);
> DO_TEST("fs9p", NONE);
> --
> 2.17.0
>
> --
> libvir-list mailing list
> libvir-list at redhat.com
> https://www.redhat.com/mailman/listinfo/libvir-list
More information about the libvir-list
mailing list