From nobody Tue Oct 28 04:18:26 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 151455833856691.91906581942317; Fri, 29 Dec 2017 06:38:58 -0800 (PST) Received: from localhost ([::1]:42924 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eUvo7-0006UG-A1 for importer@patchew.org; Fri, 29 Dec 2017 09:38:47 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39325) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eUvg8-0000Dt-OA for qemu-devel@nongnu.org; Fri, 29 Dec 2017 09:30:33 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eUvg7-0006JS-V4 for qemu-devel@nongnu.org; Fri, 29 Dec 2017 09:30:32 -0500 Received: from iserv.reactos.org ([2a01:4f8:221:4c5::3]:38308) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eUvg7-0006Cs-P1 for qemu-devel@nongnu.org; Fri, 29 Dec 2017 09:30:31 -0500 Received: from [2a01:e34:ee6b:9c80:6267:20ff:fe65:a488] (helo=localhost.localdomain) by iserv.reactos.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1eUvfb-0002om-Mp; Fri, 29 Dec 2017 14:30:00 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=reactos.org; s=25047; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From; bh=bnLhf6osc5aS0hHFvFc3r+RZWgtBq014cvlXtSGiJaw=; b=cObuIpefK46RCWU8wwXEpSl/kldiZodpaIrOb/yAkmNLXxosovFCXWZxVw55BzMz6h5hjR2iqprolhhBScGzygscM7w5MlENy2W0AkwU8Cf6t8hvYjgp1oUGasZsp2oqOyTjzaNpW+AbIXeLsmZS9oSShkC/tA7rP6g1Nrgl2AI=; From: =?UTF-8?q?Herv=C3=A9=20Poussineau?= To: Aurelien Jarno , Yongbok Kim , "Michael S . Tsirkin" , Paolo Bonzini , qemu-devel@nongnu.org Date: Fri, 29 Dec 2017 15:29:19 +0100 Message-Id: <20171229142922.31701-14-hpoussin@reactos.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20171229142922.31701-1-hpoussin@reactos.org> References: <20171229142922.31701-1-hpoussin@reactos.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a01:4f8:221:4c5::3 Subject: [Qemu-devel] [PATCH v3 13/16] piix4: add a speaker as specified in datasheet X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Herv=C3=A9=20Poussineau?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Signed-off-by: Herv=C3=A9 Poussineau --- hw/isa/piix4.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/hw/isa/piix4.c b/hw/isa/piix4.c index 09388ff286..64526e1bb8 100644 --- a/hw/isa/piix4.c +++ b/hw/isa/piix4.c @@ -30,6 +30,7 @@ #include "hw/isa/isa.h" #include "hw/char/isa.h" #include "hw/sysbus.h" +#include "hw/audio/pcspk.h" #include "hw/timer/i8254.h" #include "hw/timer/mc146818rtc.h" #include "qapi/error.h" @@ -144,6 +145,7 @@ static void piix4_realize(PCIDevice *pci, Error **errp) DeviceState *dev =3D DEVICE(pci); PIIX4State *s =3D DO_UPCAST(PIIX4State, dev, pci); ISABus *isa_bus; + ISADevice *pit; qemu_irq *i8259_out_irq; int i; Error *err =3D NULL; @@ -170,7 +172,10 @@ static void piix4_realize(PCIDevice *pci, Error **errp) isa_bus_irqs(isa_bus, s->isa); =20 /* initialize pit */ - i8254_pit_init(isa_bus, 0x40, 0, NULL); + pit =3D i8254_pit_init(isa_bus, 0x40, 0, NULL); + + /* speaker */ + pcspk_init(isa_bus, pit); =20 /* DMA */ DMA_init(isa_bus, 0); --=20 2.11.0