From nobody Fri Nov 14 13:38:17 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) client-ip=207.211.31.81; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 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=1593696582; cv=none; d=zohomail.com; s=zohoarc; b=DfG1rvO6o0KptxacyYHpKpdScNjVa1SVAstSb0bXn4iSmugdWy53KgGsoON/WgDwQOCGaaSofA3XeKlrirnPIokfYCotJZ9GXGYpB8UsODmyBGzeYgZXfLr2hXG2o/VOsEBTOdm0ah9nZPBha0a2X4iAtjv1/ay7W2z+ds620eM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1593696582; h=Content-Type:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To; bh=1XBFvhmM5shzLN1YMzs8HNjfJvha9Xy2lVgHhZwjUDk=; b=HJbRnEB9XHxnjOf3lgIYcfDyCCr5887DXr/MMtbG8iHGW+ftusOwU9WidhE1Ef7BrrEOqW7p52utkEf7smiE1mcE740UY7JtOSUfto2s0PXOpmaysJt5MtHHXXLhK1Qq3bjrCaD8vgY7f6viP6wc2Du5kCKT6PQYLLabvILfH4w= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) by mx.zohomail.com with SMTPS id 1593696582520483.4906628342179; Thu, 2 Jul 2020 06:29:42 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-285-42KTHu9HPo242XeuVp9WJg-1; Thu, 02 Jul 2020 09:29:39 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 003A1804004; Thu, 2 Jul 2020 13:29:34 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D380B2B4D0; Thu, 2 Jul 2020 13:29:33 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 06C1B6C9CE; Thu, 2 Jul 2020 13:29:32 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 062DPbSR029673 for ; Thu, 2 Jul 2020 09:25:37 -0400 Received: by smtp.corp.redhat.com (Postfix) id 4E3E017D75; Thu, 2 Jul 2020 13:25:37 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-112-62.ams2.redhat.com [10.36.112.62]) by smtp.corp.redhat.com (Postfix) with ESMTP id 045625DD61; Thu, 2 Jul 2020 13:25:37 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id BDE2331EE9; Thu, 2 Jul 2020 15:25:25 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1593696581; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:content-type:content-type: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=1XBFvhmM5shzLN1YMzs8HNjfJvha9Xy2lVgHhZwjUDk=; b=Pkq51scKIoo9j5taXCaFx/KjT2wrKBmh53IOkdk4TLk3LgpqnolsLbumg51sKM5+UWAk0Z W/iMuxuvxdxiLKJMhW/D8u4FmFWB8CGxh+RrVv1ALn3zU+fDPiE/lSbeusF4ZlYG/M+kKR wtMhV1YJqX9TdtPUL6jEu84Z+3HK4EM= X-MC-Unique: 42KTHu9HPo242XeuVp9WJg-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v5 16/20] audio: create pcspk device early Date: Thu, 2 Jul 2020 15:25:21 +0200 Message-Id: <20200702132525.6849-17-kraxel@redhat.com> In-Reply-To: <20200702132525.6849-1-kraxel@redhat.com> References: <20200702132525.6849-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Cc: Aleksandar Rikalo , Eduardo Habkost , "Michael S. Tsirkin" , libvir-list@redhat.com, Aleksandar Markovic , qemu-ppc@nongnu.org, Gerd Hoffmann , Marcel Apfelbaum , Paolo Bonzini , =?UTF-8?q?Herv=C3=A9=20Poussineau?= , Aurelien Jarno , Richard Henderson X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 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 X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Create the pcspk device early, so it exists at machine type initialization time. Signed-off-by: Gerd Hoffmann --- include/hw/i386/pc.h | 1 + hw/i386/pc.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index d7690bf4290f..a802e699749a 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -33,6 +33,7 @@ struct PCMachineState { PCIBus *bus; I2CBus *smbus; PFlashCFI01 *flash[2]; + ISADevice *pcspk; =20 /* Configuration options: */ uint64_t max_ram_below_4g; diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 4fc1b7048b28..88785f9dcc70 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -1219,7 +1219,7 @@ void pc_basic_device_init(struct PCMachineState *pcms, /* connect PIT to output control line of the HPET */ qdev_connect_gpio_out(hpet, 0, qdev_get_gpio_in(DEVICE(pit), 0= )); } - pcspk_init(isa_new(TYPE_PC_SPEAKER), isa_bus, pit); + pcspk_init(pcms->pcspk, isa_bus, pit); } =20 i8257_dma_init(isa_bus, 0); @@ -1891,6 +1891,7 @@ static void pc_machine_initfn(Object *obj) pcms->pit_enabled =3D true; =20 pc_system_flash_create(pcms); + pcms->pcspk =3D isa_new(TYPE_PC_SPEAKER); } =20 static void pc_machine_reset(MachineState *machine) --=20 2.18.4