mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 13:45:38 +00:00
conf: add support for timer period audio setting
Reviewed-by: Michal Privoznik <mprivozn@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
002f0ff4f3
commit
dfffcefff6
@ -6924,6 +6924,10 @@ to the guest sound device.
|
||||
``id``
|
||||
Integer id of the audio device. Must be greater than 0.
|
||||
|
||||
``timerPeriod``
|
||||
Timer period in microseconds. Must be greater than 0. If omitted,
|
||||
the lowest possible period is used.
|
||||
|
||||
All the backends support child element for configuring input and
|
||||
output properties
|
||||
|
||||
@ -6931,7 +6935,7 @@ output properties
|
||||
|
||||
...
|
||||
<devices>
|
||||
<audio id='1' type='pulseaudio'>
|
||||
<audio id='1' type='pulseaudio' timerPeriod='40'>
|
||||
<input mixingEngine='yes' fixedSettings='yes' voices='1' bufferLength='100'>
|
||||
<settings frequency='44100' channels='2' format='s16'/>
|
||||
</input>
|
||||
|
@ -4774,6 +4774,11 @@
|
||||
<attribute name="id">
|
||||
<ref name="uint8"/>
|
||||
</attribute>
|
||||
<optional>
|
||||
<attribute name="timerPeriod">
|
||||
<ref name="uint32"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
<choice>
|
||||
<group>
|
||||
<attribute name="type">
|
||||
|
@ -13193,6 +13193,10 @@ virDomainAudioDefParseXML(virDomainXMLOption *xmlopt G_GNUC_UNUSED,
|
||||
&def->id) < 0)
|
||||
goto error;
|
||||
|
||||
if (virXMLPropUInt(node, "timerPeriod", 10, VIR_XML_PROP_NONZERO,
|
||||
&def->timerPeriod) < 0)
|
||||
goto error;
|
||||
|
||||
inputNode = virXPathNode("./input", ctxt);
|
||||
outputNode = virXPathNode("./output", ctxt);
|
||||
|
||||
@ -25461,6 +25465,9 @@ virDomainAudioDefFormat(virBuffer *buf,
|
||||
|
||||
virBufferAsprintf(buf, "<audio id='%d' type='%s'", def->id, type);
|
||||
|
||||
if (def->timerPeriod)
|
||||
virBufferAsprintf(buf, " timerPeriod='%u'", def->timerPeriod);
|
||||
|
||||
switch (def->type) {
|
||||
case VIR_DOMAIN_AUDIO_TYPE_NONE:
|
||||
break;
|
||||
|
@ -1559,6 +1559,8 @@ struct _virDomainAudioDef {
|
||||
|
||||
unsigned int id;
|
||||
|
||||
unsigned int timerPeriod;
|
||||
|
||||
virDomainAudioIOCommon input;
|
||||
virDomainAudioIOCommon output;
|
||||
union {
|
||||
|
Loading…
Reference in New Issue
Block a user