From nobody Mon Feb 9 13:38:10 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1657885499; cv=none; d=zohomail.com; s=zohoarc; b=UEht1M6rITxV2lrkMtXHzILFq3AI4geVVBaVpSmin3ulZZLwWFK3KA6+W5xW/wCQTbn7agH6QP1RwelFjuSMB3drj45kwCEV6jya0IQZbMx3hvJCPeAbtxIjbHTrL536osMz29MbEVaZtMsY/JqBJNSmlEvlE4dJj3hUUxkQQOc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1657885499; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=aXx5oObPVkteSPvXUOF3DeABYUFjSCn3A+/k66h17yc=; b=MBppqvKykwFab2cn98R1sR9MT7SlhjSzKA6S5jF7zZ9QeF+TI+6Voe/q5MMR/TpzDFawrgUdJCEIMk/BR66L/ulTHb72VeK1XoeZ+BzWNhrAaY/0Il4ZGsrGFurlVr41KfyRU9tHrS84kCwOwg4tBOmJXtYzJdNu0jdCs87iDlo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1657885499424143.05119136865915; Fri, 15 Jul 2022 04:44:59 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-316-Jobf6VY_OUe4uuebOGAQHA-1; Fri, 15 Jul 2022 07:44:48 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 4DADF103538E; Fri, 15 Jul 2022 11:44:46 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3763240CFD0A; Fri, 15 Jul 2022 11:44:46 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id DE4D51947051; Fri, 15 Jul 2022 11:44:45 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 967791947B87 for ; Fri, 15 Jul 2022 11:44:44 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 8B086403162; Fri, 15 Jul 2022 11:44:44 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.32]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1064140315D for ; Fri, 15 Jul 2022 11:44:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1657885497; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=aXx5oObPVkteSPvXUOF3DeABYUFjSCn3A+/k66h17yc=; b=dyx/gOxlyxYw9+jUGg/eQ4uDZQ1ZQcvQ5mkdQw1fMT+w4DKe3rxvsgtBip+GxBwdG7v31G pahiUriTy8iPGON7vuWpvXlOAx4Y2RxixsLTkxq3dSd1WK8uuQV2DKxUVCfdGY/gQkQiQ7 Va8wPUnD2+yaXIlJJGdia9kF4lkmHDE= X-MC-Unique: Jobf6VY_OUe4uuebOGAQHA-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 18/20] qemu: validate: Remove unreachable checks for QEMU_CAPS_AUDIODEV Date: Fri, 15 Jul 2022 13:44:23 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.85 on 10.11.54.10 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 2.84 on 10.11.54.1 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1657885499998100003 Content-Type: text/plain; charset="utf-8" We now only support qemu versions which already have the capability so we can remove this now unused code. Signed-off-by: Peter Krempa --- 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 QE= MU 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 =3D=3D VIR_TRISTATE_BOOL_NO || - audio->output.mixingEngine =3D=3D VIR_TRISTATE_BOOL_NO) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", - _("disabling audio mixing engine is not support= ed with this QEMU")); - return -1; - } - - if ((audio->input.bufferLength || - audio->output.bufferLength) && - (audio->type !=3D VIR_DOMAIN_AUDIO_TYPE_PULSEAUDIO && - audio->type !=3D VIR_DOMAIN_AUDIO_TYPE_COREAUDIO && - audio->type !=3D 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 suppo= rted with this QEMU")); - return -1; - } - if (audio->backend.coreaudio.input.bufferCount) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", - _("setting audio buffer count is not suppor= ted 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 t= his QEMU")); - return -1; - } break; case VIR_DOMAIN_AUDIO_TYPE_OSS: - if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_AUDIODEV)) { - if (audio->backend.oss.input.bufferCount !=3D - audio->backend.oss.output.bufferCount) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", - _("setting audio buffer count is not suppor= ted with this QEMU")); - return -1; - } - } break; case VIR_DOMAIN_AUDIO_TYPE_PULSEAUDIO: - if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_AUDIODEV)) { - if (audio->backend.pulseaudio.input.streamName || - audio->backend.pulseaudio.output.streamName) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", - _("setting audio stream name is not support= ed with this QEMU")); - return -1; - } - - if (audio->backend.pulseaudio.input.latency || - audio->backend.pulseaudio.output.latency) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", - _("setting audio latency is not supported w= ith this QEMU")); - return -1; - } - - if (audio->input.bufferLength !=3D audio->output.bufferLength)= { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", - _("setting audio buffer length is not suppo= rted with this QEMU")); - return -1; - } - } break; case VIR_DOMAIN_AUDIO_TYPE_SDL: - if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_AUDIODEV)) { - if (audio->input.bufferLength) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", - _("setting audio buffer length is not suppo= rted with this QEMU")); - return -1; - } - - if (audio->backend.sdl.input.bufferCount || - audio->backend.sdl.output.bufferCount) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", - _("setting audio buffer count is not suppor= ted with this QEMU")); - return -1; - } - } break; case VIR_DOMAIN_AUDIO_TYPE_SPICE: --=20 2.36.1