Compare commits

...

2 Commits

Author SHA1 Message Date
antonios-f
9ecbd4c326 Merge branch 'spice-vnc-default-audio-backend' into 'master'
src/qemu/qemu_domain.c: Fix overriding audioBackend in qemuDomainDefSuggestDefaultAudioBackend

See merge request libvirt/libvirt!271
2024-03-28 21:27:21 +00:00
Anton Fadeev
971753af89 src/qemu/qemu_domain.c: Fix overriding audioBackend in qemuDomainDefSuggestDefaultAudioBackend
If we have Spice and VNC graphics in domain XML, and Spice graphics defined before VNC, audioBackend will be overrided in qemuDomainDefSuggestDefaultAudioBackend to VIR_DOMAIN_AUDIO_TYPE_NONE, and we will have no sound in Spice session, like this https://bugs.launchpad.net/qemu/+bug/1900352. If the flag addAudio already set, we do not need to override audioBackend. This commit fix the issue.
2023-06-29 08:52:21 +00:00

View File

@ -3951,7 +3951,9 @@ qemuDomainDefSuggestDefaultAudioBackend(virQEMUDriver *driver,
audioPassthrough = true;
} else {
audioPassthrough = false;
*audioBackend = VIR_DOMAIN_AUDIO_TYPE_NONE;
if (!*addAudio) {
*audioBackend = VIR_DOMAIN_AUDIO_TYPE_NONE;
}
}
*addAudio = true;
break;