[PATCH v2 3/4] qemu: Extend qemu_command with 'hda-output'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Extend qemu_command with 'hda-output' codec support.
Extend xml2argvtest for testing 'output' codec.

Signed-off-by: Filip Alac <filipalac@xxxxxxxxx>
---
 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");
 
 VIR_ENUM_DECL(qemuControllerModelUSB)
 
@@ -4142,6 +4143,8 @@ qemuSoundCodecTypeToCaps(int type)
         return QEMU_CAPS_HDA_DUPLEX;
     case VIR_DOMAIN_SOUND_CODEC_TYPE_MICRO:
         return QEMU_CAPS_HDA_MICRO;
+    case VIR_DOMAIN_SOUND_CODEC_TYPE_OUTPUT:
+        return QEMU_CAPS_HDA_OUTPUT;
     default:
         return -1;
     }
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@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux