From nobody Mon Feb 9 23:17:54 2026 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=1592998263; cv=none; d=zohomail.com; s=zohoarc; b=BdUFRfT6UnIaZnz98e2g/agx03UJPoTIhu4BAxNDiy4CPNgUE5fGM/KKXu4waLFcywGChjd5VFxv8YlZZLtqUsDM4j+BMzMY4+kw4m/0AUcgsBGXZuJey07/0cqTEL5HQbUbtdAt9eZXJXvzlgpBBDPzwNnslI5P6efHmjEbJXY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1592998263; 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=kIQJ9CeCtEXcjwf/+kopOsW4htznwXBp1TsGYYUobMk=; b=LEomEICZTDxG9EixM1Qa4Gnhq3sNZMzgy0DS9myWpwrYKxm9MfoOZiDakb2nJfkxcKWfXUP9kAB19COVz0PeazM7arD53pLU+E38DWYX1DVQgMMPaZrm/kAm0XHJot0laPC/O3cZKG4vS7IdrZR2fCG49ZrnVRywcJUNVonuEn4= 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 1592998263947114.29419468453386; Wed, 24 Jun 2020 04:31:03 -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-355-3tawXdDRMMa7cskPN1Su2A-1; Wed, 24 Jun 2020 07:31:00 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id BAC41805EF6; Wed, 24 Jun 2020 11:30:53 +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 9891D1C8; Wed, 24 Jun 2020 11:30:53 +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 6C3FD876A1; Wed, 24 Jun 2020 11:30:53 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 05OBUcUj028443 for ; Wed, 24 Jun 2020 07:30:38 -0400 Received: by smtp.corp.redhat.com (Postfix) id 859997F49D; Wed, 24 Jun 2020 11:30:38 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-112-67.ams2.redhat.com [10.36.112.67]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3C4A05BAEF; Wed, 24 Jun 2020 11:30:38 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 4C45431E58; Wed, 24 Jun 2020 13:30:27 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1592998262; 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=kIQJ9CeCtEXcjwf/+kopOsW4htznwXBp1TsGYYUobMk=; b=dI/3BWspNHCxf8l+kVz025gQH7xUq9RXKtTrXo2FtGFcvTPRI9KP5pYCCuB7mpzQePw/sM ZdgmpnZmepYEg6n4wH7FTTlsFw2SQiIMLaleNyVgDqTvRKTTyshJ8UV73tCehOdzaXLkmW YW6ENRTJ5E/X5kG99Mm6WR5Pn1teuUA= X-MC-Unique: 3tawXdDRMMa7cskPN1Su2A-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v4 16/20] audio: create pcspk device early Date: Wed, 24 Jun 2020 13:30:22 +0200 Message-Id: <20200624113026.13343-17-kraxel@redhat.com> In-Reply-To: <20200624113026.13343-1-kraxel@redhat.com> References: <20200624113026.13343-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com Cc: qemu-ppc@nongnu.org, Eduardo Habkost , "Michael S. Tsirkin" , libvir-list@redhat.com, =?UTF-8?q?Herv=C3=A9=20Poussineau?= , Gerd Hoffmann , Marcel Apfelbaum , Paolo Bonzini , 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.79 on 10.5.11.13 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 283754f42bd5..3290b0b93097 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 3f1d42b05102..f7ca8d981afa 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -1240,7 +1240,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); @@ -1912,6 +1912,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