On 7/15/22 13:44, Peter Krempa wrote: > We now only support qemu versions which already have the capability so > we can remove this now unused code. > > Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx> > --- > src/qemu/qemu_validate.c | 86 ---------------------------------------- > 1 file changed, 86 deletions(-) > > diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c > index 764d5b029e..4016b1b6f0 100644 > --- a/src/qemu/qemu_validate.c > +++ b/src/qemu/qemu_validate.c > @@ -1344,13 +1344,6 @@ qemuValidateDomainDef(const virDomainDef *def, > } > } > > - if (def->naudios > 1 && > - !virQEMUCapsGet(qemuCaps, QEMU_CAPS_AUDIODEV)) { > - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", > - _("only one audio backend is supported with this QEMU binary")); > - return -1; > - } > - > return 0; > } > > @@ -4530,25 +4523,6 @@ qemuValidateDomainDeviceDefAudio(virDomainAudioDef *audio, > const virDomainDef *def, > virQEMUCaps *qemuCaps G_GNUC_UNUSED) > { > - if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_AUDIODEV)) { > - if (audio->input.mixingEngine == VIR_TRISTATE_BOOL_NO || > - audio->output.mixingEngine == VIR_TRISTATE_BOOL_NO) { > - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", > - _("disabling audio mixing engine is not supported with this QEMU")); > - return -1; > - } > - > - if ((audio->input.bufferLength || > - audio->output.bufferLength) && > - (audio->type != VIR_DOMAIN_AUDIO_TYPE_PULSEAUDIO && > - audio->type != VIR_DOMAIN_AUDIO_TYPE_COREAUDIO && > - audio->type != VIR_DOMAIN_AUDIO_TYPE_SDL)) { > - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", > - _("setting audio buffer length is not supported with this QEMU")); > - return -1; > - } > - } > - > switch (audio->type) { > case VIR_DOMAIN_AUDIO_TYPE_NONE: > break; > @@ -4557,78 +4531,18 @@ qemuValidateDomainDeviceDefAudio(virDomainAudioDef *audio, > break; > > case VIR_DOMAIN_AUDIO_TYPE_COREAUDIO: > - if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_AUDIODEV)) { > - if (audio->input.bufferLength) { > - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", > - _("setting audio buffer length is not supported with this QEMU")); > - return -1; > - } > - if (audio->backend.coreaudio.input.bufferCount) { > - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", > - _("setting audio buffer count is not supported with this QEMU")); > - return -1; > - } > - } > break; > > case VIR_DOMAIN_AUDIO_TYPE_JACK: > - if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_AUDIODEV)) { > - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", > - _("'jack' audio backend is not supported with this QEMU")); > - return -1; > - } > break; These 'break' statements, well 'case' can be joined into a single one: case X: case Y: case Z: break; Michal