Add documentation for 'output' codec.
Extend domain_conf with 'output' codec.
Extend xml2xmltest for testing 'output' codec.
Signed-off-by: Filip Alac <filipalac(a)gmail.com>
---
Sorry for not the best mail subject.
docs/formatdomain.html.in | 15 ++++++++++++---
docs/schemas/domaincommon.rng | 1 +
src/conf/domain_conf.c | 3 ++-
src/conf/domain_conf.h | 1 +
.../migration-in-params-in.xml | 1 +
.../migration-out-nbd-in.xml | 1 +
.../migration-out-nbd-out.xml | 1 +
.../migration-out-params-in.xml | 1 +
tests/qemustatusxml2xmldata/modern-in.xml | 1 +
tests/qemuxml2xmloutdata/sound-device.xml | 2 ++
10 files changed, 23 insertions(+), 4 deletions(-)
diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
index 0d0fd3b..665d0f2 100644
--- a/docs/formatdomain.html.in
+++ b/docs/formatdomain.html.in
@@ -7387,9 +7387,18 @@ qemu-kvm -net nic,model=? /dev/null
with <code>ich6</code> model can have optional
sub-elements <code><codec></code> to attach various
audio
codecs to the audio device. If not specified, a default codec
- will be attached to allow playback and recording. Valid values
- are 'duplex' (advertise a line-in and a line-out) and 'micro'
- (advertise a speaker and a microphone).
+ will be attached to allow playback and recording.
+ </p>
+ <p>
+ Valid values are:
+ </p>
+ <p>
+ <ul>
+ <li>'duplex' - advertise a line-in and a line-out </li>
+ <li>'micro' - advertise a speaker and a microphone </li>
+ <li>'output' - advertise a line-out
+ <span class="since">Since 4.4.0</span></li>
+ </ul>
</p>
<pre>
diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng
index 71ac3d0..f16e157 100644
--- a/docs/schemas/domaincommon.rng
+++ b/docs/schemas/domaincommon.rng
@@ -3824,6 +3824,7 @@
<choice>
<value>duplex</value>
<value>micro</value>
+ <value>output</value>
</choice>
</attribute>
</element>
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 3689ac0..f12c87d 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -529,7 +529,8 @@ VIR_ENUM_IMPL(virDomainSmartcard, VIR_DOMAIN_SMARTCARD_TYPE_LAST,
VIR_ENUM_IMPL(virDomainSoundCodec, VIR_DOMAIN_SOUND_CODEC_TYPE_LAST,
"duplex",
- "micro")
+ "micro",
+ "output")
VIR_ENUM_IMPL(virDomainSoundModel, VIR_DOMAIN_SOUND_MODEL_LAST,
"sb16",
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
index a78fdee..ee3285a 100644
--- a/src/conf/domain_conf.h
+++ b/src/conf/domain_conf.h
@@ -1335,6 +1335,7 @@ struct _virDomainInputDef {
typedef enum {
VIR_DOMAIN_SOUND_CODEC_TYPE_DUPLEX,
VIR_DOMAIN_SOUND_CODEC_TYPE_MICRO,
+ VIR_DOMAIN_SOUND_CODEC_TYPE_OUTPUT,
VIR_DOMAIN_SOUND_CODEC_TYPE_LAST
} virDomainSoundCodecType;
diff --git a/tests/qemustatusxml2xmldata/migration-in-params-in.xml
b/tests/qemustatusxml2xmldata/migration-in-params-in.xml
index b0caa34..03f18b4 100644
--- a/tests/qemustatusxml2xmldata/migration-in-params-in.xml
+++ b/tests/qemustatusxml2xmldata/migration-in-params-in.xml
@@ -236,6 +236,7 @@
<flag name='iscsi.password-secret'/>
<flag name='isa-serial'/>
<flag name='dump-completed'/>
+ <flag name='hda-output'/>
</qemuCaps>
<job type='none' async='migration in' phase='prepare'
flags='0x900'>
<migParams>
diff --git a/tests/qemustatusxml2xmldata/migration-out-nbd-in.xml
b/tests/qemustatusxml2xmldata/migration-out-nbd-in.xml
index 6d87c1e..636accf 100644
--- a/tests/qemustatusxml2xmldata/migration-out-nbd-in.xml
+++ b/tests/qemustatusxml2xmldata/migration-out-nbd-in.xml
@@ -229,6 +229,7 @@
<flag name='iscsi.password-secret'/>
<flag name='isa-serial'/>
<flag name='dump-completed'/>
+ <flag name='hda-output'/>
</qemuCaps>
<job type='none' async='migration out' phase='perform3'>
<disk dev='vdb' migrating='yes'/>
diff --git a/tests/qemustatusxml2xmldata/migration-out-nbd-out.xml
b/tests/qemustatusxml2xmldata/migration-out-nbd-out.xml
index 05da1f8..315d8e4 100644
--- a/tests/qemustatusxml2xmldata/migration-out-nbd-out.xml
+++ b/tests/qemustatusxml2xmldata/migration-out-nbd-out.xml
@@ -229,6 +229,7 @@
<flag name='iscsi.password-secret'/>
<flag name='isa-serial'/>
<flag name='dump-completed'/>
+ <flag name='hda-output'/>
</qemuCaps>
<job type='none' async='migration out' phase='perform3'
flags='0x0'>
<disk dev='vdb' migrating='yes'/>
diff --git a/tests/qemustatusxml2xmldata/migration-out-params-in.xml
b/tests/qemustatusxml2xmldata/migration-out-params-in.xml
index 1764979..ae20648 100644
--- a/tests/qemustatusxml2xmldata/migration-out-params-in.xml
+++ b/tests/qemustatusxml2xmldata/migration-out-params-in.xml
@@ -236,6 +236,7 @@
<flag name='iscsi.password-secret'/>
<flag name='isa-serial'/>
<flag name='dump-completed'/>
+ <flag name='hda-output'/>
</qemuCaps>
<job type='none' async='migration out' phase='perform3'
flags='0x802'>
<disk dev='vda' migrating='no'/>
diff --git a/tests/qemustatusxml2xmldata/modern-in.xml
b/tests/qemustatusxml2xmldata/modern-in.xml
index d63fcf7..5b7e2a3 100644
--- a/tests/qemustatusxml2xmldata/modern-in.xml
+++ b/tests/qemustatusxml2xmldata/modern-in.xml
@@ -232,6 +232,7 @@
<flag name='iscsi.password-secret'/>
<flag name='isa-serial'/>
<flag name='dump-completed'/>
+ <flag name='hda-output'/>
</qemuCaps>
<devices>
<device alias='rng0'/>
diff --git a/tests/qemuxml2xmloutdata/sound-device.xml
b/tests/qemuxml2xmloutdata/sound-device.xml
index 62336a8..cbf4d17 100644
--- a/tests/qemuxml2xmloutdata/sound-device.xml
+++ b/tests/qemuxml2xmloutdata/sound-device.xml
@@ -43,6 +43,7 @@
<sound model='ich6'>
<codec type='micro'/>
<codec type='duplex'/>
+ <codec type='output'/>
<address type='pci' domain='0x0000' bus='0x00'
slot='0x06' function='0x0'/>
</sound>
<sound model='ich9'>
@@ -51,6 +52,7 @@
<sound model='ich9'>
<codec type='micro'/>
<codec type='duplex'/>
+ <codec type='output'/>
<address type='pci' domain='0x0000' bus='0x00'
slot='0x08' function='0x0'/>
</sound>
<sound model='usb'/>
--
2.17.0