From nobody Tue May 7 03:12:09 2024 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.zoho.com; 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 1493883054433769.2695993177879; Thu, 4 May 2017 00:30:54 -0700 (PDT) Received: from localhost ([::1]:40096 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d6BDx-0004L2-3Z for importer@patchew.org; Thu, 04 May 2017 03:30:53 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34635) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d6B1u-0001UE-0T for qemu-devel@nongnu.org; Thu, 04 May 2017 03:18:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d6B1p-0004Y7-HQ for qemu-devel@nongnu.org; Thu, 04 May 2017 03:18:25 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37850) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d6B1p-0004XV-BA for qemu-devel@nongnu.org; Thu, 04 May 2017 03:18:21 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4A2037AE92; Thu, 4 May 2017 07:18:20 +0000 (UTC) Received: from nilsson.home.kraxel.org (ovpn-116-101.ams2.redhat.com [10.36.116.101]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4D1EA7EDA8; Thu, 4 May 2017 07:18:17 +0000 (UTC) Received: by nilsson.home.kraxel.org (Postfix, from userid 500) id 4ADD2805A2; Thu, 4 May 2017 09:18:15 +0200 (CEST) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 4A2037AE92 Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=kraxel@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 4A2037AE92 From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Thu, 4 May 2017 09:17:42 +0200 Message-Id: <20170504071811.3547-2-kraxel@redhat.com> In-Reply-To: <20170504071811.3547-1-kraxel@redhat.com> References: <20170504071811.3547-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Thu, 04 May 2017 07:18:20 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 01/30] hw/audio: replace exit with unrealize in hda_codec_device_class_init 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: Zihan Yang , Gerd Hoffmann Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Zihan Yang The exit callback of DeviceClass will be removed in the future, so convert to unrealize in the init functioin Signed-off-by: Zihan Yang Message-id: 1493211188-24086-4-git-send-email-tgnyang@gmail.com Signed-off-by: Gerd Hoffmann --- hw/audio/intel-hda.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/hw/audio/intel-hda.c b/hw/audio/intel-hda.c index 537face94d..2c497eb174 100644 --- a/hw/audio/intel-hda.c +++ b/hw/audio/intel-hda.c @@ -70,7 +70,7 @@ static void hda_codec_dev_realize(DeviceState *qdev, Erro= r **errp) } } =20 -static int hda_codec_dev_exit(DeviceState *qdev) +static void hda_codec_dev_unrealize(DeviceState *qdev, Error **errp) { HDACodecDevice *dev =3D HDA_CODEC_DEVICE(qdev); HDACodecDeviceClass *cdc =3D HDA_CODEC_DEVICE_GET_CLASS(dev); @@ -78,7 +78,6 @@ static int hda_codec_dev_exit(DeviceState *qdev) if (cdc->exit) { cdc->exit(dev); } - return 0; } =20 HDACodecDevice *hda_codec_find(HDACodecBus *bus, uint32_t cad) @@ -1318,7 +1317,7 @@ static void hda_codec_device_class_init(ObjectClass *= klass, void *data) { DeviceClass *k =3D DEVICE_CLASS(klass); k->realize =3D hda_codec_dev_realize; - k->exit =3D hda_codec_dev_exit; + k->unrealize =3D hda_codec_dev_unrealize; set_bit(DEVICE_CATEGORY_SOUND, k->categories); k->bus_type =3D TYPE_HDA_BUS; k->props =3D hda_props; --=20 2.9.3 From nobody Tue May 7 03:12:09 2024 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.zoho.com; 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 149388282398810.729745578886082; Thu, 4 May 2017 00:27:03 -0700 (PDT) Received: from localhost ([::1]:40078 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d6BAE-0000p2-Dj for importer@patchew.org; Thu, 04 May 2017 03:27:02 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34624) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d6B1t-0001U6-VB for qemu-devel@nongnu.org; Thu, 04 May 2017 03:18:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d6B1p-0004Xl-68 for qemu-devel@nongnu.org; Thu, 04 May 2017 03:18:25 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40436) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d6B1o-0004XL-W2 for qemu-devel@nongnu.org; Thu, 04 May 2017 03:18:21 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E2E2383F43; Thu, 4 May 2017 07:18:19 +0000 (UTC) Received: from nilsson.home.kraxel.org (ovpn-116-101.ams2.redhat.com [10.36.116.101]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4EB8017D8E; Thu, 4 May 2017 07:18:17 +0000 (UTC) Received: by nilsson.home.kraxel.org (Postfix, from userid 500) id 6137380BFF; Thu, 4 May 2017 09:18:15 +0200 (CEST) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com E2E2383F43 Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=kraxel@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com E2E2383F43 From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Thu, 4 May 2017 09:17:43 +0200 Message-Id: <20170504071811.3547-3-kraxel@redhat.com> In-Reply-To: <20170504071811.3547-1-kraxel@redhat.com> References: <20170504071811.3547-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Thu, 04 May 2017 07:18:20 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 02/30] hw/audio: convert exit callback in HDACodecDeviceClass to void 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: Zihan Yang , Gerd Hoffmann Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Zihan Yang The exit callback always return 0, convert it to void Signed-off-by: Zihan Yang Message-id: 1493211188-24086-5-git-send-email-tgnyang@gmail.com Signed-off-by: Gerd Hoffmann --- hw/audio/intel-hda.h | 2 +- hw/audio/hda-codec.c | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/hw/audio/intel-hda.h b/hw/audio/intel-hda.h index d784bcf5fc..53b78da4df 100644 --- a/hw/audio/intel-hda.h +++ b/hw/audio/intel-hda.h @@ -38,7 +38,7 @@ typedef struct HDACodecDeviceClass DeviceClass parent_class; =20 int (*init)(HDACodecDevice *dev); - int (*exit)(HDACodecDevice *dev); + void (*exit)(HDACodecDevice *dev); void (*command)(HDACodecDevice *dev, uint32_t nid, uint32_t data); void (*stream)(HDACodecDevice *dev, uint32_t stnr, bool running, bool = output); } HDACodecDeviceClass; diff --git a/hw/audio/hda-codec.c b/hw/audio/hda-codec.c index 52d4640e60..5402cd196c 100644 --- a/hw/audio/hda-codec.c +++ b/hw/audio/hda-codec.c @@ -520,7 +520,7 @@ static int hda_audio_init(HDACodecDevice *hda, const st= ruct desc_codec *desc) return 0; } =20 -static int hda_audio_exit(HDACodecDevice *hda) +static void hda_audio_exit(HDACodecDevice *hda) { HDAAudioState *a =3D HDA_AUDIO(hda); HDAAudioStream *st; @@ -539,7 +539,6 @@ static int hda_audio_exit(HDACodecDevice *hda) } } AUD_remove_card(&a->card); - return 0; } =20 static int hda_audio_post_load(void *opaque, int version) --=20 2.9.3 From nobody Tue May 7 03:12:09 2024 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.zoho.com; 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 1493882418230464.67335287706953; Thu, 4 May 2017 00:20:18 -0700 (PDT) Received: from localhost ([::1]:40042 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d6B3d-0002nj-9Z for importer@patchew.org; Thu, 04 May 2017 03:20:13 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34612) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d6B1t-0001U3-5M for qemu-devel@nongnu.org; Thu, 04 May 2017 03:18:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d6B1o-0004XZ-TO for qemu-devel@nongnu.org; Thu, 04 May 2017 03:18:25 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40210) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d6B1o-0004XD-N1 for qemu-devel@nongnu.org; Thu, 04 May 2017 03:18:20 -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 mx1.redhat.com (Postfix) with ESMTPS id 7A7AC80C1F; Thu, 4 May 2017 07:18:19 +0000 (UTC) Received: from nilsson.home.kraxel.org (ovpn-116-101.ams2.redhat.com [10.36.116.101]) by smtp.corp.redhat.com (Postfix) with ESMTP id 47095183E3; Thu, 4 May 2017 07:18:17 +0000 (UTC) Received: by nilsson.home.kraxel.org (Postfix, from userid 500) id 7017880BFA; Thu, 4 May 2017 09:18:15 +0200 (CEST) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 7A7AC80C1F Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=kraxel@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 7A7AC80C1F From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Thu, 4 May 2017 09:17:44 +0200 Message-Id: <20170504071811.3547-4-kraxel@redhat.com> In-Reply-To: <20170504071811.3547-1-kraxel@redhat.com> References: <20170504071811.3547-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Thu, 04 May 2017 07:18:19 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 03/30] audio: release capture buffers 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: Huawei PSIRT , Gerd Hoffmann , P J P Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" AUD_add_capture() allocates two buffers which are never released. Add the missing calls to AUD_del_capture(). Impact: Allows vnc clients to exhaust host memory by repeatedly starting and stopping audio capture. Fixes: CVE-2017-8309 Cc: P J P Cc: Huawei PSIRT Reported-by: "Jiangxin (hunter, SCC)" Signed-off-by: Gerd Hoffmann Reviewed-by: Prasad J Pandit Message-id: 20170428075612.9997-1-kraxel@redhat.com --- audio/audio.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/audio/audio.c b/audio/audio.c index c8898d8422..beafed209b 100644 --- a/audio/audio.c +++ b/audio/audio.c @@ -2028,6 +2028,8 @@ void AUD_del_capture (CaptureVoiceOut *cap, void *cb_= opaque) sw =3D sw1; } QLIST_REMOVE (cap, entries); + g_free (cap->hw.mix_buf); + g_free (cap->buf); g_free (cap); } return; --=20 2.9.3 From nobody Tue May 7 03:12:09 2024 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.zoho.com; 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 1493882560614447.4083722484314; Thu, 4 May 2017 00:22:40 -0700 (PDT) Received: from localhost ([::1]:40056 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d6B5z-00052z-93 for importer@patchew.org; Thu, 04 May 2017 03:22:39 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34625) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d6B1t-0001U7-Ue for qemu-devel@nongnu.org; Thu, 04 May 2017 03:18:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d6B1q-0004ZD-RF for qemu-devel@nongnu.org; Thu, 04 May 2017 03:18:25 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57878) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d6B1q-0004YN-L5 for qemu-devel@nongnu.org; Thu, 04 May 2017 03:18:22 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A73A0C059726 for ; Thu, 4 May 2017 07:18:21 +0000 (UTC) Received: from nilsson.home.kraxel.org (ovpn-116-101.ams2.redhat.com [10.36.116.101]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5C1695DD67; Thu, 4 May 2017 07:18:17 +0000 (UTC) Received: by nilsson.home.kraxel.org (Postfix, from userid 500) id 8228B80DE9; Thu, 4 May 2017 09:18:15 +0200 (CEST) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com A73A0C059726 Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=kraxel@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com A73A0C059726 From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Thu, 4 May 2017 09:17:45 +0200 Message-Id: <20170504071811.3547-5-kraxel@redhat.com> In-Reply-To: <20170504071811.3547-1-kraxel@redhat.com> References: <20170504071811.3547-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Thu, 04 May 2017 07:18:21 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 04/30] audio: fix WAVState leak 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?Marc-Andr=C3=A9=20Lureau?= , Gerd Hoffmann Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" From: Marc-Andr=C3=A9 Lureau Spotted by ASAN. Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-id: 20170503223846.6559-4-marcandre.lureau@redhat.com Signed-off-by: Gerd Hoffmann --- audio/wavcapture.c | 1 + 1 file changed, 1 insertion(+) diff --git a/audio/wavcapture.c b/audio/wavcapture.c index 8bfb9e7654..5863803584 100644 --- a/audio/wavcapture.c +++ b/audio/wavcapture.c @@ -88,6 +88,7 @@ static void wav_capture_destroy (void *opaque) WAVState *wav =3D opaque; =20 AUD_del_capture (wav->cap, wav); + g_free (wav); } =20 static void wav_capture_info (void *opaque) --=20 2.9.3 From nobody Tue May 7 03:12:09 2024 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.zoho.com; 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 1493882566248473.01917291703717; Thu, 4 May 2017 00:22:46 -0700 (PDT) Received: from localhost ([::1]:40058 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d6B64-0005CB-UY for importer@patchew.org; Thu, 04 May 2017 03:22:45 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34721) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d6B1v-0001UX-Gk for qemu-devel@nongnu.org; Thu, 04 May 2017 03:18:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d6B1r-0004aV-TL for qemu-devel@nongnu.org; Thu, 04 May 2017 03:18:27 -0400 Received: from mx1.redhat.com ([209.132.183.28]:42784) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d6B1r-0004ZS-Kt for qemu-devel@nongnu.org; Thu, 04 May 2017 03:18:23 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B05468046D for ; Thu, 4 May 2017 07:18:22 +0000 (UTC) Received: from nilsson.home.kraxel.org (ovpn-116-101.ams2.redhat.com [10.36.116.101]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4C6275C6E9; Thu, 4 May 2017 07:18:20 +0000 (UTC) Received: by nilsson.home.kraxel.org (Postfix, from userid 500) id 92C8380E0E; Thu, 4 May 2017 09:18:15 +0200 (CEST) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com B05468046D Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=kraxel@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com B05468046D From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Thu, 4 May 2017 09:17:46 +0200 Message-Id: <20170504071811.3547-6-kraxel@redhat.com> In-Reply-To: <20170504071811.3547-1-kraxel@redhat.com> References: <20170504071811.3547-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Thu, 04 May 2017 07:18:22 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 05/30] adlib: Remove support for YMF262 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: Gerd Hoffmann , Juan Quintela Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Juan Quintela Notice that the code was supposed to be in the file ymf262.h, that has never been on qemu source tree. Signed-off-by: Juan Quintela Message-id: 20170425223739.6703-2-quintela@redhat.com Signed-off-by: Gerd Hoffmann --- hw/audio/adlib.c | 45 +-------------------------------------------- 1 file changed, 1 insertion(+), 44 deletions(-) diff --git a/hw/audio/adlib.c b/hw/audio/adlib.c index 7836446fc8..f9adcd709a 100644 --- a/hw/audio/adlib.c +++ b/hw/audio/adlib.c @@ -33,11 +33,7 @@ =20 #define ADLIB_KILL_TIMERS 1 =20 -#ifdef HAS_YMF262 -#define ADLIB_DESC "Yamaha YMF262 (OPL3)" -#else #define ADLIB_DESC "Yamaha YM3812 (OPL2)" -#endif =20 #ifdef DEBUG #include "qemu/timer.h" @@ -50,14 +46,8 @@ #define ldebug(...) #endif =20 -#ifdef HAS_YMF262 -#include "ymf262.h" -void YMF262UpdateOneQEMU (int which, INT16 *dst, int length); -#define SHIFT 2 -#else #include "fmopl.h" #define SHIFT 1 -#endif =20 #define TYPE_ADLIB "adlib" #define ADLIB(obj) OBJECT_CHECK(AdlibState, (obj), TYPE_ADLIB) @@ -80,9 +70,7 @@ typedef struct { SWVoiceOut *voice; int left, pos, samples; QEMUAudioTimeStamp ats; -#ifndef HAS_YMF262 FM_OPL *opl; -#endif PortioList port_list; } AdlibState; =20 @@ -90,11 +78,7 @@ static AdlibState *glob_adlib; =20 static void adlib_stop_opl_timer (AdlibState *s, size_t n) { -#ifdef HAS_YMF262 - YMF262TimerOver (0, n); -#else OPLTimerOver (s->opl, n); -#endif s->ticking[n] =3D 0; } =20 @@ -131,11 +115,7 @@ static void adlib_write(void *opaque, uint32_t nport, = uint32_t val) =20 adlib_kill_timers (s); =20 -#ifdef HAS_YMF262 - YMF262Write (0, a, val); -#else OPLWrite (s->opl, a, val); -#endif } =20 static uint32_t adlib_read(void *opaque, uint32_t nport) @@ -145,12 +125,8 @@ static uint32_t adlib_read(void *opaque, uint32_t npor= t) int a =3D nport & 3; =20 adlib_kill_timers (s); - -#ifdef HAS_YMF262 - data =3D YMF262Read (0, a); -#else data =3D OPLRead (s->opl, a); -#endif + return data; } =20 @@ -240,11 +216,7 @@ static void adlib_callback (void *opaque, int free) return; } =20 -#ifdef HAS_YMF262 - YMF262UpdateOneQEMU (0, s->mixbuf + s->pos * 2, samples); -#else YM3812UpdateOne (s->opl, s->mixbuf + s->pos, samples); -#endif =20 while (samples) { written =3D write_audio (s, samples); @@ -263,14 +235,10 @@ static void adlib_callback (void *opaque, int free) =20 static void Adlib_fini (AdlibState *s) { -#ifdef HAS_YMF262 - YMF262Shutdown (); -#else if (s->opl) { OPLDestroy (s->opl); s->opl =3D NULL; } -#endif =20 g_free(s->mixbuf); =20 @@ -297,16 +265,6 @@ static void adlib_realizefn (DeviceState *dev, Error *= *errp) } glob_adlib =3D s; =20 -#ifdef HAS_YMF262 - if (YMF262Init (1, 14318180, s->freq)) { - error_setg (errp, "YMF262Init %d failed", s->freq); - return; - } - else { - YMF262SetTimerHandler (0, timer_handler, 0); - s->enabled =3D 1; - } -#else s->opl =3D OPLCreate (OPL_TYPE_YM3812, 3579545, s->freq); if (!s->opl) { error_setg (errp, "OPLCreate %d failed", s->freq); @@ -316,7 +274,6 @@ static void adlib_realizefn (DeviceState *dev, Error **= errp) OPLSetTimerHandler (s->opl, timer_handler, 0); s->enabled =3D 1; } -#endif =20 as.freq =3D s->freq; as.nchannels =3D SHIFT; --=20 2.9.3 From nobody Tue May 7 03:12:09 2024 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.zoho.com; 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 1493882829418770.5657084425422; Thu, 4 May 2017 00:27:09 -0700 (PDT) Received: from localhost ([::1]:40079 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d6BAJ-0000sM-Lq for importer@patchew.org; Thu, 04 May 2017 03:27:07 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34627) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d6B1t-0001U9-VC for qemu-devel@nongnu.org; Thu, 04 May 2017 03:18:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d6B1q-0004Yk-AD for qemu-devel@nongnu.org; Thu, 04 May 2017 03:18:25 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37862) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d6B1q-0004Xr-0n for qemu-devel@nongnu.org; Thu, 04 May 2017 03:18:22 -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 mx1.redhat.com (Postfix) with ESMTPS id 1AA817AE95 for ; Thu, 4 May 2017 07:18:21 +0000 (UTC) Received: from nilsson.home.kraxel.org (ovpn-116-101.ams2.redhat.com [10.36.116.101]) by smtp.corp.redhat.com (Postfix) with ESMTP id 52DB3183E3; Thu, 4 May 2017 07:18:20 +0000 (UTC) Received: by nilsson.home.kraxel.org (Postfix, from userid 500) id A77B280DDC; Thu, 4 May 2017 09:18:15 +0200 (CEST) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 1AA817AE95 Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=kraxel@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 1AA817AE95 From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Thu, 4 May 2017 09:17:47 +0200 Message-Id: <20170504071811.3547-7-kraxel@redhat.com> In-Reply-To: <20170504071811.3547-1-kraxel@redhat.com> References: <20170504071811.3547-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Thu, 04 May 2017 07:18:21 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 06/30] audio: remove Y8950 configuration 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: Gerd Hoffmann , Juan Quintela Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Juan Quintela Include file has never been on qemu and it has been undefined from the very= beginning. Signed-off-by: Juan Quintela Message-id: 20170425223739.6703-3-quintela@redhat.com Signed-off-by: Gerd Hoffmann --- hw/audio/fmopl.h | 20 ------- hw/audio/fmopl.c | 146 ---------------------------------------------= ---- hw/audio/Makefile.objs | 2 - 3 files changed, 168 deletions(-) diff --git a/hw/audio/fmopl.h b/hw/audio/fmopl.h index fdda7f9f51..96d958ac72 100644 --- a/hw/audio/fmopl.h +++ b/hw/audio/fmopl.h @@ -4,7 +4,6 @@ /* --- select emulation chips --- */ #define BUILD_YM3812 (HAS_YM3812) //#define BUILD_YM3526 (HAS_YM3526) -//#define BUILD_Y8950 (HAS_Y8950) =20 /* --- system optimize --- */ /* select bit size of output : 8 or 16 */ @@ -28,11 +27,6 @@ typedef INT16 OPLSAMPLE; typedef unsigned char OPLSAMPLE; #endif =20 - -#if BUILD_Y8950 -#include "ymdeltat.h" -#endif - typedef void (*OPL_TIMERHANDLER)(int channel,double interval_Sec); typedef void (*OPL_IRQHANDLER)(int param,int irq); typedef void (*OPL_UPDATEHANDLER)(int param,int min_interval_us); @@ -112,13 +106,6 @@ typedef struct fm_opl_f { int max_ch; /* maximum channel */ /* Rhythm sention */ UINT8 rhythm; /* Rhythm mode , key flag */ -#if BUILD_Y8950 - /* Delta-T ADPCM unit (Y8950) */ - YM_DELTAT *deltat; /* DELTA-T ADPCM */ -#endif - /* Keyboard / I/O interface unit (Y8950) */ - UINT8 portDirection; - UINT8 portLatch; OPL_PORTHANDLER_R porthandler_r; OPL_PORTHANDLER_W porthandler_w; int port_param; @@ -150,16 +137,12 @@ typedef struct fm_opl_f { /* ---------- Generic interface section ---------- */ #define OPL_TYPE_YM3526 (0) #define OPL_TYPE_YM3812 (OPL_TYPE_WAVESEL) -#define OPL_TYPE_Y8950 (OPL_TYPE_ADPCM|OPL_TYPE_KEYBOARD|OPL_TYPE_IO) =20 FM_OPL *OPLCreate(int type, int clock, int rate); void OPLDestroy(FM_OPL *OPL); void OPLSetTimerHandler(FM_OPL *OPL,OPL_TIMERHANDLER TimerHandler,int chan= nelOffset); void OPLSetIRQHandler(FM_OPL *OPL,OPL_IRQHANDLER IRQHandler,int param); void OPLSetUpdateHandler(FM_OPL *OPL,OPL_UPDATEHANDLER UpdateHandler,int p= aram); -/* Y8950 port handlers */ -void OPLSetPortHandler(FM_OPL *OPL,OPL_PORTHANDLER_W PortHandler_w,OPL_POR= THANDLER_R PortHandler_r,int param); -void OPLSetKeyboardHandler(FM_OPL *OPL,OPL_PORTHANDLER_W KeyboardHandler_w= ,OPL_PORTHANDLER_R KeyboardHandler_r,int param); =20 void OPLResetChip(FM_OPL *OPL); int OPLWrite(FM_OPL *OPL,int a,int v); @@ -168,7 +151,4 @@ int OPLTimerOver(FM_OPL *OPL,int c); =20 /* YM3626/YM3812 local section */ void YM3812UpdateOne(FM_OPL *OPL, INT16 *buffer, int length); - -void Y8950UpdateOne(FM_OPL *OPL, INT16 *buffer, int length); - #endif diff --git a/hw/audio/fmopl.c b/hw/audio/fmopl.c index 731110fe86..29f6d3c5a4 100644 --- a/hw/audio/fmopl.c +++ b/hw/audio/fmopl.c @@ -812,57 +812,6 @@ static void OPLWriteReg(FM_OPL *OPL, int r, int v) } } return; -#if BUILD_Y8950 - case 0x06: /* Key Board OUT */ - if(OPL->type&OPL_TYPE_KEYBOARD) - { - if(OPL->keyboardhandler_w) - OPL->keyboardhandler_w(OPL->keyboard_param,v); - else - LOG(LOG_WAR,("OPL:write unmapped KEYBOARD port\n")); - } - return; - case 0x07: /* DELTA-T control : START,REC,MEMDATA,REPT,SPOFF,x,x,RST */ - if(OPL->type&OPL_TYPE_ADPCM) - YM_DELTAT_ADPCM_Write(OPL->deltat,r-0x07,v); - return; - case 0x08: /* MODE,DELTA-T : CSM,NOTESEL,x,x,smpl,da/ad,64k,rom */ - OPL->mode =3D v; - v&=3D0x1f; /* for DELTA-T unit */ - case 0x09: /* START ADD */ - case 0x0a: - case 0x0b: /* STOP ADD */ - case 0x0c: - case 0x0d: /* PRESCALE */ - case 0x0e: - case 0x0f: /* ADPCM data */ - case 0x10: /* DELTA-N */ - case 0x11: /* DELTA-N */ - case 0x12: /* EG-CTRL */ - if(OPL->type&OPL_TYPE_ADPCM) - YM_DELTAT_ADPCM_Write(OPL->deltat,r-0x07,v); - return; -#if 0 - case 0x15: /* DAC data */ - case 0x16: - case 0x17: /* SHIFT */ - return; - case 0x18: /* I/O CTRL (Direction) */ - if(OPL->type&OPL_TYPE_IO) - OPL->portDirection =3D v&0x0f; - return; - case 0x19: /* I/O DATA */ - if(OPL->type&OPL_TYPE_IO) - { - OPL->portLatch =3D v; - if(OPL->porthandler_w) - OPL->porthandler_w(OPL->port_param,v&OPL->portDirection); - } - return; - case 0x1a: /* PCM data */ - return; -#endif -#endif } break; case 0x20: /* am,vib,ksr,eg type,mul */ @@ -1097,68 +1046,6 @@ void YM3812UpdateOne(FM_OPL *OPL, INT16 *buffer, int= length) } #endif /* (BUILD_YM3812 || BUILD_YM3526) */ =20 -#if BUILD_Y8950 - -void Y8950UpdateOne(FM_OPL *OPL, INT16 *buffer, int length) -{ - int i; - int data; - OPLSAMPLE *buf =3D buffer; - UINT32 amsCnt =3D OPL->amsCnt; - UINT32 vibCnt =3D OPL->vibCnt; - UINT8 rhythm =3D OPL->rhythm&0x20; - OPL_CH *CH,*R_CH; - YM_DELTAT *DELTAT =3D OPL->deltat; - - /* setup DELTA-T unit */ - YM_DELTAT_DECODE_PRESET(DELTAT); - - if( (void *)OPL !=3D cur_chip ){ - cur_chip =3D (void *)OPL; - /* channel pointers */ - S_CH =3D OPL->P_CH; - E_CH =3D &S_CH[9]; - /* rhythm slot */ - SLOT7_1 =3D &S_CH[7].SLOT[SLOT1]; - SLOT7_2 =3D &S_CH[7].SLOT[SLOT2]; - SLOT8_1 =3D &S_CH[8].SLOT[SLOT1]; - SLOT8_2 =3D &S_CH[8].SLOT[SLOT2]; - /* LFO state */ - amsIncr =3D OPL->amsIncr; - vibIncr =3D OPL->vibIncr; - ams_table =3D OPL->ams_table; - vib_table =3D OPL->vib_table; - } - R_CH =3D rhythm ? &S_CH[6] : E_CH; - for( i=3D0; i < length ; i++ ) - { - /* channel A channel B channel C */ - /* LFO */ - ams =3D ams_table[(amsCnt+=3DamsIncr)>>AMS_SHIFT]; - vib =3D vib_table[(vibCnt+=3DvibIncr)>>VIB_SHIFT]; - outd[0] =3D 0; - /* deltaT ADPCM */ - if( DELTAT->portstate ) - YM_DELTAT_ADPCM_CALC(DELTAT); - /* FM part */ - for(CH=3DS_CH ; CH < R_CH ; CH++) - OPL_CALC_CH(CH); - /* Rythn part */ - if(rhythm) - OPL_CALC_RH(S_CH); - /* limit check */ - data =3D Limit( outd[0] , OPL_MAXOUT, OPL_MINOUT ); - /* store to sound buffer */ - buf[i] =3D data >> OPL_OUTSB; - } - OPL->amsCnt =3D amsCnt; - OPL->vibCnt =3D vibCnt; - /* deltaT START flag */ - if( !DELTAT->portstate ) - OPL->status &=3D 0xfe; -} -#endif - /* ---------- reset one of chip ---------- */ void OPLResetChip(FM_OPL *OPL) { @@ -1189,18 +1076,6 @@ void OPLResetChip(FM_OPL *OPL) CH->SLOT[s].evs =3D 0; } } -#if BUILD_Y8950 - if(OPL->type&OPL_TYPE_ADPCM) - { - YM_DELTAT *DELTAT =3D OPL->deltat; - - DELTAT->freqbase =3D OPL->freqbase; - DELTAT->output_pointer =3D outd; - DELTAT->portshift =3D 5; - DELTAT->output_range =3D DELTAT_MIXING_LEVEL<P_CH =3D (OPL_CH *)ptr; ptr+=3Dsizeof(OPL_CH)*max_ch; -#if BUILD_Y8950 - if(type&OPL_TYPE_ADPCM) OPL->deltat =3D (YM_DELTAT *)ptr; ptr+=3Dsizeof(Y= M_DELTAT); -#endif /* set channel state pointer */ OPL->type =3D type; OPL->clock =3D clock; @@ -1290,21 +1159,6 @@ void OPLSetUpdateHandler(FM_OPL *OPL,OPL_UPDATEHANDL= ER UpdateHandler,int param) OPL->UpdateHandler =3D UpdateHandler; OPL->UpdateParam =3D param; } -#if BUILD_Y8950 -void OPLSetPortHandler(FM_OPL *OPL,OPL_PORTHANDLER_W PortHandler_w,OPL_POR= THANDLER_R PortHandler_r,int param) -{ - OPL->porthandler_w =3D PortHandler_w; - OPL->porthandler_r =3D PortHandler_r; - OPL->port_param =3D param; -} - -void OPLSetKeyboardHandler(FM_OPL *OPL,OPL_PORTHANDLER_W KeyboardHandler_w= ,OPL_PORTHANDLER_R KeyboardHandler_r,int param) -{ - OPL->keyboardhandler_w =3D KeyboardHandler_w; - OPL->keyboardhandler_r =3D KeyboardHandler_r; - OPL->keyboard_param =3D param; -} -#endif /* ---------- YM3812 I/O interface ---------- */ int OPLWrite(FM_OPL *OPL,int a,int v) { diff --git a/hw/audio/Makefile.objs b/hw/audio/Makefile.objs index 7ce85a2e88..bb6f07a91e 100644 --- a/hw/audio/Makefile.objs +++ b/hw/audio/Makefile.objs @@ -14,5 +14,3 @@ common-obj-$(CONFIG_PL041) +=3D pl041.o lm4549.o common-obj-$(CONFIG_CS4231) +=3D cs4231.o common-obj-$(CONFIG_MARVELL_88W8618) +=3D marvell_88w8618.o common-obj-$(CONFIG_MILKYMIST) +=3D milkymist-ac97.o - -$(obj)/adlib.o $(obj)/fmopl.o: QEMU_CFLAGS +=3D -DBUILD_Y8950=3D0 --=20 2.9.3 From nobody Tue May 7 03:12:09 2024 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.zoho.com; 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 1493882700799826.1847098998076; Thu, 4 May 2017 00:25:00 -0700 (PDT) Received: from localhost ([::1]:40066 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d6B8E-0007M1-Dw for importer@patchew.org; Thu, 04 May 2017 03:24:58 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34626) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d6B1t-0001U8-VD for qemu-devel@nongnu.org; Thu, 04 May 2017 03:18:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d6B1q-0004Yf-9t for qemu-devel@nongnu.org; Thu, 04 May 2017 03:18:25 -0400 Received: from mx1.redhat.com ([209.132.183.28]:45852) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d6B1q-0004Y2-2y for qemu-devel@nongnu.org; Thu, 04 May 2017 03:18:22 -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 mx1.redhat.com (Postfix) with ESMTPS id 28840C04B950 for ; Thu, 4 May 2017 07:18:21 +0000 (UTC) Received: from nilsson.home.kraxel.org (ovpn-116-101.ams2.redhat.com [10.36.116.101]) by smtp.corp.redhat.com (Postfix) with ESMTP id C9B49183E5; Thu, 4 May 2017 07:18:20 +0000 (UTC) Received: by nilsson.home.kraxel.org (Postfix, from userid 500) id B868F80E55; Thu, 4 May 2017 09:18:15 +0200 (CEST) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 28840C04B950 Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=kraxel@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 28840C04B950 From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Thu, 4 May 2017 09:17:48 +0200 Message-Id: <20170504071811.3547-8-kraxel@redhat.com> In-Reply-To: <20170504071811.3547-1-kraxel@redhat.com> References: <20170504071811.3547-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Thu, 04 May 2017 07:18:21 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 07/30] audio: Remove YM3526 support 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: Gerd Hoffmann , Juan Quintela Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Juan Quintela It was never compiled in. Signed-off-by: Juan Quintela Message-id: 20170425223739.6703-4-quintela@redhat.com Signed-off-by: Gerd Hoffmann --- hw/audio/fmopl.h | 2 -- hw/audio/fmopl.c | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/hw/audio/fmopl.h b/hw/audio/fmopl.h index 96d958ac72..b254968b6a 100644 --- a/hw/audio/fmopl.h +++ b/hw/audio/fmopl.h @@ -3,7 +3,6 @@ =20 /* --- select emulation chips --- */ #define BUILD_YM3812 (HAS_YM3812) -//#define BUILD_YM3526 (HAS_YM3526) =20 /* --- system optimize --- */ /* select bit size of output : 8 or 16 */ @@ -135,7 +134,6 @@ typedef struct fm_opl_f { } FM_OPL; =20 /* ---------- Generic interface section ---------- */ -#define OPL_TYPE_YM3526 (0) #define OPL_TYPE_YM3812 (OPL_TYPE_WAVESEL) =20 FM_OPL *OPLCreate(int type, int clock, int rate); diff --git a/hw/audio/fmopl.c b/hw/audio/fmopl.c index 29f6d3c5a4..1e05efca8a 100644 --- a/hw/audio/fmopl.c +++ b/hw/audio/fmopl.c @@ -981,7 +981,7 @@ static void OPL_UnLockTable(void) OPLCloseTable(); } =20 -#if (BUILD_YM3812 || BUILD_YM3526) +#if BUILD_YM3812 /*************************************************************************= ******/ /* YM3812 local section = */ /*************************************************************************= ******/ @@ -1044,7 +1044,7 @@ void YM3812UpdateOne(FM_OPL *OPL, INT16 *buffer, int = length) } #endif } -#endif /* (BUILD_YM3812 || BUILD_YM3526) */ +#endif /* BUILD_YM3812 */ =20 /* ---------- reset one of chip ---------- */ void OPLResetChip(FM_OPL *OPL) --=20 2.9.3 From nobody Tue May 7 03:12:09 2024 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.zoho.com; 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 1493883060927203.76665126442606; Thu, 4 May 2017 00:31:00 -0700 (PDT) Received: from localhost ([::1]:40097 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d6BE3-0004Om-Jq for importer@patchew.org; Thu, 04 May 2017 03:30:59 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34747) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d6B1v-0001Uj-Uw for qemu-devel@nongnu.org; Thu, 04 May 2017 03:18:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d6B1s-0004bY-Em for qemu-devel@nongnu.org; Thu, 04 May 2017 03:18:27 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57908) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d6B1s-0004a6-8S for qemu-devel@nongnu.org; Thu, 04 May 2017 03:18:24 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 2C14DC059726 for ; Thu, 4 May 2017 07:18:23 +0000 (UTC) Received: from nilsson.home.kraxel.org (ovpn-116-101.ams2.redhat.com [10.36.116.101]) by smtp.corp.redhat.com (Postfix) with ESMTP id CB52462923; Thu, 4 May 2017 07:18:20 +0000 (UTC) Received: by nilsson.home.kraxel.org (Postfix, from userid 500) id CA2B580E62; Thu, 4 May 2017 09:18:15 +0200 (CEST) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 2C14DC059726 Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=kraxel@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 2C14DC059726 From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Thu, 4 May 2017 09:17:49 +0200 Message-Id: <20170504071811.3547-9-kraxel@redhat.com> In-Reply-To: <20170504071811.3547-1-kraxel@redhat.com> References: <20170504071811.3547-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Thu, 04 May 2017 07:18:23 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 08/30] audio: YM3812 was always defined 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: Gerd Hoffmann , Juan Quintela Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Juan Quintela So, remove the ifdefs. Signed-off-by: Juan Quintela Message-id: 20170425223739.6703-5-quintela@redhat.com Signed-off-by: Gerd Hoffmann --- hw/audio/fmopl.h | 4 ---- hw/audio/fmopl.c | 4 ---- 2 files changed, 8 deletions(-) diff --git a/hw/audio/fmopl.h b/hw/audio/fmopl.h index b254968b6a..e476497275 100644 --- a/hw/audio/fmopl.h +++ b/hw/audio/fmopl.h @@ -1,9 +1,6 @@ #ifndef FMOPL_H #define FMOPL_H =20 -/* --- select emulation chips --- */ -#define BUILD_YM3812 (HAS_YM3812) - /* --- system optimize --- */ /* select bit size of output : 8 or 16 */ #define OPL_OUTPUT_BIT 16 @@ -147,6 +144,5 @@ int OPLWrite(FM_OPL *OPL,int a,int v); unsigned char OPLRead(FM_OPL *OPL,int a); int OPLTimerOver(FM_OPL *OPL,int c); =20 -/* YM3626/YM3812 local section */ void YM3812UpdateOne(FM_OPL *OPL, INT16 *buffer, int length); #endif diff --git a/hw/audio/fmopl.c b/hw/audio/fmopl.c index 1e05efca8a..282662a858 100644 --- a/hw/audio/fmopl.c +++ b/hw/audio/fmopl.c @@ -30,8 +30,6 @@ * License along with this library; if not, see . */ =20 -#define HAS_YM3812 1 - #include "qemu/osdep.h" #include //#include "driver.h" /* use M.A.M.E. */ @@ -981,7 +979,6 @@ static void OPL_UnLockTable(void) OPLCloseTable(); } =20 -#if BUILD_YM3812 /*************************************************************************= ******/ /* YM3812 local section = */ /*************************************************************************= ******/ @@ -1044,7 +1041,6 @@ void YM3812UpdateOne(FM_OPL *OPL, INT16 *buffer, int = length) } #endif } -#endif /* BUILD_YM3812 */ =20 /* ---------- reset one of chip ---------- */ void OPLResetChip(FM_OPL *OPL) --=20 2.9.3 From nobody Tue May 7 03:12:09 2024 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.zoho.com; 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 149388270722526.06738010871311; Thu, 4 May 2017 00:25:07 -0700 (PDT) Received: from localhost ([::1]:40069 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d6B8L-0007TE-Po for importer@patchew.org; Thu, 04 May 2017 03:25:05 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34633) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d6B1u-0001UD-0P for qemu-devel@nongnu.org; Thu, 04 May 2017 03:18:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d6B1r-0004ZZ-2r for qemu-devel@nongnu.org; Thu, 04 May 2017 03:18:25 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37874) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d6B1q-0004YW-QX for qemu-devel@nongnu.org; Thu, 04 May 2017 03:18:23 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id DFC0F7AE81 for ; Thu, 4 May 2017 07:18:21 +0000 (UTC) Received: from nilsson.home.kraxel.org (ovpn-116-101.ams2.redhat.com [10.36.116.101]) by smtp.corp.redhat.com (Postfix) with ESMTP id 136137EBF8; Thu, 4 May 2017 07:18:21 +0000 (UTC) Received: by nilsson.home.kraxel.org (Postfix, from userid 500) id DC33080EBD; Thu, 4 May 2017 09:18:15 +0200 (CEST) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com DFC0F7AE81 Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=kraxel@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com DFC0F7AE81 From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Thu, 4 May 2017 09:17:50 +0200 Message-Id: <20170504071811.3547-10-kraxel@redhat.com> In-Reply-To: <20170504071811.3547-1-kraxel@redhat.com> References: <20170504071811.3547-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Thu, 04 May 2017 07:18:22 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 09/30] audio: Remove UINT8 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: Gerd Hoffmann , Juan Quintela Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Juan Quintela uint8_t has existed since ..... all this century? Signed-off-by: Juan Quintela Message-id: 20170425223739.6703-6-quintela@redhat.com Signed-off-by: Gerd Hoffmann --- hw/audio/fmopl.h | 39 ++++++++++++++++++++------------------- hw/audio/fmopl.c | 8 ++++---- 2 files changed, 24 insertions(+), 23 deletions(-) diff --git a/hw/audio/fmopl.h b/hw/audio/fmopl.h index e476497275..3df89425ef 100644 --- a/hw/audio/fmopl.h +++ b/hw/audio/fmopl.h @@ -1,6 +1,8 @@ #ifndef FMOPL_H #define FMOPL_H =20 +#include + /* --- system optimize --- */ /* select bit size of output : 8 or 16 */ #define OPL_OUTPUT_BIT 16 @@ -8,7 +10,6 @@ /* compiler dependence */ #ifndef OSD_CPU_H #define OSD_CPU_H -typedef unsigned char UINT8; /* unsigned 8bit */ typedef unsigned short UINT16; /* unsigned 16bit */ typedef unsigned int UINT32; /* unsigned 32bit */ typedef signed char INT8; /* signed 8bit */ @@ -41,19 +42,19 @@ typedef unsigned char (*OPL_PORTHANDLER_R)(int param); typedef struct fm_opl_slot { INT32 TL; /* total level :TL << 8 */ INT32 TLL; /* adjusted now TL */ - UINT8 KSR; /* key scale rate :(shift down bit) */ + uint8_t KSR; /* key scale rate :(shift down bit) */ INT32 *AR; /* attack rate :&AR_TABLE[AR<<2] */ INT32 *DR; /* decay rate :&DR_TALBE[DR<<2] */ INT32 SL; /* sustin level :SL_TALBE[SL] */ INT32 *RR; /* release rate :&DR_TABLE[RR<<2] */ - UINT8 ksl; /* keyscale level :(shift down bits) */ - UINT8 ksr; /* key scale rate :kcode>>KSR */ + uint8_t ksl; /* keyscale level :(shift down bits) */ + uint8_t ksr; /* key scale rate :kcode>>KSR */ UINT32 mul; /* multiple :ML_TABLE[ML] */ UINT32 Cnt; /* frequency count : */ UINT32 Incr; /* frequency step : */ /* envelope generator state */ - UINT8 eg_typ; /* envelope type flag */ - UINT8 evm; /* envelope phase */ + uint8_t eg_typ; /* envelope type flag */ + uint8_t evm; /* envelope phase */ INT32 evc; /* envelope counter */ INT32 eve; /* envelope counter end point */ INT32 evs; /* envelope counter step */ @@ -61,8 +62,8 @@ typedef struct fm_opl_slot { INT32 evsd; /* envelope step for DR :DR[ksr] */ INT32 evsr; /* envelope step for RR :RR[ksr] */ /* LFO */ - UINT8 ams; /* ams flag */ - UINT8 vib; /* vibrate flag */ + uint8_t ams; /* ams flag */ + uint8_t vib; /* vibrate flag */ /* wave selector */ INT32 **wavetable; }OPL_SLOT; @@ -70,38 +71,38 @@ typedef struct fm_opl_slot { /* ---------- OPL one of channel ---------- */ typedef struct fm_opl_channel { OPL_SLOT SLOT[2]; - UINT8 CON; /* connection type */ - UINT8 FB; /* feed back :(shift down bit) */ + uint8_t CON; /* connection type */ + uint8_t FB; /* feed back :(shift down bit) */ INT32 *connect1; /* slot1 output pointer */ INT32 *connect2; /* slot2 output pointer */ INT32 op1_out[2]; /* slot1 output for selfeedback */ /* phase generator state */ UINT32 block_fnum; /* block+fnum : */ - UINT8 kcode; /* key code : KeyScaleCode */ + uint8_t kcode; /* key code : KeyScaleCode */ UINT32 fc; /* Freq. Increment base */ UINT32 ksl_base; /* KeyScaleLevel Base step */ - UINT8 keyon; /* key on/off flag */ + uint8_t keyon; /* key on/off flag */ } OPL_CH; =20 /* OPL state */ typedef struct fm_opl_f { - UINT8 type; /* chip type */ + uint8_t type; /* chip type */ int clock; /* master clock (Hz) */ int rate; /* sampling rate (Hz) */ double freqbase; /* frequency base */ double TimerBase; /* Timer base time (=3D=3Dsampling time) */ - UINT8 address; /* address register */ - UINT8 status; /* status flag */ - UINT8 statusmask; /* status mask */ + uint8_t address; /* address register */ + uint8_t status; /* status flag */ + uint8_t statusmask; /* status mask */ UINT32 mode; /* Reg.08 : CSM , notesel,etc. */ /* Timer */ int T[2]; /* timer counter */ - UINT8 st[2]; /* timer enable */ + uint8_t st[2]; /* timer enable */ /* FM channel slots */ OPL_CH *P_CH; /* pointer of CH */ int max_ch; /* maximum channel */ /* Rhythm sention */ - UINT8 rhythm; /* Rhythm mode , key flag */ + uint8_t rhythm; /* Rhythm mode , key flag */ OPL_PORTHANDLER_R porthandler_r; OPL_PORTHANDLER_W porthandler_w; int port_param; @@ -120,7 +121,7 @@ typedef struct fm_opl_f { INT32 vibCnt; INT32 vibIncr; /* wave selector enable flag */ - UINT8 wavesel; + uint8_t wavesel; /* external event callback handler */ OPL_TIMERHANDLER TimerHandler; /* TIMER handler */ int TimerParam; /* TIMER parameter */ diff --git a/hw/audio/fmopl.c b/hw/audio/fmopl.c index 282662a858..3d14b455a7 100644 --- a/hw/audio/fmopl.c +++ b/hw/audio/fmopl.c @@ -789,8 +789,8 @@ static void OPLWriteReg(FM_OPL *OPL, int r, int v) } else { /* set IRQ mask ,timer enable*/ - UINT8 st1 =3D v&1; - UINT8 st2 =3D (v>>1)&1; + uint8_t st1 =3D v&1; + uint8_t st2 =3D (v>>1)&1; /* IRQRST,T1MSK,t2MSK,EOSMSK,BRMSK,x,ST2,ST1 */ OPL_STATUS_RESET(OPL,v&0x78); OPL_STATUSMASK_SET(OPL,((~v)&0x78)|0x01); @@ -838,7 +838,7 @@ static void OPLWriteReg(FM_OPL *OPL, int r, int v) case 0xbd: /* amsep,vibdep,r,bd,sd,tom,tc,hh */ { - UINT8 rkey =3D OPL->rhythm^v; + uint8_t rkey =3D OPL->rhythm^v; OPL->ams_table =3D &AMS_TABLE[v&0x80 ? AMS_ENT : 0]; OPL->vib_table =3D &VIB_TABLE[v&0x40 ? VIB_ENT : 0]; OPL->rhythm =3D v&0x3f; @@ -991,7 +991,7 @@ void YM3812UpdateOne(FM_OPL *OPL, INT16 *buffer, int le= ngth) OPLSAMPLE *buf =3D buffer; UINT32 amsCnt =3D OPL->amsCnt; UINT32 vibCnt =3D OPL->vibCnt; - UINT8 rhythm =3D OPL->rhythm&0x20; + uint8_t rhythm =3D OPL->rhythm&0x20; OPL_CH *CH,*R_CH; =20 if( (void *)OPL !=3D cur_chip ){ --=20 2.9.3 From nobody Tue May 7 03:12:09 2024 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.zoho.com; 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 1493882423373710.7143987226297; Thu, 4 May 2017 00:20:23 -0700 (PDT) Received: from localhost ([::1]:40045 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d6B3l-0002sR-3Z for importer@patchew.org; Thu, 04 May 2017 03:20:21 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34651) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d6B1u-0001UQ-HX for qemu-devel@nongnu.org; Thu, 04 May 2017 03:18:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d6B1r-0004aa-TT for qemu-devel@nongnu.org; Thu, 04 May 2017 03:18:26 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57900) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d6B1r-0004Zj-Nj for qemu-devel@nongnu.org; Thu, 04 May 2017 03:18:23 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 621CFC059747 for ; Thu, 4 May 2017 07:18:22 +0000 (UTC) Received: from nilsson.home.kraxel.org (ovpn-116-101.ams2.redhat.com [10.36.116.101]) by smtp.corp.redhat.com (Postfix) with ESMTP id 21BFF19EFA; Thu, 4 May 2017 07:18:21 +0000 (UTC) Received: by nilsson.home.kraxel.org (Postfix, from userid 500) id F085880EF4; Thu, 4 May 2017 09:18:15 +0200 (CEST) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 621CFC059747 Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=kraxel@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 621CFC059747 From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Thu, 4 May 2017 09:17:51 +0200 Message-Id: <20170504071811.3547-11-kraxel@redhat.com> In-Reply-To: <20170504071811.3547-1-kraxel@redhat.com> References: <20170504071811.3547-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Thu, 04 May 2017 07:18:22 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 10/30] audio: remove UINT16 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: Gerd Hoffmann , Juan Quintela Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Juan Quintela More modernitation. Signed-off-by: Juan Quintela Message-id: 20170425223739.6703-7-quintela@redhat.com Signed-off-by: Gerd Hoffmann --- hw/audio/fmopl.h | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/audio/fmopl.h b/hw/audio/fmopl.h index 3df89425ef..1891a22349 100644 --- a/hw/audio/fmopl.h +++ b/hw/audio/fmopl.h @@ -10,7 +10,6 @@ /* compiler dependence */ #ifndef OSD_CPU_H #define OSD_CPU_H -typedef unsigned short UINT16; /* unsigned 16bit */ typedef unsigned int UINT32; /* unsigned 32bit */ typedef signed char INT8; /* signed 8bit */ typedef signed short INT16; /* signed 16bit */ --=20 2.9.3 From nobody Tue May 7 03:12:09 2024 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.zoho.com; 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 1493882563146663.8475878845705; Thu, 4 May 2017 00:22:43 -0700 (PDT) Received: from localhost ([::1]:40057 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d6B61-00057r-Nv for importer@patchew.org; Thu, 04 May 2017 03:22:41 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34628) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d6B1t-0001UA-W2 for qemu-devel@nongnu.org; Thu, 04 May 2017 03:18:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d6B1q-0004ZM-VQ for qemu-devel@nongnu.org; Thu, 04 May 2017 03:18:25 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33088) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d6B1q-0004YR-Mp for qemu-devel@nongnu.org; Thu, 04 May 2017 03:18:22 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B98646198D for ; Thu, 4 May 2017 07:18:21 +0000 (UTC) Received: from nilsson.home.kraxel.org (ovpn-116-101.ams2.redhat.com [10.36.116.101]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2424C74ABE; Thu, 4 May 2017 07:18:21 +0000 (UTC) Received: by nilsson.home.kraxel.org (Postfix, from userid 500) id 0FC2D80F99; Thu, 4 May 2017 09:18:16 +0200 (CEST) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com B98646198D Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=kraxel@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com B98646198D From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Thu, 4 May 2017 09:17:52 +0200 Message-Id: <20170504071811.3547-12-kraxel@redhat.com> In-Reply-To: <20170504071811.3547-1-kraxel@redhat.com> References: <20170504071811.3547-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Thu, 04 May 2017 07:18:21 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 11/30] audio: remove UINT32 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: Gerd Hoffmann , Juan Quintela Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Juan Quintela Signed-off-by: Juan Quintela Message-id: 20170425223739.6703-8-quintela@redhat.com Signed-off-by: Gerd Hoffmann --- hw/audio/fmopl.h | 17 ++++++++--------- hw/audio/fmopl.c | 14 +++++++------- 2 files changed, 15 insertions(+), 16 deletions(-) diff --git a/hw/audio/fmopl.h b/hw/audio/fmopl.h index 1891a22349..b52f0392cb 100644 --- a/hw/audio/fmopl.h +++ b/hw/audio/fmopl.h @@ -10,7 +10,6 @@ /* compiler dependence */ #ifndef OSD_CPU_H #define OSD_CPU_H -typedef unsigned int UINT32; /* unsigned 32bit */ typedef signed char INT8; /* signed 8bit */ typedef signed short INT16; /* signed 16bit */ typedef signed int INT32; /* signed 32bit */ @@ -48,9 +47,9 @@ typedef struct fm_opl_slot { INT32 *RR; /* release rate :&DR_TABLE[RR<<2] */ uint8_t ksl; /* keyscale level :(shift down bits) */ uint8_t ksr; /* key scale rate :kcode>>KSR */ - UINT32 mul; /* multiple :ML_TABLE[ML] */ - UINT32 Cnt; /* frequency count : */ - UINT32 Incr; /* frequency step : */ + uint32_t mul; /* multiple :ML_TABLE[ML] */ + uint32_t Cnt; /* frequency count : */ + uint32_t Incr; /* frequency step : */ /* envelope generator state */ uint8_t eg_typ; /* envelope type flag */ uint8_t evm; /* envelope phase */ @@ -76,10 +75,10 @@ typedef struct fm_opl_channel { INT32 *connect2; /* slot2 output pointer */ INT32 op1_out[2]; /* slot1 output for selfeedback */ /* phase generator state */ - UINT32 block_fnum; /* block+fnum : */ + uint32_t block_fnum; /* block+fnum : */ uint8_t kcode; /* key code : KeyScaleCode */ - UINT32 fc; /* Freq. Increment base */ - UINT32 ksl_base; /* KeyScaleLevel Base step */ + uint32_t fc; /* Freq. Increment base */ + uint32_t ksl_base; /* KeyScaleLevel Base step */ uint8_t keyon; /* key on/off flag */ } OPL_CH; =20 @@ -93,7 +92,7 @@ typedef struct fm_opl_f { uint8_t address; /* address register */ uint8_t status; /* status flag */ uint8_t statusmask; /* status mask */ - UINT32 mode; /* Reg.08 : CSM , notesel,etc. */ + uint32_t mode; /* Reg.08 : CSM , notesel,etc. */ /* Timer */ int T[2]; /* timer counter */ uint8_t st[2]; /* timer enable */ @@ -111,7 +110,7 @@ typedef struct fm_opl_f { /* time tables */ INT32 AR_TABLE[75]; /* atttack rate tables */ INT32 DR_TABLE[75]; /* decay rate tables */ - UINT32 FN_TABLE[1024]; /* fnumber -> increment counter */ + uint32_t FN_TABLE[1024]; /* fnumber -> increment counter */ /* LFO */ INT32 *ams_table; INT32 *vib_table; diff --git a/hw/audio/fmopl.c b/hw/audio/fmopl.c index 3d14b455a7..47754e86b2 100644 --- a/hw/audio/fmopl.c +++ b/hw/audio/fmopl.c @@ -122,7 +122,7 @@ static const int slot_array[32]=3D /* key scale level */ /* table is 3dB/OCT , DV converts this in TL step at 6dB/OCT */ #define DV (EG_STEP/2) -static const UINT32 KSL_TABLE[8*16]=3D +static const uint32_t KSL_TABLE[8*16]=3D { /* OCT 0 */ 0.000/DV, 0.000/DV, 0.000/DV, 0.000/DV, @@ -195,7 +195,7 @@ static INT32 ENV_CURVE[2*EG_ENT+1]; =20 /* multiple table */ #define ML 2 -static const UINT32 MUL_TABLE[16]=3D { +static const uint32_t MUL_TABLE[16]=3D { /* 1/2, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13,14,15 */ 0.50*ML, 1.00*ML, 2.00*ML, 3.00*ML, 4.00*ML, 5.00*ML, 6.00*ML, 7.00*ML, 8.00*ML, 9.00*ML,10.00*ML,10.00*ML,12.00*ML,12.00*ML,15.00*ML,15.00*ML @@ -319,7 +319,7 @@ static inline void OPL_KEYOFF(OPL_SLOT *SLOT) =20 /* ---------- calcrate Envelope Generator & Phase Generator ---------- */ /* return : envelope output */ -static inline UINT32 OPL_CALC_SLOT( OPL_SLOT *SLOT ) +static inline uint32_t OPL_CALC_SLOT( OPL_SLOT *SLOT ) { /* calcrate envelope generator */ if( (SLOT->evc+=3DSLOT->evs) >=3D SLOT->eve ) @@ -451,7 +451,7 @@ static inline void set_sl_rr(FM_OPL *OPL,int slot,int v) /* ---------- calcrate one of channel ---------- */ static inline void OPL_CALC_CH( OPL_CH *CH ) { - UINT32 env_out; + uint32_t env_out; OPL_SLOT *SLOT; =20 feedback2 =3D 0; @@ -496,7 +496,7 @@ static inline void OPL_CALC_CH( OPL_CH *CH ) #define WHITE_NOISE_db 6.0 static inline void OPL_CALC_RH( OPL_CH *CH ) { - UINT32 env_tam,env_sd,env_top,env_hh; + uint32_t env_tam,env_sd,env_top,env_hh; int whitenoise =3D (rand()&1)*(WHITE_NOISE_db/EG_STEP); INT32 tone8; =20 @@ -989,8 +989,8 @@ void YM3812UpdateOne(FM_OPL *OPL, INT16 *buffer, int le= ngth) int i; int data; OPLSAMPLE *buf =3D buffer; - UINT32 amsCnt =3D OPL->amsCnt; - UINT32 vibCnt =3D OPL->vibCnt; + uint32_t amsCnt =3D OPL->amsCnt; + uint32_t vibCnt =3D OPL->vibCnt; uint8_t rhythm =3D OPL->rhythm&0x20; OPL_CH *CH,*R_CH; =20 --=20 2.9.3 From nobody Tue May 7 03:12:09 2024 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.zoho.com; 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 1493882418727157.37075668705313; Thu, 4 May 2017 00:20:18 -0700 (PDT) Received: from localhost ([::1]:40043 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d6B3g-0002pe-Qa for importer@patchew.org; Thu, 04 May 2017 03:20:16 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34631) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d6B1u-0001UC-00 for qemu-devel@nongnu.org; Thu, 04 May 2017 03:18:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d6B1q-0004Z7-MN for qemu-devel@nongnu.org; Thu, 04 May 2017 03:18:25 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33080) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d6B1q-0004YG-Gz for qemu-devel@nongnu.org; Thu, 04 May 2017 03:18:22 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 86AF761971 for ; Thu, 4 May 2017 07:18:21 +0000 (UTC) Received: from nilsson.home.kraxel.org (ovpn-116-101.ams2.redhat.com [10.36.116.101]) by smtp.corp.redhat.com (Postfix) with ESMTP id 267BD7EDA8; Thu, 4 May 2017 07:18:21 +0000 (UTC) Received: by nilsson.home.kraxel.org (Postfix, from userid 500) id 1FDE180FC5; Thu, 4 May 2017 09:18:16 +0200 (CEST) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 86AF761971 Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=kraxel@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 86AF761971 From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Thu, 4 May 2017 09:17:53 +0200 Message-Id: <20170504071811.3547-13-kraxel@redhat.com> In-Reply-To: <20170504071811.3547-1-kraxel@redhat.com> References: <20170504071811.3547-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Thu, 04 May 2017 07:18:21 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 12/30] audio: Remove INT8 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: Gerd Hoffmann , Juan Quintela Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Juan Quintela Signed-off-by: Juan Quintela Message-id: 20170425223739.6703-9-quintela@redhat.com Signed-off-by: Gerd Hoffmann --- hw/audio/fmopl.h | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/audio/fmopl.h b/hw/audio/fmopl.h index b52f0392cb..bede6717ae 100644 --- a/hw/audio/fmopl.h +++ b/hw/audio/fmopl.h @@ -10,7 +10,6 @@ /* compiler dependence */ #ifndef OSD_CPU_H #define OSD_CPU_H -typedef signed char INT8; /* signed 8bit */ typedef signed short INT16; /* signed 16bit */ typedef signed int INT32; /* signed 32bit */ #endif --=20 2.9.3 From nobody Tue May 7 03:12:09 2024 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.zoho.com; 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 1493882421652424.60033956440816; Thu, 4 May 2017 00:20:21 -0700 (PDT) Received: from localhost ([::1]:40044 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d6B3k-0002sJ-7X for importer@patchew.org; Thu, 04 May 2017 03:20:20 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34638) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d6B1u-0001UF-1W for qemu-devel@nongnu.org; Thu, 04 May 2017 03:18:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d6B1r-0004Ze-2z for qemu-devel@nongnu.org; Thu, 04 May 2017 03:18:25 -0400 Received: from mx1.redhat.com ([209.132.183.28]:56042) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d6B1q-0004Ya-TF for qemu-devel@nongnu.org; Thu, 04 May 2017 03:18:23 -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 mx1.redhat.com (Postfix) with ESMTPS id EB2F661BA5 for ; Thu, 4 May 2017 07:18:21 +0000 (UTC) Received: from nilsson.home.kraxel.org (ovpn-116-101.ams2.redhat.com [10.36.116.101]) by smtp.corp.redhat.com (Postfix) with ESMTP id 94B64183E3; Thu, 4 May 2017 07:18:21 +0000 (UTC) Received: by nilsson.home.kraxel.org (Postfix, from userid 500) id 3384880E25; Thu, 4 May 2017 09:18:16 +0200 (CEST) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com EB2F661BA5 Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=kraxel@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com EB2F661BA5 From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Thu, 4 May 2017 09:17:54 +0200 Message-Id: <20170504071811.3547-14-kraxel@redhat.com> In-Reply-To: <20170504071811.3547-1-kraxel@redhat.com> References: <20170504071811.3547-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Thu, 04 May 2017 07:18:22 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 13/30] audio: remove INT16 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: Gerd Hoffmann , Juan Quintela Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Juan Quintela Signed-off-by: Juan Quintela Message-id: 20170425223739.6703-10-quintela@redhat.com Signed-off-by: Gerd Hoffmann --- hw/audio/fmopl.h | 5 ++--- hw/audio/fmopl.c | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/hw/audio/fmopl.h b/hw/audio/fmopl.h index bede6717ae..0bc3415cd3 100644 --- a/hw/audio/fmopl.h +++ b/hw/audio/fmopl.h @@ -10,12 +10,11 @@ /* compiler dependence */ #ifndef OSD_CPU_H #define OSD_CPU_H -typedef signed short INT16; /* signed 16bit */ typedef signed int INT32; /* signed 32bit */ #endif =20 #if (OPL_OUTPUT_BIT=3D=3D16) -typedef INT16 OPLSAMPLE; +typedef int16_t OPLSAMPLE; #endif #if (OPL_OUTPUT_BIT=3D=3D8) typedef unsigned char OPLSAMPLE; @@ -142,5 +141,5 @@ int OPLWrite(FM_OPL *OPL,int a,int v); unsigned char OPLRead(FM_OPL *OPL,int a); int OPLTimerOver(FM_OPL *OPL,int c); =20 -void YM3812UpdateOne(FM_OPL *OPL, INT16 *buffer, int length); +void YM3812UpdateOne(FM_OPL *OPL, int16_t *buffer, int length); #endif diff --git a/hw/audio/fmopl.c b/hw/audio/fmopl.c index 47754e86b2..ebd3dbbf80 100644 --- a/hw/audio/fmopl.c +++ b/hw/audio/fmopl.c @@ -984,7 +984,7 @@ static void OPL_UnLockTable(void) /*************************************************************************= ******/ =20 /* ---------- update one of chip ----------- */ -void YM3812UpdateOne(FM_OPL *OPL, INT16 *buffer, int length) +void YM3812UpdateOne(FM_OPL *OPL, int16_t *buffer, int length) { int i; int data; --=20 2.9.3 From nobody Tue May 7 03:12:09 2024 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.zoho.com; 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 1493883063496766.7136873222288; Thu, 4 May 2017 00:31:03 -0700 (PDT) Received: from localhost ([::1]:40098 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d6BE6-0004Rr-4G for importer@patchew.org; Thu, 04 May 2017 03:31:02 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34765) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d6B1w-0001Uw-IF for qemu-devel@nongnu.org; Thu, 04 May 2017 03:18:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d6B1s-0004am-1h for qemu-devel@nongnu.org; Thu, 04 May 2017 03:18:28 -0400 Received: from mx1.redhat.com ([209.132.183.28]:45866) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d6B1r-0004Zt-Pt for qemu-devel@nongnu.org; Thu, 04 May 2017 03:18:24 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E4311C04B943 for ; Thu, 4 May 2017 07:18:22 +0000 (UTC) Received: from nilsson.home.kraxel.org (ovpn-116-101.ams2.redhat.com [10.36.116.101]) by smtp.corp.redhat.com (Postfix) with ESMTP id 148117EBF8; Thu, 4 May 2017 07:18:22 +0000 (UTC) Received: by nilsson.home.kraxel.org (Postfix, from userid 500) id 4431181011; Thu, 4 May 2017 09:18:16 +0200 (CEST) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com E4311C04B943 Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=kraxel@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com E4311C04B943 From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Thu, 4 May 2017 09:17:55 +0200 Message-Id: <20170504071811.3547-15-kraxel@redhat.com> In-Reply-To: <20170504071811.3547-1-kraxel@redhat.com> References: <20170504071811.3547-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Thu, 04 May 2017 07:18:23 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 14/30] audio: Remove INT32 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: Gerd Hoffmann , Juan Quintela Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Juan Quintela Signed-off-by: Juan Quintela Message-id: 20170425223739.6703-11-quintela@redhat.com Signed-off-by: Gerd Hoffmann --- hw/audio/fmopl.h | 54 ++++++++++++++++++++++++----------------------------= -- hw/audio/fmopl.c | 42 +++++++++++++++++++++--------------------- 2 files changed, 45 insertions(+), 51 deletions(-) diff --git a/hw/audio/fmopl.h b/hw/audio/fmopl.h index 0bc3415cd3..1e74019586 100644 --- a/hw/audio/fmopl.h +++ b/hw/audio/fmopl.h @@ -7,12 +7,6 @@ /* select bit size of output : 8 or 16 */ #define OPL_OUTPUT_BIT 16 =20 -/* compiler dependence */ -#ifndef OSD_CPU_H -#define OSD_CPU_H -typedef signed int INT32; /* signed 32bit */ -#endif - #if (OPL_OUTPUT_BIT=3D=3D16) typedef int16_t OPLSAMPLE; #endif @@ -36,13 +30,13 @@ typedef unsigned char (*OPL_PORTHANDLER_R)(int param); /* Saving is necessary for member of the 'R' mark for suspend/resume */ /* ---------- OPL one of slot ---------- */ typedef struct fm_opl_slot { - INT32 TL; /* total level :TL << 8 */ - INT32 TLL; /* adjusted now TL */ + int32_t TL; /* total level :TL << 8 */ + int32_t TLL; /* adjusted now TL */ uint8_t KSR; /* key scale rate :(shift down bit) */ - INT32 *AR; /* attack rate :&AR_TABLE[AR<<2] */ - INT32 *DR; /* decay rate :&DR_TALBE[DR<<2] */ - INT32 SL; /* sustin level :SL_TALBE[SL] */ - INT32 *RR; /* release rate :&DR_TABLE[RR<<2] */ + int32_t *AR; /* attack rate :&AR_TABLE[AR<<2] */ + int32_t *DR; /* decay rate :&DR_TALBE[DR<<2] */ + int32_t SL; /* sustin level :SL_TALBE[SL] */ + int32_t *RR; /* release rate :&DR_TABLE[RR<<2] */ uint8_t ksl; /* keyscale level :(shift down bits) */ uint8_t ksr; /* key scale rate :kcode>>KSR */ uint32_t mul; /* multiple :ML_TABLE[ML] */ @@ -51,17 +45,17 @@ typedef struct fm_opl_slot { /* envelope generator state */ uint8_t eg_typ; /* envelope type flag */ uint8_t evm; /* envelope phase */ - INT32 evc; /* envelope counter */ - INT32 eve; /* envelope counter end point */ - INT32 evs; /* envelope counter step */ - INT32 evsa; /* envelope step for AR :AR[ksr] */ - INT32 evsd; /* envelope step for DR :DR[ksr] */ - INT32 evsr; /* envelope step for RR :RR[ksr] */ + int32_t evc; /* envelope counter */ + int32_t eve; /* envelope counter end point */ + int32_t evs; /* envelope counter step */ + int32_t evsa; /* envelope step for AR :AR[ksr] */ + int32_t evsd; /* envelope step for DR :DR[ksr] */ + int32_t evsr; /* envelope step for RR :RR[ksr] */ /* LFO */ uint8_t ams; /* ams flag */ uint8_t vib; /* vibrate flag */ /* wave selector */ - INT32 **wavetable; + int32_t **wavetable; }OPL_SLOT; =20 /* ---------- OPL one of channel ---------- */ @@ -69,9 +63,9 @@ typedef struct fm_opl_channel { OPL_SLOT SLOT[2]; uint8_t CON; /* connection type */ uint8_t FB; /* feed back :(shift down bit) */ - INT32 *connect1; /* slot1 output pointer */ - INT32 *connect2; /* slot2 output pointer */ - INT32 op1_out[2]; /* slot1 output for selfeedback */ + int32_t *connect1; /* slot1 output pointer */ + int32_t *connect2; /* slot2 output pointer */ + int32_t op1_out[2]; /* slot1 output for selfeedback */ /* phase generator state */ uint32_t block_fnum; /* block+fnum : */ uint8_t kcode; /* key code : KeyScaleCode */ @@ -106,16 +100,16 @@ typedef struct fm_opl_f { OPL_PORTHANDLER_W keyboardhandler_w; int keyboard_param; /* time tables */ - INT32 AR_TABLE[75]; /* atttack rate tables */ - INT32 DR_TABLE[75]; /* decay rate tables */ + int32_t AR_TABLE[75]; /* atttack rate tables */ + int32_t DR_TABLE[75]; /* decay rate tables */ uint32_t FN_TABLE[1024]; /* fnumber -> increment counter */ /* LFO */ - INT32 *ams_table; - INT32 *vib_table; - INT32 amsCnt; - INT32 amsIncr; - INT32 vibCnt; - INT32 vibIncr; + int32_t *ams_table; + int32_t *vib_table; + int32_t amsCnt; + int32_t amsIncr; + int32_t vibCnt; + int32_t vibIncr; /* wave selector enable flag */ uint8_t wavesel; /* external event callback handler */ diff --git a/hw/audio/fmopl.c b/hw/audio/fmopl.c index ebd3dbbf80..8f935f62b6 100644 --- a/hw/audio/fmopl.c +++ b/hw/audio/fmopl.c @@ -170,7 +170,7 @@ static const uint32_t KSL_TABLE[8*16]=3D /* sustain lebel table (3db per step) */ /* 0 - 15: 0, 3, 6, 9,12,15,18,21,24,27,30,33,36,39,42,93 (dB)*/ #define SC(db) (db*((3/EG_STEP)*(1<connect1 =3D CH->CON ? carrier : &feedback2; CH->connect2 =3D carrier; } @@ -498,7 +498,7 @@ static inline void OPL_CALC_RH( OPL_CH *CH ) { uint32_t env_tam,env_sd,env_top,env_hh; int whitenoise =3D (rand()&1)*(WHITE_NOISE_db/EG_STEP); - INT32 tone8; + int32_t tone8; =20 OPL_SLOT *SLOT; int env_out; @@ -616,20 +616,20 @@ static int OPLOpenTable( void ) double pom; =20 /* allocate dynamic tables */ - if( (TL_TABLE =3D malloc(TL_MAX*2*sizeof(INT32))) =3D=3D NULL) + if( (TL_TABLE =3D malloc(TL_MAX*2*sizeof(int32_t))) =3D=3D NULL) return 0; - if( (SIN_TABLE =3D malloc(SIN_ENT*4 *sizeof(INT32 *))) =3D=3D NULL) + if( (SIN_TABLE =3D malloc(SIN_ENT*4 *sizeof(int32_t *))) =3D=3D NULL) { free(TL_TABLE); return 0; } - if( (AMS_TABLE =3D malloc(AMS_ENT*2 *sizeof(INT32))) =3D=3D NULL) + if( (AMS_TABLE =3D malloc(AMS_ENT*2 *sizeof(int32_t))) =3D=3D NULL) { free(TL_TABLE); free(SIN_TABLE); return 0; } - if( (VIB_TABLE =3D malloc(VIB_ENT*2 *sizeof(INT32))) =3D=3D NULL) + if( (VIB_TABLE =3D malloc(VIB_ENT*2 *sizeof(int32_t))) =3D=3D NULL) { free(TL_TABLE); free(SIN_TABLE); --=20 2.9.3 From nobody Tue May 7 03:12:09 2024 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.zoho.com; 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 1493883180259159.5330809292807; Thu, 4 May 2017 00:33:00 -0700 (PDT) Received: from localhost ([::1]:40107 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d6BFy-000675-8r for importer@patchew.org; Thu, 04 May 2017 03:32:58 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34652) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d6B1u-0001UR-IO for qemu-devel@nongnu.org; Thu, 04 May 2017 03:18:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d6B1r-0004Zl-4M for qemu-devel@nongnu.org; Thu, 04 May 2017 03:18:26 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57888) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d6B1q-0004Yp-VO for qemu-devel@nongnu.org; Thu, 04 May 2017 03:18:23 -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 mx1.redhat.com (Postfix) with ESMTPS id 0655DC059735 for ; Thu, 4 May 2017 07:18:22 +0000 (UTC) Received: from nilsson.home.kraxel.org (ovpn-116-101.ams2.redhat.com [10.36.116.101]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9FFE6183ED; Thu, 4 May 2017 07:18:21 +0000 (UTC) Received: by nilsson.home.kraxel.org (Postfix, from userid 500) id 56A4881015; Thu, 4 May 2017 09:18:16 +0200 (CEST) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 0655DC059735 Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=kraxel@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 0655DC059735 From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Thu, 4 May 2017 09:17:56 +0200 Message-Id: <20170504071811.3547-16-kraxel@redhat.com> In-Reply-To: <20170504071811.3547-1-kraxel@redhat.com> References: <20170504071811.3547-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Thu, 04 May 2017 07:18:22 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 15/30] audio: Unfold OPLSAMPLE 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: Gerd Hoffmann , Juan Quintela Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Juan Quintela It was used only once, and now it was always int16_t. Signed-off-by: Juan Quintela Message-id: 20170425223739.6703-12-quintela@redhat.com Signed-off-by: Gerd Hoffmann --- hw/audio/fmopl.h | 11 ----------- hw/audio/fmopl.c | 2 +- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/hw/audio/fmopl.h b/hw/audio/fmopl.h index 1e74019586..c23628724c 100644 --- a/hw/audio/fmopl.h +++ b/hw/audio/fmopl.h @@ -3,17 +3,6 @@ =20 #include =20 -/* --- system optimize --- */ -/* select bit size of output : 8 or 16 */ -#define OPL_OUTPUT_BIT 16 - -#if (OPL_OUTPUT_BIT=3D=3D16) -typedef int16_t OPLSAMPLE; -#endif -#if (OPL_OUTPUT_BIT=3D=3D8) -typedef unsigned char OPLSAMPLE; -#endif - typedef void (*OPL_TIMERHANDLER)(int channel,double interval_Sec); typedef void (*OPL_IRQHANDLER)(int param,int irq); typedef void (*OPL_UPDATEHANDLER)(int param,int min_interval_us); diff --git a/hw/audio/fmopl.c b/hw/audio/fmopl.c index 8f935f62b6..b1cb4b46d6 100644 --- a/hw/audio/fmopl.c +++ b/hw/audio/fmopl.c @@ -988,7 +988,7 @@ void YM3812UpdateOne(FM_OPL *OPL, int16_t *buffer, int = length) { int i; int data; - OPLSAMPLE *buf =3D buffer; + int16_t *buf =3D buffer; uint32_t amsCnt =3D OPL->amsCnt; uint32_t vibCnt =3D OPL->vibCnt; uint8_t rhythm =3D OPL->rhythm&0x20; --=20 2.9.3 From nobody Tue May 7 03:12:09 2024 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.zoho.com; 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 1493883629429620.0608876371593; Thu, 4 May 2017 00:40:29 -0700 (PDT) Received: from localhost ([::1]:40170 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d6BNE-0003hm-2Y for importer@patchew.org; Thu, 04 May 2017 03:40:28 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34742) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d6B1v-0001Ud-S1 for qemu-devel@nongnu.org; Thu, 04 May 2017 03:18:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d6B1s-0004c4-Jo for qemu-devel@nongnu.org; Thu, 04 May 2017 03:18:27 -0400 Received: from mx1.redhat.com ([209.132.183.28]:45886) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d6B1s-0004aF-ES for qemu-devel@nongnu.org; Thu, 04 May 2017 03:18:24 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 38017C04B946 for ; Thu, 4 May 2017 07:18:23 +0000 (UTC) Received: from nilsson.home.kraxel.org (ovpn-116-101.ams2.redhat.com [10.36.116.101]) by smtp.corp.redhat.com (Postfix) with ESMTP id 307C61837F; Thu, 4 May 2017 07:18:22 +0000 (UTC) Received: by nilsson.home.kraxel.org (Postfix, from userid 500) id 6ABD780FD5; Thu, 4 May 2017 09:18:16 +0200 (CEST) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 38017C04B946 Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=kraxel@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 38017C04B946 From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Thu, 4 May 2017 09:17:57 +0200 Message-Id: <20170504071811.3547-17-kraxel@redhat.com> In-Reply-To: <20170504071811.3547-1-kraxel@redhat.com> References: <20170504071811.3547-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Thu, 04 May 2017 07:18:23 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 16/30] audio: Remove Unused OPL_TYPE_* 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: Gerd Hoffmann , Juan Quintela Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Juan Quintela Since we removed the previous unused devices, they are not used anymore. Signed-off-by: Juan Quintela Message-id: 20170425223739.6703-13-quintela@redhat.com Signed-off-by: Gerd Hoffmann --- hw/audio/fmopl.h | 3 --- hw/audio/fmopl.c | 16 ---------------- 2 files changed, 19 deletions(-) diff --git a/hw/audio/fmopl.h b/hw/audio/fmopl.h index c23628724c..8ef0b3e3c3 100644 --- a/hw/audio/fmopl.h +++ b/hw/audio/fmopl.h @@ -12,9 +12,6 @@ typedef unsigned char (*OPL_PORTHANDLER_R)(int param); /* !!!!! here is private section , do not access there member direct !!!!!= */ =20 #define OPL_TYPE_WAVESEL 0x01 /* waveform select */ -#define OPL_TYPE_ADPCM 0x02 /* DELTA-T ADPCM unit */ -#define OPL_TYPE_KEYBOARD 0x04 /* keyboard interface */ -#define OPL_TYPE_IO 0x08 /* I/O port */ =20 /* Saving is necessary for member of the 'R' mark for suspend/resume */ /* ---------- OPL one of slot ---------- */ diff --git a/hw/audio/fmopl.c b/hw/audio/fmopl.c index b1cb4b46d6..9171001030 100644 --- a/hw/audio/fmopl.c +++ b/hw/audio/fmopl.c @@ -1188,28 +1188,12 @@ unsigned char OPLRead(FM_OPL *OPL,int a) switch(OPL->address) { case 0x05: /* KeyBoard IN */ - if(OPL->type&OPL_TYPE_KEYBOARD) - { - if(OPL->keyboardhandler_r) - return OPL->keyboardhandler_r(OPL->keyboard_param); - else { - LOG(LOG_WAR,("OPL:read unmapped KEYBOARD port\n")); - } - } return 0; #if 0 case 0x0f: /* ADPCM-DATA */ return 0; #endif case 0x19: /* I/O DATA */ - if(OPL->type&OPL_TYPE_IO) - { - if(OPL->porthandler_r) - return OPL->porthandler_r(OPL->port_param); - else { - LOG(LOG_WAR,("OPL:read unmapped I/O port\n")); - } - } return 0; case 0x1a: /* PCM-DATA */ return 0; --=20 2.9.3 From nobody Tue May 7 03:12:09 2024 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.zoho.com; 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 1493882943032381.0402472945914; Thu, 4 May 2017 00:29:03 -0700 (PDT) Received: from localhost ([::1]:40085 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d6BC9-0002fo-JJ for importer@patchew.org; Thu, 04 May 2017 03:29:01 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34679) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d6B1v-0001UU-1G for qemu-devel@nongnu.org; Thu, 04 May 2017 03:18:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d6B1r-0004aP-Sz for qemu-devel@nongnu.org; Thu, 04 May 2017 03:18:27 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33120) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d6B1r-0004ZQ-KW for qemu-devel@nongnu.org; Thu, 04 May 2017 03:18:23 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id ACB484E047 for ; Thu, 4 May 2017 07:18:22 +0000 (UTC) Received: from nilsson.home.kraxel.org (ovpn-116-101.ams2.redhat.com [10.36.116.101]) by smtp.corp.redhat.com (Postfix) with ESMTP id 00BAF7EDA8; Thu, 4 May 2017 07:18:21 +0000 (UTC) Received: by nilsson.home.kraxel.org (Postfix, from userid 500) id 7E0F3810D2; Thu, 4 May 2017 09:18:16 +0200 (CEST) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com ACB484E047 Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=kraxel@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com ACB484E047 From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Thu, 4 May 2017 09:17:58 +0200 Message-Id: <20170504071811.3547-18-kraxel@redhat.com> In-Reply-To: <20170504071811.3547-1-kraxel@redhat.com> References: <20170504071811.3547-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Thu, 04 May 2017 07:18:22 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 17/30] audio: Remove type field 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: Gerd Hoffmann , Juan Quintela Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Juan Quintela It was not used anymore as now there is only one type of devices. Signed-off-by: Juan Quintela Message-id: 20170425223739.6703-14-quintela@redhat.com Signed-off-by: Gerd Hoffmann --- hw/audio/fmopl.h | 7 +------ hw/audio/adlib.c | 2 +- hw/audio/fmopl.c | 20 ++++++++------------ 3 files changed, 10 insertions(+), 19 deletions(-) diff --git a/hw/audio/fmopl.h b/hw/audio/fmopl.h index 8ef0b3e3c3..df790a0b7d 100644 --- a/hw/audio/fmopl.h +++ b/hw/audio/fmopl.h @@ -11,8 +11,6 @@ typedef unsigned char (*OPL_PORTHANDLER_R)(int param); =20 /* !!!!! here is private section , do not access there member direct !!!!!= */ =20 -#define OPL_TYPE_WAVESEL 0x01 /* waveform select */ - /* Saving is necessary for member of the 'R' mark for suspend/resume */ /* ---------- OPL one of slot ---------- */ typedef struct fm_opl_slot { @@ -62,7 +60,6 @@ typedef struct fm_opl_channel { =20 /* OPL state */ typedef struct fm_opl_f { - uint8_t type; /* chip type */ int clock; /* master clock (Hz) */ int rate; /* sampling rate (Hz) */ double freqbase; /* frequency base */ @@ -108,9 +105,7 @@ typedef struct fm_opl_f { } FM_OPL; =20 /* ---------- Generic interface section ---------- */ -#define OPL_TYPE_YM3812 (OPL_TYPE_WAVESEL) - -FM_OPL *OPLCreate(int type, int clock, int rate); +FM_OPL *OPLCreate(int clock, int rate); void OPLDestroy(FM_OPL *OPL); void OPLSetTimerHandler(FM_OPL *OPL,OPL_TIMERHANDLER TimerHandler,int chan= nelOffset); void OPLSetIRQHandler(FM_OPL *OPL,OPL_IRQHANDLER IRQHandler,int param); diff --git a/hw/audio/adlib.c b/hw/audio/adlib.c index f9adcd709a..09b8248cda 100644 --- a/hw/audio/adlib.c +++ b/hw/audio/adlib.c @@ -265,7 +265,7 @@ static void adlib_realizefn (DeviceState *dev, Error **= errp) } glob_adlib =3D s; =20 - s->opl =3D OPLCreate (OPL_TYPE_YM3812, 3579545, s->freq); + s->opl =3D OPLCreate (3579545, s->freq); if (!s->opl) { error_setg (errp, "OPLCreate %d failed", s->freq); return; diff --git a/hw/audio/fmopl.c b/hw/audio/fmopl.c index 9171001030..48db828a49 100644 --- a/hw/audio/fmopl.c +++ b/hw/audio/fmopl.c @@ -761,18 +761,15 @@ static void OPLWriteReg(FM_OPL *OPL, int r, int v) { case 0x01: /* wave selector enable */ - if(OPL->type&OPL_TYPE_WAVESEL) + OPL->wavesel =3D v&0x20; + if(!OPL->wavesel) { - OPL->wavesel =3D v&0x20; - if(!OPL->wavesel) + /* preset compatible mode */ + int c; + for(c=3D0;cmax_ch;c++) { - /* preset compatible mode */ - int c; - for(c=3D0;cmax_ch;c++) - { - OPL->P_CH[c].SLOT[SLOT1].wavetable =3D &SIN_TABLE[0]; - OPL->P_CH[c].SLOT[SLOT2].wavetable =3D &SIN_TABLE[0]; - } + OPL->P_CH[c].SLOT[SLOT1].wavetable =3D &SIN_TABLE[0]; + OPL->P_CH[c].SLOT[SLOT2].wavetable =3D &SIN_TABLE[0]; } } return; @@ -1076,7 +1073,7 @@ void OPLResetChip(FM_OPL *OPL) =20 /* ---------- Create one of vietual YM3812 ---------- */ /* 'rate' is sampling rate and 'bufsiz' is the size of the */ -FM_OPL *OPLCreate(int type, int clock, int rate) +FM_OPL *OPLCreate(int clock, int rate) { char *ptr; FM_OPL *OPL; @@ -1095,7 +1092,6 @@ FM_OPL *OPLCreate(int type, int clock, int rate) OPL =3D (FM_OPL *)ptr; ptr+=3Dsizeof(FM_OPL); OPL->P_CH =3D (OPL_CH *)ptr; ptr+=3Dsizeof(OPL_CH)*max_ch; /* set channel state pointer */ - OPL->type =3D type; OPL->clock =3D clock; OPL->rate =3D rate; OPL->max_ch =3D max_ch; --=20 2.9.3 From nobody Tue May 7 03:12:09 2024 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.zoho.com; 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 1493882938197846.3309217881417; Thu, 4 May 2017 00:28:58 -0700 (PDT) Received: from localhost ([::1]:40084 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d6BC4-0002aj-1i for importer@patchew.org; Thu, 04 May 2017 03:28:56 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34691) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d6B1v-0001UW-4e for qemu-devel@nongnu.org; Thu, 04 May 2017 03:18:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d6B1s-0004b7-6s for qemu-devel@nongnu.org; Thu, 04 May 2017 03:18:27 -0400 Received: from mx1.redhat.com ([209.132.183.28]:45878) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d6B1s-0004Zz-0t for qemu-devel@nongnu.org; Thu, 04 May 2017 03:18:24 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1D0B0C04B941 for ; Thu, 4 May 2017 07:18:23 +0000 (UTC) Received: from nilsson.home.kraxel.org (ovpn-116-101.ams2.redhat.com [10.36.116.101]) by smtp.corp.redhat.com (Postfix) with ESMTP id A451817D8E; Thu, 4 May 2017 07:18:22 +0000 (UTC) Received: by nilsson.home.kraxel.org (Postfix, from userid 500) id 8FACA814D9; Thu, 4 May 2017 09:18:16 +0200 (CEST) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 1D0B0C04B941 Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=kraxel@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 1D0B0C04B941 From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Thu, 4 May 2017 09:17:59 +0200 Message-Id: <20170504071811.3547-19-kraxel@redhat.com> In-Reply-To: <20170504071811.3547-1-kraxel@redhat.com> References: <20170504071811.3547-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Thu, 04 May 2017 07:18:23 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 18/30] audio: Remove unused fields 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: Gerd Hoffmann , Juan Quintela Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Juan Quintela These were used for the remove stuff. Signed-off-by: Juan Quintela Message-id: 20170425223739.6703-15-quintela@redhat.com Signed-off-by: Gerd Hoffmann --- hw/audio/fmopl.h | 6 ------ 1 file changed, 6 deletions(-) diff --git a/hw/audio/fmopl.h b/hw/audio/fmopl.h index df790a0b7d..8730ead531 100644 --- a/hw/audio/fmopl.h +++ b/hw/audio/fmopl.h @@ -76,12 +76,6 @@ typedef struct fm_opl_f { int max_ch; /* maximum channel */ /* Rhythm sention */ uint8_t rhythm; /* Rhythm mode , key flag */ - OPL_PORTHANDLER_R porthandler_r; - OPL_PORTHANDLER_W porthandler_w; - int port_param; - OPL_PORTHANDLER_R keyboardhandler_r; - OPL_PORTHANDLER_W keyboardhandler_w; - int keyboard_param; /* time tables */ int32_t AR_TABLE[75]; /* atttack rate tables */ int32_t DR_TABLE[75]; /* decay rate tables */ --=20 2.9.3 From nobody Tue May 7 03:12:09 2024 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.zoho.com; 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 1493883949405518.3178121781175; Thu, 4 May 2017 00:45:49 -0700 (PDT) Received: from localhost ([::1]:40212 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d6BSO-0007pT-1Y for importer@patchew.org; Thu, 04 May 2017 03:45:48 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34851) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d6B1y-0001Wa-8s for qemu-devel@nongnu.org; Thu, 04 May 2017 03:18:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d6B1t-0004d8-9V for qemu-devel@nongnu.org; Thu, 04 May 2017 03:18:30 -0400 Received: from mx1.redhat.com ([209.132.183.28]:56068) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d6B1t-0004bP-0N for qemu-devel@nongnu.org; Thu, 04 May 2017 03:18:25 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0D50D61D05 for ; Thu, 4 May 2017 07:18:24 +0000 (UTC) Received: from nilsson.home.kraxel.org (ovpn-116-101.ams2.redhat.com [10.36.116.101]) by smtp.corp.redhat.com (Postfix) with ESMTP id DCD025DD67; Thu, 4 May 2017 07:18:22 +0000 (UTC) Received: by nilsson.home.kraxel.org (Postfix, from userid 500) id A4D15814DA; Thu, 4 May 2017 09:18:16 +0200 (CEST) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 0D50D61D05 Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=kraxel@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 0D50D61D05 From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Thu, 4 May 2017 09:18:00 +0200 Message-Id: <20170504071811.3547-20-kraxel@redhat.com> In-Reply-To: <20170504071811.3547-1-kraxel@redhat.com> References: <20170504071811.3547-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Thu, 04 May 2017 07:18:24 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 19/30] audio: GUSbyte is uint8_t 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: Gerd Hoffmann , Juan Quintela Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Juan Quintela Signed-off-by: Juan Quintela Message-id: 20170425223739.6703-16-quintela@redhat.com Signed-off-by: Gerd Hoffmann --- hw/audio/gusemu.h | 6 ++--- hw/audio/gusemu_hal.c | 58 ++++++++++++++++++++++++---------------------= ---- hw/audio/gusemu_mixer.c | 4 ++-- 3 files changed, 33 insertions(+), 35 deletions(-) diff --git a/hw/audio/gusemu.h b/hw/audio/gusemu.h index 9aec7bf8e7..3a69222281 100644 --- a/hw/audio/gusemu.h +++ b/hw/audio/gusemu.h @@ -28,14 +28,12 @@ /* data types (need to be adjusted if neither a VC6 nor a C99 compatible c= ompiler is used) */ =20 #if defined _WIN32 && defined _MSC_VER /* doesn't support other win32 comp= ilers yet, do it yourself... */ - typedef unsigned char GUSbyte; typedef unsigned short GUSword; typedef unsigned int GUSdword; typedef signed char GUSchar; typedef signed short GUSsample; #else typedef int8_t GUSchar; - typedef uint8_t GUSbyte; typedef uint16_t GUSword; typedef uint32_t GUSdword; typedef int16_t GUSsample; @@ -43,8 +41,8 @@ =20 typedef struct _GUSEmuState { - GUSbyte *himemaddr; /* 1024*1024 bytes used for storing uploaded samples = (+32 additional bytes for read padding) */ - GUSbyte *gusdatapos; /* (gusdataend-gusdata) bytes used for storing emula= ted GF1/mixer register states (32*32+4 bytes in initial GUSemu32 version) */ + uint8_t *himemaddr; /* 1024*1024 bytes used for storing uploaded samples = (+32 additional bytes for read padding) */ + uint8_t *gusdatapos; /* (gusdataend-gusdata) bytes used for storing emula= ted GF1/mixer register states (32*32+4 bytes in initial GUSemu32 version) */ uint32_t gusirq; uint32_t gusdma; unsigned int timer1fraction; diff --git a/hw/audio/gusemu_hal.c b/hw/audio/gusemu_hal.c index 973d6b9f4f..444a2bbb22 100644 --- a/hw/audio/gusemu_hal.c +++ b/hw/audio/gusemu_hal.c @@ -39,7 +39,7 @@ unsigned int gus_read(GUSEmuState * state, int port, int = size) { int value_read =3D 0; =20 - GUSbyte *gusptr; + uint8_t *gusptr; gusptr =3D state->gusdatapos; GUSregd(portaccesses)++; =20 @@ -125,7 +125,7 @@ unsigned int gus_read(GUSEmuState * state, int port, in= t size) if (!GUSregb(IRQStatReg2x6)) GUS_irqclear(state, state->gusirq); } - return (GUSbyte) value_read; + return (uint8_t) value_read; /* DramDMAmemPosReg */ /* case 0x42: value_read=3DGUSregw(GUS42DMAStart); break;*/ /* 43h+44h write only */ @@ -178,7 +178,7 @@ unsigned int gus_read(GUSEmuState * state, int port, in= t size) /* return 0xff; */ /* Pre 3.6 boards, ICS mixer NOT present */ case 0x307: /* DRAMaccess */ { - GUSbyte *adr; + uint8_t *adr; adr =3D state->himemaddr + (GUSregd(GUSDRAMPOS24bit) & 0xfffff= ); return *adr; } @@ -189,14 +189,14 @@ unsigned int gus_read(GUSEmuState * state, int port, = int size) =20 void gus_write(GUSEmuState * state, int port, int size, unsigned int data) { - GUSbyte *gusptr; + uint8_t *gusptr; gusptr =3D state->gusdatapos; GUSregd(portaccesses)++; =20 switch (port & 0xff0f) { case 0x200: /* MixerCtrlReg */ - GUSregb(MixerCtrlReg2x0) =3D (GUSbyte) data; + GUSregb(MixerCtrlReg2x0) =3D (uint8_t) data; break; case 0x206: /* IRQstatReg / SB2x6IRQ */ if (GUSregb(GUS45TimerCtrl) & 0x20) /* SB IRQ enabled? -> set 2x6I= RQ bit */ @@ -208,7 +208,7 @@ void gus_write(GUSEmuState * state, int port, int size,= unsigned int data) break; case 0x308: /* AdLib 388h */ case 0x208: /* AdLibCommandReg */ - GUSregb(AdLibCommand2xA) =3D (GUSbyte) data; + GUSregb(AdLibCommand2xA) =3D (uint8_t) data; break; case 0x309: /* AdLib 389h */ case 0x209: /* AdLibDataReg */ @@ -217,11 +217,11 @@ void gus_write(GUSEmuState * state, int port, int siz= e, unsigned int data) if (data & 0x80) GUSregb(TimerStatus2x8) &=3D 0x1f; /* AdLib IRQ reset? -> = clear maskable adl. timer int regs */ else - GUSregb(TimerDataReg2x9) =3D (GUSbyte) data; + GUSregb(TimerDataReg2x9) =3D (uint8_t) data; } else { - GUSregb(AdLibData2x9) =3D (GUSbyte) data; + GUSregb(AdLibData2x9) =3D (uint8_t) data; if (GUSregb(GUS45TimerCtrl) & 0x02) { GUSregb(TimerStatus2x8) |=3D 0x01; @@ -231,16 +231,16 @@ void gus_write(GUSEmuState * state, int port, int siz= e, unsigned int data) } break; case 0x20A: - GUSregb(AdLibStatus2x8) =3D (GUSbyte) data; + GUSregb(AdLibStatus2x8) =3D (uint8_t) data; break; /* AdLibStatus2x8 */ case 0x20B: /* GUS hidden registers */ switch (GUSregb(RegCtrl_2xF) & 0x7) { case 0: if (GUSregb(MixerCtrlReg2x0) & 0x40) - GUSregb(IRQ_2xB) =3D (GUSbyte) data; /* control register s= elect bit */ + GUSregb(IRQ_2xB) =3D (uint8_t) data; /* control register s= elect bit */ else - GUSregb(DMA_2xB) =3D (GUSbyte) data; + GUSregb(DMA_2xB) =3D (uint8_t) data; break; /* case 1-4: general purpose emulation regs */ case 5: /* clear stat reg 2xF */ @@ -249,7 +249,7 @@ void gus_write(GUSEmuState * state, int port, int size,= unsigned int data) GUS_irqclear(state, state->gusirq); break; case 6: /* Jumper reg (Joystick= /MIDI enable) */ - GUSregb(Jumper_2xB) =3D (GUSbyte) data; + GUSregb(Jumper_2xB) =3D (uint8_t) data; break; default:; } @@ -262,20 +262,20 @@ void gus_write(GUSEmuState * state, int port, int siz= e, unsigned int data) GUS_irqrequest(state, state->gusirq, 1); } case 0x20D: /* SB2xCd no IRQ */ - GUSregb(SB2xCd) =3D (GUSbyte) data; + GUSregb(SB2xCd) =3D (uint8_t) data; break; case 0x20E: /* SB2xE */ - GUSregb(SB2xE) =3D (GUSbyte) data; + GUSregb(SB2xE) =3D (uint8_t) data; break; case 0x20F: - GUSregb(RegCtrl_2xF) =3D (GUSbyte) data; + GUSregb(RegCtrl_2xF) =3D (uint8_t) data; break; /* CtrlReg2xF */ case 0x302: /* VoiceSelReg */ - GUSregb(VoiceSelReg3x2) =3D (GUSbyte) data; + GUSregb(VoiceSelReg3x2) =3D (uint8_t) data; break; case 0x303: /* FunkSelReg */ - GUSregb(FunkSelReg3x3) =3D (GUSbyte) data; - if ((GUSbyte) data =3D=3D 0x8f) /* set irqstatreg, get voicereg an= d clear IRQ */ + GUSregb(FunkSelReg3x3) =3D (uint8_t) data; + if ((uint8_t) data =3D=3D 0x8f) /* set irqstatreg, get voicereg an= d clear IRQ */ { int voice; if (GUSregd(voicewavetableirq)) /* WavetableIRQ */ @@ -358,12 +358,12 @@ void gus_write(GUSEmuState * state, int port, int siz= e, unsigned int data) break; /* voice unspecific functions */ case 0x0e: /* NumVoices */ - GUSregb(NumVoices) =3D (GUSbyte) data; + GUSregb(NumVoices) =3D (uint8_t) data; break; /* case 0x0f: */ /* read only */ /* common functions */ case 0x41: /* DramDMAContrReg */ - GUSregb(GUS41DMACtrl) =3D (GUSbyte) data; + GUSregb(GUS41DMACtrl) =3D (uint8_t) data; if (data & 0x01) GUS_dmarequest(state); break; @@ -380,7 +380,7 @@ void gus_write(GUSEmuState * state, int port, int size,= unsigned int data) (GUSregd(GUSDRAMPOS24bit) & 0xffff) | ((data & 0x0f) <= < 16); break; case 0x45: /* TCtrlReg */ - GUSregb(GUS45TimerCtrl) =3D (GUSbyte) data; + GUSregb(GUS45TimerCtrl) =3D (uint8_t) data; if (!(data & 0x20)) GUSregb(TimerStatus2x8) &=3D 0xe7; /* sb IRQ dis? -= > clear 2x8/2xC sb IRQ flags */ if (!(data & 0x02)) @@ -434,18 +434,18 @@ void gus_write(GUSEmuState * state, int port, int siz= e, unsigned int data) GUS_irqclear(state, state->gusirq); break; case 0x46: /* Counter1 */ - GUSregb(GUS46Counter1) =3D (GUSbyte) data; + GUSregb(GUS46Counter1) =3D (uint8_t) data; break; case 0x47: /* Counter2 */ - GUSregb(GUS47Counter2) =3D (GUSbyte) data; + GUSregb(GUS47Counter2) =3D (uint8_t) data; break; /* case 0x48: */ /* sampling freq reg not emulated (same= as interwave) */ case 0x49: /* SampCtrlReg */ - GUSregb(GUS49SampCtrl) =3D (GUSbyte) data; + GUSregb(GUS49SampCtrl) =3D (uint8_t) data; break; /* case 0x4b: */ /* joystick trim not emulated */ case 0x4c: /* GUSreset */ - GUSregb(GUS4cReset) =3D (GUSbyte) data; + GUSregb(GUS4cReset) =3D (uint8_t) data; if (!(GUSregb(GUS4cReset) & 1)) /* reset... */ { GUSregd(voicewavetableirq) =3D 0; @@ -471,9 +471,9 @@ void gus_write(GUSEmuState * state, int port, int size,= unsigned int data) break; case 0x307: /* DRAMaccess */ { - GUSbyte *adr; + uint8_t *adr; adr =3D state->himemaddr + (GUSregd(GUSDRAMPOS24bit) & 0xfffff= ); - *adr =3D (GUSbyte) data; + *adr =3D (uint8_t) data; } break; } @@ -510,7 +510,7 @@ void gus_dma_transferdata(GUSEmuState * state, char *dm= a_addr, unsigned int coun char *srcaddr; char *destaddr; char msbmask =3D 0; - GUSbyte *gusptr; + uint8_t *gusptr; gusptr =3D state->gusdatapos; =20 srcaddr =3D dma_addr; /* system memory address */ @@ -522,7 +522,7 @@ void gus_dma_transferdata(GUSEmuState * state, char *dm= a_addr, unsigned int coun } =20 GUSregw(GUS42DMAStart) +=3D (GUSword) (count >> 4); = /* ToDo: add 16bit GUS page limit? */ - GUSregb(GUS50DMAHigh) =3D (GUSbyte) ((count + GUSregb(GUS50DMAHigh))= & 0xf); /* ToDo: add 16bit GUS page limit? */ + GUSregb(GUS50DMAHigh) =3D (uint8_t) ((count + GUSregb(GUS50DMAHigh))= & 0xf); /* ToDo: add 16bit GUS page limit? */ =20 if (GUSregb(GUS41DMACtrl) & 0x02) /* direction, 0 :=3D sysram->gusra= m */ { diff --git a/hw/audio/gusemu_mixer.c b/hw/audio/gusemu_mixer.c index 701e8fb0ed..d255ac821d 100644 --- a/hw/audio/gusemu_mixer.c +++ b/hw/audio/gusemu_mixer.c @@ -37,7 +37,7 @@ void gus_mixvoices(GUSEmuState * state, unsigned int play= back_freq, unsigned int GUSsample *bufferpos) { /* note that byte registers are stored in the upper half of each voice= register! */ - GUSbyte *gusptr; + uint8_t *gusptr; int Voice; GUSword *voiceptr; =20 @@ -187,7 +187,7 @@ void gus_irqgen(GUSEmuState * state, unsigned int elaps= ed_time) /* time given in microseconds */ { int requestedIRQs =3D 0; - GUSbyte *gusptr; + uint8_t *gusptr; gusptr =3D state->gusdatapos; if (GUSregb(TimerDataReg2x9) & 1) /* start timer 1 (80us decrement rat= e) */ { --=20 2.9.3 From nobody Tue May 7 03:12:09 2024 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.zoho.com; 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 1493883553172442.28501542148604; Thu, 4 May 2017 00:39:13 -0700 (PDT) Received: from localhost ([::1]:40150 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d6BLz-0002o3-Ub for importer@patchew.org; Thu, 04 May 2017 03:39:11 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34738) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d6B1v-0001Uc-Q7 for qemu-devel@nongnu.org; Thu, 04 May 2017 03:18:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d6B1s-0004br-Hh for qemu-devel@nongnu.org; Thu, 04 May 2017 03:18:27 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33140) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d6B1s-0004aA-BV for qemu-devel@nongnu.org; Thu, 04 May 2017 03:18:24 -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 mx1.redhat.com (Postfix) with ESMTPS id 6BF504ACB6 for ; Thu, 4 May 2017 07:18:23 +0000 (UTC) Received: from nilsson.home.kraxel.org (ovpn-116-101.ams2.redhat.com [10.36.116.101]) by smtp.corp.redhat.com (Postfix) with ESMTP id DF9B2183EE; Thu, 4 May 2017 07:18:22 +0000 (UTC) Received: by nilsson.home.kraxel.org (Postfix, from userid 500) id B632D814DB; Thu, 4 May 2017 09:18:16 +0200 (CEST) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 6BF504ACB6 Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=kraxel@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 6BF504ACB6 From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Thu, 4 May 2017 09:18:01 +0200 Message-Id: <20170504071811.3547-21-kraxel@redhat.com> In-Reply-To: <20170504071811.3547-1-kraxel@redhat.com> References: <20170504071811.3547-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Thu, 04 May 2017 07:18:23 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 20/30] audio: remove GUSchar 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: Gerd Hoffmann , Juan Quintela Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Juan Quintela Signed-off-by: Juan Quintela Message-id: 20170425223739.6703-17-quintela@redhat.com Signed-off-by: Gerd Hoffmann --- hw/audio/gusemu.h | 2 -- hw/audio/gusemu_mixer.c | 8 ++++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/hw/audio/gusemu.h b/hw/audio/gusemu.h index 3a69222281..1c1a63cc0f 100644 --- a/hw/audio/gusemu.h +++ b/hw/audio/gusemu.h @@ -30,10 +30,8 @@ #if defined _WIN32 && defined _MSC_VER /* doesn't support other win32 comp= ilers yet, do it yourself... */ typedef unsigned short GUSword; typedef unsigned int GUSdword; - typedef signed char GUSchar; typedef signed short GUSsample; #else - typedef int8_t GUSchar; typedef uint16_t GUSword; typedef uint32_t GUSdword; typedef int16_t GUSsample; diff --git a/hw/audio/gusemu_mixer.c b/hw/audio/gusemu_mixer.c index d255ac821d..b189db990c 100644 --- a/hw/audio/gusemu_mixer.c +++ b/hw/audio/gusemu_mixer.c @@ -85,16 +85,16 @@ void gus_mixvoices(GUSEmuState * state, unsigned int pl= ayback_freq, unsigned int if (GUSvoice(wVSRControl) & 0x400) /* 16bit */ { int offset =3D ((CurrPos >> 9) & 0xc0000) + (((CurrPos= >> 9) & 0x1ffff) << 1); - GUSchar *adr; - adr =3D (GUSchar *) state->himemaddr + offset; + int8_t *adr; + adr =3D (int8_t *) state->himemaddr + offset; sample1 =3D (*adr & 0xff) + (*(adr + 1) * 256); sample2 =3D (*(adr + 2) & 0xff) + (*(adr + 2 + 1) * 25= 6); } else /* 8bit */ { int offset =3D (CurrPos >> 9) & 0xfffff; - GUSchar *adr; - adr =3D (GUSchar *) state->himemaddr + offset; + int8_t *adr; + adr =3D (int8_t *) state->himemaddr + offset; sample1 =3D (*adr) * 256; sample2 =3D (*(adr + 1)) * 256; } --=20 2.9.3 From nobody Tue May 7 03:12:09 2024 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.zoho.com; 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 1493883283456603.4154352972707; Thu, 4 May 2017 00:34:43 -0700 (PDT) Received: from localhost ([::1]:40111 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d6BHd-0007I2-23 for importer@patchew.org; Thu, 04 May 2017 03:34:41 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34724) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d6B1v-0001UY-Hd for qemu-devel@nongnu.org; Thu, 04 May 2017 03:18:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d6B1s-0004cE-Kv for qemu-devel@nongnu.org; Thu, 04 May 2017 03:18:27 -0400 Received: from mx1.redhat.com ([209.132.183.28]:56060) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d6B1s-0004aD-FI for qemu-devel@nongnu.org; Thu, 04 May 2017 03:18:24 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7BB3B61BA9 for ; Thu, 4 May 2017 07:18:23 +0000 (UTC) Received: from nilsson.home.kraxel.org (ovpn-116-101.ams2.redhat.com [10.36.116.101]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3365474ABE; Thu, 4 May 2017 07:18:22 +0000 (UTC) Received: by nilsson.home.kraxel.org (Postfix, from userid 500) id C69B3815F6; Thu, 4 May 2017 09:18:16 +0200 (CEST) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 7BB3B61BA9 Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=kraxel@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 7BB3B61BA9 From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Thu, 4 May 2017 09:18:02 +0200 Message-Id: <20170504071811.3547-22-kraxel@redhat.com> In-Reply-To: <20170504071811.3547-1-kraxel@redhat.com> References: <20170504071811.3547-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Thu, 04 May 2017 07:18:23 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 21/30] audio: GUSword is uint16_t 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: Gerd Hoffmann , Juan Quintela Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Juan Quintela Signed-off-by: Juan Quintela Message-id: 20170425223739.6703-18-quintela@redhat.com Signed-off-by: Gerd Hoffmann --- hw/audio/gusemu.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/hw/audio/gusemu.h b/hw/audio/gusemu.h index 1c1a63cc0f..69dadef24d 100644 --- a/hw/audio/gusemu.h +++ b/hw/audio/gusemu.h @@ -28,11 +28,9 @@ /* data types (need to be adjusted if neither a VC6 nor a C99 compatible c= ompiler is used) */ =20 #if defined _WIN32 && defined _MSC_VER /* doesn't support other win32 comp= ilers yet, do it yourself... */ - typedef unsigned short GUSword; typedef unsigned int GUSdword; typedef signed short GUSsample; #else - typedef uint16_t GUSword; typedef uint32_t GUSdword; typedef int16_t GUSsample; #endif --=20 2.9.3 From nobody Tue May 7 03:12:09 2024 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.zoho.com; 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 1493883877577502.9137483535519; Thu, 4 May 2017 00:44:37 -0700 (PDT) Received: from localhost ([::1]:40203 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d6BRE-0006yE-8j for importer@patchew.org; Thu, 04 May 2017 03:44:36 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34761) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d6B1w-0001Ur-Dl for qemu-devel@nongnu.org; Thu, 04 May 2017 03:18:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d6B1t-0004cy-6d for qemu-devel@nongnu.org; Thu, 04 May 2017 03:18:28 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40268) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d6B1s-0004bE-Ty for qemu-devel@nongnu.org; Thu, 04 May 2017 03:18:25 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E928F80C1B for ; Thu, 4 May 2017 07:18:23 +0000 (UTC) Received: from nilsson.home.kraxel.org (ovpn-116-101.ams2.redhat.com [10.36.116.101]) by smtp.corp.redhat.com (Postfix) with ESMTP id EE63018376; Thu, 4 May 2017 07:18:22 +0000 (UTC) Received: by nilsson.home.kraxel.org (Postfix, from userid 500) id D725781609; Thu, 4 May 2017 09:18:16 +0200 (CEST) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com E928F80C1B Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=kraxel@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com E928F80C1B From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Thu, 4 May 2017 09:18:03 +0200 Message-Id: <20170504071811.3547-23-kraxel@redhat.com> In-Reply-To: <20170504071811.3547-1-kraxel@redhat.com> References: <20170504071811.3547-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Thu, 04 May 2017 07:18:24 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 22/30] audio: GUSword is uint16_t 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: Gerd Hoffmann , Juan Quintela Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Juan Quintela Signed-off-by: Juan Quintela Message-id: 20170425223739.6703-19-quintela@redhat.com Signed-off-by: Gerd Hoffmann --- hw/audio/gusemu_hal.c | 14 +++++++------- hw/audio/gusemu_mixer.c | 8 ++++---- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/hw/audio/gusemu_hal.c b/hw/audio/gusemu_hal.c index 444a2bbb22..3dd7239a4b 100644 --- a/hw/audio/gusemu_hal.c +++ b/hw/audio/gusemu_hal.c @@ -31,7 +31,7 @@ #include "gusemu.h" =20 #define GUSregb(position) (* (gusptr+(position))) -#define GUSregw(position) (*(GUSword *) (gusptr+(position))) +#define GUSregw(position) (*(uint16_t *) (gusptr+(position))) #define GUSregd(position) (*(GUSdword *)(gusptr+(position))) =20 /* size given in bytes */ @@ -173,7 +173,7 @@ unsigned int gus_read(GUSEmuState * state, int port, in= t size) value_read =3D value_read >> 8; value_read &=3D 0xff; } - return (GUSword) value_read; + return (uint16_t) value_read; /* case 0x306: */ /* Mixer/Version in= fo */ /* return 0xff; */ /* Pre 3.6 boards, ICS mixer NOT present */ case 0x307: /* DRAMaccess */ @@ -318,15 +318,15 @@ void gus_write(GUSEmuState * state, int port, int siz= e, unsigned int data) case 0x304: case 0x305: { - GUSword writedata =3D (GUSword) data; - GUSword readmask =3D 0x0000; + uint16_t writedata =3D (uint16_t) data; + uint16_t readmask =3D 0x0000; if (size =3D=3D 1) { readmask =3D 0xff00; writedata &=3D 0xff; if ((port & 0xff0f) =3D=3D 0x305) { - writedata =3D (GUSword) (writedata << 8); + writedata =3D (uint16_t) (writedata << 8); readmask =3D 0x00ff; } } @@ -353,7 +353,7 @@ void gus_write(GUSEmuState * state, int port, int size,= unsigned int data) break; /* reset flag active? */ offset =3D 2 * (GUSregb(FunkSelReg3x3) & 0x0f); offset +=3D (GUSregb(VoiceSelReg3x2) & 0x1f) << 5; /* = =3D Voice*32 + Funktion*2 */ - GUSregw(offset) =3D (GUSword) ((GUSregw(offset) & read= mask) | writedata); + GUSregw(offset) =3D (uint16_t) ((GUSregw(offset) & rea= dmask) | writedata); } break; /* voice unspecific functions */ @@ -521,7 +521,7 @@ void gus_dma_transferdata(GUSEmuState * state, char *dm= a_addr, unsigned int coun destaddr =3D (char *) state->himemaddr + offset; /* wavetable RAM = address */ } =20 - GUSregw(GUS42DMAStart) +=3D (GUSword) (count >> 4); = /* ToDo: add 16bit GUS page limit? */ + GUSregw(GUS42DMAStart) +=3D (uint16_t) (count >> 4); = /* ToDo: add 16bit GUS page limit? */ GUSregb(GUS50DMAHigh) =3D (uint8_t) ((count + GUSregb(GUS50DMAHigh))= & 0xf); /* ToDo: add 16bit GUS page limit? */ =20 if (GUSregb(GUS41DMACtrl) & 0x02) /* direction, 0 :=3D sysram->gusra= m */ diff --git a/hw/audio/gusemu_mixer.c b/hw/audio/gusemu_mixer.c index b189db990c..981a9ae0d4 100644 --- a/hw/audio/gusemu_mixer.c +++ b/hw/audio/gusemu_mixer.c @@ -27,10 +27,10 @@ #include "gustate.h" =20 #define GUSregb(position) (* (gusptr+(position))) -#define GUSregw(position) (*(GUSword *) (gusptr+(position))) +#define GUSregw(position) (*(uint16_t *) (gusptr+(position))) #define GUSregd(position) (*(GUSdword *)(gusptr+(position))) =20 -#define GUSvoice(position) (*(GUSword *)(voiceptr+(position))) +#define GUSvoice(position) (*(uint16_t *)(voiceptr+(position))) =20 /* samples are always 16bit stereo (4 bytes each, first right then left in= terleaved) */ void gus_mixvoices(GUSEmuState * state, unsigned int playback_freq, unsign= ed int numsamples, @@ -39,14 +39,14 @@ void gus_mixvoices(GUSEmuState * state, unsigned int pl= ayback_freq, unsigned int /* note that byte registers are stored in the upper half of each voice= register! */ uint8_t *gusptr; int Voice; - GUSword *voiceptr; + uint16_t *voiceptr; =20 unsigned int count; for (count =3D 0; count < numsamples * 2; count++) *(bufferpos + count) =3D 0; /* clear */ =20 gusptr =3D state->gusdatapos; - voiceptr =3D (GUSword *) gusptr; + voiceptr =3D (uint16_t *) gusptr; if (!(GUSregb(GUS4cReset) & 0x01)) /* reset flag active? */ return; =20 --=20 2.9.3 From nobody Tue May 7 03:12:09 2024 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.zoho.com; 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 1493883817568958.5172040661996; Thu, 4 May 2017 00:43:37 -0700 (PDT) Received: from localhost ([::1]:40197 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d6BQF-0006AE-TD for importer@patchew.org; Thu, 04 May 2017 03:43:35 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34758) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d6B1w-0001Uq-98 for qemu-devel@nongnu.org; Thu, 04 May 2017 03:18:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d6B1s-0004bj-Fn for qemu-devel@nongnu.org; Thu, 04 May 2017 03:18:28 -0400 Received: from mx1.redhat.com ([209.132.183.28]:56052) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d6B1s-0004a1-7D for qemu-devel@nongnu.org; Thu, 04 May 2017 03:18:24 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 42C5361BA5 for ; Thu, 4 May 2017 07:18:23 +0000 (UTC) Received: from nilsson.home.kraxel.org (ovpn-116-101.ams2.redhat.com [10.36.116.101]) by smtp.corp.redhat.com (Postfix) with ESMTP id 737E27EDAA; Thu, 4 May 2017 07:18:22 +0000 (UTC) Received: by nilsson.home.kraxel.org (Postfix, from userid 500) id ED1D881080; Thu, 4 May 2017 09:18:16 +0200 (CEST) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 42C5361BA5 Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=kraxel@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 42C5361BA5 From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Thu, 4 May 2017 09:18:04 +0200 Message-Id: <20170504071811.3547-24-kraxel@redhat.com> In-Reply-To: <20170504071811.3547-1-kraxel@redhat.com> References: <20170504071811.3547-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Thu, 04 May 2017 07:18:23 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 23/30] audio: GUSsample is int16_t 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: Gerd Hoffmann , Juan Quintela Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Juan Quintela Signed-off-by: Juan Quintela Message-id: 20170425223739.6703-20-quintela@redhat.com Signed-off-by: Gerd Hoffmann --- hw/audio/gusemu.h | 12 +----------- hw/audio/gus.c | 2 +- hw/audio/gusemu_hal.c | 2 +- hw/audio/gusemu_mixer.c | 8 ++++---- 4 files changed, 7 insertions(+), 17 deletions(-) diff --git a/hw/audio/gusemu.h b/hw/audio/gusemu.h index 69dadef24d..ab591eefb7 100644 --- a/hw/audio/gusemu.h +++ b/hw/audio/gusemu.h @@ -25,16 +25,6 @@ #ifndef GUSEMU_H #define GUSEMU_H =20 -/* data types (need to be adjusted if neither a VC6 nor a C99 compatible c= ompiler is used) */ - -#if defined _WIN32 && defined _MSC_VER /* doesn't support other win32 comp= ilers yet, do it yourself... */ - typedef unsigned int GUSdword; - typedef signed short GUSsample; -#else - typedef uint32_t GUSdword; - typedef int16_t GUSsample; -#endif - typedef struct _GUSEmuState { uint8_t *himemaddr; /* 1024*1024 bytes used for storing uploaded samples = (+32 additional bytes for read padding) */ @@ -86,7 +76,7 @@ void gus_dma_transferdata(GUSEmuState *state, char *dma_a= ddr, unsigned int count /* If the interrupts are asynchronous, it may be needed to use a separate = thread mixing into a temporary */ /* audio buffer in order to avoid quality loss caused by large numsamples = and elapsed_time values. */ =20 -void gus_mixvoices(GUSEmuState *state, unsigned int playback_freq, unsigne= d int numsamples, GUSsample *bufferpos); +void gus_mixvoices(GUSEmuState *state, unsigned int playback_freq, unsigne= d int numsamples, int16_t *bufferpos); /* recommended range: 10 < numsamples < 100 */ /* lower values may result in increased rounding error, higher values ofte= n cause audible timing delays */ =20 diff --git a/hw/audio/gus.c b/hw/audio/gus.c index 3d08a6576a..ec103a4db9 100644 --- a/hw/audio/gus.c +++ b/hw/audio/gus.c @@ -53,7 +53,7 @@ typedef struct GUSState { uint32_t freq; uint32_t port; int pos, left, shift, irqs; - GUSsample *mixbuf; + int16_t *mixbuf; uint8_t himem[1024 * 1024 + 32 + 4096]; int samples; SWVoiceOut *voice; diff --git a/hw/audio/gusemu_hal.c b/hw/audio/gusemu_hal.c index 3dd7239a4b..1150fc4426 100644 --- a/hw/audio/gusemu_hal.c +++ b/hw/audio/gusemu_hal.c @@ -32,7 +32,7 @@ =20 #define GUSregb(position) (* (gusptr+(position))) #define GUSregw(position) (*(uint16_t *) (gusptr+(position))) -#define GUSregd(position) (*(GUSdword *)(gusptr+(position))) +#define GUSregd(position) (*(uint16_t *)(gusptr+(position))) =20 /* size given in bytes */ unsigned int gus_read(GUSEmuState * state, int port, int size) diff --git a/hw/audio/gusemu_mixer.c b/hw/audio/gusemu_mixer.c index 981a9ae0d4..00b9861b92 100644 --- a/hw/audio/gusemu_mixer.c +++ b/hw/audio/gusemu_mixer.c @@ -28,13 +28,13 @@ =20 #define GUSregb(position) (* (gusptr+(position))) #define GUSregw(position) (*(uint16_t *) (gusptr+(position))) -#define GUSregd(position) (*(GUSdword *)(gusptr+(position))) +#define GUSregd(position) (*(uint16_t *)(gusptr+(position))) =20 #define GUSvoice(position) (*(uint16_t *)(voiceptr+(position))) =20 /* samples are always 16bit stereo (4 bytes each, first right then left in= terleaved) */ void gus_mixvoices(GUSEmuState * state, unsigned int playback_freq, unsign= ed int numsamples, - GUSsample *bufferpos) + int16_t *bufferpos) { /* note that byte registers are stored in the upper half of each voice= register! */ uint8_t *gusptr; @@ -171,8 +171,8 @@ void gus_mixvoices(GUSEmuState * state, unsigned int pl= ayback_freq, unsigned int } =20 /* mix samples into buffer */ - *(bufferpos + 2 * sample) +=3D (GUSsample) ((sample1 *= PanningPos) >> 4); /* right */ - *(bufferpos + 2 * sample + 1) +=3D (GUSsample) ((sample1 *= (15 - PanningPos)) >> 4); /* left */ + *(bufferpos + 2 * sample) +=3D (int16_t) ((sample1 * P= anningPos) >> 4); /* right */ + *(bufferpos + 2 * sample + 1) +=3D (int16_t) ((sample1 * (= 15 - PanningPos)) >> 4); /* left */ } /* write back voice and volume */ GUSvoice(wVSRCurrVol) =3D Volume32 / 32; --=20 2.9.3 From nobody Tue May 7 03:12:09 2024 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.zoho.com; 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 1493883471143567.6432726251335; Thu, 4 May 2017 00:37:51 -0700 (PDT) Received: from localhost ([::1]:40135 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d6BKf-0001Yy-TO for importer@patchew.org; Thu, 04 May 2017 03:37:49 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34737) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d6B1v-0001Ub-Pt for qemu-devel@nongnu.org; Thu, 04 May 2017 03:18:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d6B1s-0004cc-RN for qemu-devel@nongnu.org; Thu, 04 May 2017 03:18:27 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40256) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d6B1s-0004ae-Kd for qemu-devel@nongnu.org; Thu, 04 May 2017 03:18:24 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9F08A80C1C for ; Thu, 4 May 2017 07:18:23 +0000 (UTC) Received: from nilsson.home.kraxel.org (ovpn-116-101.ams2.redhat.com [10.36.116.101]) by smtp.corp.redhat.com (Postfix) with ESMTP id 15E255C6F0; Thu, 4 May 2017 07:18:23 +0000 (UTC) Received: by nilsson.home.kraxel.org (Postfix, from userid 500) id 0AAAF81661; Thu, 4 May 2017 09:18:17 +0200 (CEST) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 9F08A80C1C Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=kraxel@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 9F08A80C1C From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Thu, 4 May 2017 09:18:05 +0200 Message-Id: <20170504071811.3547-25-kraxel@redhat.com> In-Reply-To: <20170504071811.3547-1-kraxel@redhat.com> References: <20170504071811.3547-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Thu, 04 May 2017 07:18:23 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 24/30] audio: OPLSetIRQHandler is not used anywhere 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: Gerd Hoffmann , Juan Quintela Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Juan Quintela Signed-off-by: Juan Quintela Message-id: 20170425223739.6703-21-quintela@redhat.com Signed-off-by: Gerd Hoffmann --- hw/audio/fmopl.h | 1 - hw/audio/fmopl.c | 5 ----- 2 files changed, 6 deletions(-) diff --git a/hw/audio/fmopl.h b/hw/audio/fmopl.h index 8730ead531..375f971b4d 100644 --- a/hw/audio/fmopl.h +++ b/hw/audio/fmopl.h @@ -102,7 +102,6 @@ typedef struct fm_opl_f { FM_OPL *OPLCreate(int clock, int rate); void OPLDestroy(FM_OPL *OPL); void OPLSetTimerHandler(FM_OPL *OPL,OPL_TIMERHANDLER TimerHandler,int chan= nelOffset); -void OPLSetIRQHandler(FM_OPL *OPL,OPL_IRQHANDLER IRQHandler,int param); void OPLSetUpdateHandler(FM_OPL *OPL,OPL_UPDATEHANDLER UpdateHandler,int p= aram); =20 void OPLResetChip(FM_OPL *OPL); diff --git a/hw/audio/fmopl.c b/hw/audio/fmopl.c index 48db828a49..f91e700bf9 100644 --- a/hw/audio/fmopl.c +++ b/hw/audio/fmopl.c @@ -1141,11 +1141,6 @@ void OPLSetTimerHandler(FM_OPL *OPL,OPL_TIMERHANDLER= TimerHandler,int channelOff OPL->TimerHandler =3D TimerHandler; OPL->TimerParam =3D channelOffset; } -void OPLSetIRQHandler(FM_OPL *OPL,OPL_IRQHANDLER IRQHandler,int param) -{ - OPL->IRQHandler =3D IRQHandler; - OPL->IRQParam =3D param; -} void OPLSetUpdateHandler(FM_OPL *OPL,OPL_UPDATEHANDLER UpdateHandler,int p= aram) { OPL->UpdateHandler =3D UpdateHandler; --=20 2.9.3 From nobody Tue May 7 03:12:09 2024 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.zoho.com; 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 1493882702872704.3984294344248; Thu, 4 May 2017 00:25:02 -0700 (PDT) Received: from localhost ([::1]:40067 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d6B8H-0007Ou-G9 for importer@patchew.org; Thu, 04 May 2017 03:25:01 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34686) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d6B1v-0001UV-30 for qemu-devel@nongnu.org; Thu, 04 May 2017 03:18:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d6B1s-0004ay-3s for qemu-devel@nongnu.org; Thu, 04 May 2017 03:18:27 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33130) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d6B1r-0004Zv-UN for qemu-devel@nongnu.org; Thu, 04 May 2017 03:18:24 -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 mx1.redhat.com (Postfix) with ESMTPS id 015FF4DD62 for ; Thu, 4 May 2017 07:18:23 +0000 (UTC) Received: from nilsson.home.kraxel.org (ovpn-116-101.ams2.redhat.com [10.36.116.101]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8FEBB183EC; Thu, 4 May 2017 07:18:22 +0000 (UTC) Received: by nilsson.home.kraxel.org (Postfix, from userid 500) id 1CA8D81662; Thu, 4 May 2017 09:18:17 +0200 (CEST) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 015FF4DD62 Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=kraxel@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 015FF4DD62 From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Thu, 4 May 2017 09:18:06 +0200 Message-Id: <20170504071811.3547-26-kraxel@redhat.com> In-Reply-To: <20170504071811.3547-1-kraxel@redhat.com> References: <20170504071811.3547-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Thu, 04 May 2017 07:18:23 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 25/30] audio: OPLSetUpdateHandler is not used anywhere 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: Gerd Hoffmann , Juan Quintela Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Juan Quintela Signed-off-by: Juan Quintela Message-id: 20170425223739.6703-22-quintela@redhat.com Signed-off-by: Gerd Hoffmann --- hw/audio/fmopl.h | 1 - hw/audio/fmopl.c | 6 +----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/hw/audio/fmopl.h b/hw/audio/fmopl.h index 375f971b4d..446de08d15 100644 --- a/hw/audio/fmopl.h +++ b/hw/audio/fmopl.h @@ -102,7 +102,6 @@ typedef struct fm_opl_f { FM_OPL *OPLCreate(int clock, int rate); void OPLDestroy(FM_OPL *OPL); void OPLSetTimerHandler(FM_OPL *OPL,OPL_TIMERHANDLER TimerHandler,int chan= nelOffset); -void OPLSetUpdateHandler(FM_OPL *OPL,OPL_UPDATEHANDLER UpdateHandler,int p= aram); =20 void OPLResetChip(FM_OPL *OPL); int OPLWrite(FM_OPL *OPL,int a,int v); diff --git a/hw/audio/fmopl.c b/hw/audio/fmopl.c index f91e700bf9..694a77b229 100644 --- a/hw/audio/fmopl.c +++ b/hw/audio/fmopl.c @@ -1141,11 +1141,7 @@ void OPLSetTimerHandler(FM_OPL *OPL,OPL_TIMERHANDLER= TimerHandler,int channelOff OPL->TimerHandler =3D TimerHandler; OPL->TimerParam =3D channelOffset; } -void OPLSetUpdateHandler(FM_OPL *OPL,OPL_UPDATEHANDLER UpdateHandler,int p= aram) -{ - OPL->UpdateHandler =3D UpdateHandler; - OPL->UpdateParam =3D param; -} + /* ---------- YM3812 I/O interface ---------- */ int OPLWrite(FM_OPL *OPL,int a,int v) { --=20 2.9.3 From nobody Tue May 7 03:12:09 2024 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.zoho.com; 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 1493883724483667.2197316481092; Thu, 4 May 2017 00:42:04 -0700 (PDT) Received: from localhost ([::1]:40190 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d6BOl-00054f-6Q for importer@patchew.org; Thu, 04 May 2017 03:42:03 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34751) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d6B1w-0001Uk-1a for qemu-devel@nongnu.org; Thu, 04 May 2017 03:18:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d6B1s-0004ch-RX for qemu-devel@nongnu.org; Thu, 04 May 2017 03:18:27 -0400 Received: from mx1.redhat.com ([209.132.183.28]:45898) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d6B1s-0004aj-MH for qemu-devel@nongnu.org; Thu, 04 May 2017 03:18:24 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B5750C04B94F for ; Thu, 4 May 2017 07:18:23 +0000 (UTC) Received: from nilsson.home.kraxel.org (ovpn-116-101.ams2.redhat.com [10.36.116.101]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3A67119EE4; Thu, 4 May 2017 07:18:23 +0000 (UTC) Received: by nilsson.home.kraxel.org (Postfix, from userid 500) id 2F3888164E; Thu, 4 May 2017 09:18:17 +0200 (CEST) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com B5750C04B94F Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=kraxel@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com B5750C04B94F From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Thu, 4 May 2017 09:18:07 +0200 Message-Id: <20170504071811.3547-27-kraxel@redhat.com> In-Reply-To: <20170504071811.3547-1-kraxel@redhat.com> References: <20170504071811.3547-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Thu, 04 May 2017 07:18:23 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 26/30] audio: IRQHandler is not used anymore 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: Gerd Hoffmann , Juan Quintela Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Juan Quintela Signed-off-by: Juan Quintela Message-id: 20170425223739.6703-23-quintela@redhat.com Signed-off-by: Gerd Hoffmann --- hw/audio/fmopl.h | 2 -- hw/audio/fmopl.c | 4 ---- 2 files changed, 6 deletions(-) diff --git a/hw/audio/fmopl.h b/hw/audio/fmopl.h index 446de08d15..b1641f56de 100644 --- a/hw/audio/fmopl.h +++ b/hw/audio/fmopl.h @@ -92,8 +92,6 @@ typedef struct fm_opl_f { /* external event callback handler */ OPL_TIMERHANDLER TimerHandler; /* TIMER handler */ int TimerParam; /* TIMER parameter */ - OPL_IRQHANDLER IRQHandler; /* IRQ handler */ - int IRQParam; /* IRQ parameter */ OPL_UPDATEHANDLER UpdateHandler; /* stream update handler */ int UpdateParam; /* stream update parameter */ } FM_OPL; diff --git a/hw/audio/fmopl.c b/hw/audio/fmopl.c index 694a77b229..5b8a884a59 100644 --- a/hw/audio/fmopl.c +++ b/hw/audio/fmopl.c @@ -260,8 +260,6 @@ static inline void OPL_STATUS_SET(FM_OPL *OPL,int flag) if(OPL->status & OPL->statusmask) { /* IRQ on */ OPL->status |=3D 0x80; - /* callback user interrupt handler (IRQ is OFF to ON) */ - if(OPL->IRQHandler) (OPL->IRQHandler)(OPL->IRQParam,1); } } } @@ -276,8 +274,6 @@ static inline void OPL_STATUS_RESET(FM_OPL *OPL,int fla= g) if (!(OPL->status & OPL->statusmask) ) { OPL->status &=3D 0x7f; - /* callback user interrupt handler (IRQ is ON to OFF) */ - if(OPL->IRQHandler) (OPL->IRQHandler)(OPL->IRQParam,0); } } } --=20 2.9.3 From nobody Tue May 7 03:12:09 2024 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.zoho.com; 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 1493883376784336.8901378084139; Thu, 4 May 2017 00:36:16 -0700 (PDT) Received: from localhost ([::1]:40126 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d6BJ9-0000BP-G0 for importer@patchew.org; Thu, 04 May 2017 03:36:15 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34728) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d6B1v-0001UZ-JC for qemu-devel@nongnu.org; Thu, 04 May 2017 03:18:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d6B1s-0004at-3h for qemu-devel@nongnu.org; Thu, 04 May 2017 03:18:27 -0400 Received: from mx1.redhat.com ([209.132.183.28]:51454) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d6B1r-0004Zx-Up for qemu-devel@nongnu.org; Thu, 04 May 2017 03:18:24 -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 mx1.redhat.com (Postfix) with ESMTPS id 0FCD023E6C0 for ; Thu, 4 May 2017 07:18:23 +0000 (UTC) Received: from nilsson.home.kraxel.org (ovpn-116-101.ams2.redhat.com [10.36.116.101]) by smtp.corp.redhat.com (Postfix) with ESMTP id 94AF7183ED; Thu, 4 May 2017 07:18:22 +0000 (UTC) Received: by nilsson.home.kraxel.org (Postfix, from userid 500) id 4265481672; Thu, 4 May 2017 09:18:17 +0200 (CEST) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 0FCD023E6C0 Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=kraxel@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 0FCD023E6C0 From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Thu, 4 May 2017 09:18:08 +0200 Message-Id: <20170504071811.3547-28-kraxel@redhat.com> In-Reply-To: <20170504071811.3547-1-kraxel@redhat.com> References: <20170504071811.3547-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Thu, 04 May 2017 07:18:23 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 27/30] audio: UpdateHandler is not used anymore 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: Gerd Hoffmann , Juan Quintela Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Juan Quintela Signed-off-by: Juan Quintela Message-id: 20170425223739.6703-24-quintela@redhat.com Signed-off-by: Gerd Hoffmann --- hw/audio/fmopl.h | 2 -- hw/audio/fmopl.c | 2 -- 2 files changed, 4 deletions(-) diff --git a/hw/audio/fmopl.h b/hw/audio/fmopl.h index b1641f56de..8410275dc3 100644 --- a/hw/audio/fmopl.h +++ b/hw/audio/fmopl.h @@ -92,8 +92,6 @@ typedef struct fm_opl_f { /* external event callback handler */ OPL_TIMERHANDLER TimerHandler; /* TIMER handler */ int TimerParam; /* TIMER parameter */ - OPL_UPDATEHANDLER UpdateHandler; /* stream update handler */ - int UpdateParam; /* stream update parameter */ } FM_OPL; =20 /* ---------- Generic interface section ---------- */ diff --git a/hw/audio/fmopl.c b/hw/audio/fmopl.c index 5b8a884a59..99d09c55b3 100644 --- a/hw/audio/fmopl.c +++ b/hw/audio/fmopl.c @@ -1147,7 +1147,6 @@ int OPLWrite(FM_OPL *OPL,int a,int v) } else { /* data port */ - if(OPL->UpdateHandler) OPL->UpdateHandler(OPL->UpdateParam,0); #ifdef OPL_OUTPUT_LOG if(opl_dbg_fp) { @@ -1197,7 +1196,6 @@ int OPLTimerOver(FM_OPL *OPL,int c) if( OPL->mode & 0x80 ) { /* CSM mode total level latch and auto key on */ int ch; - if(OPL->UpdateHandler) OPL->UpdateHandler(OPL->UpdateParam,0); for(ch=3D0;ch<9;ch++) CSMKeyControll( &OPL->P_CH[ch] ); } --=20 2.9.3 From nobody Tue May 7 03:12:09 2024 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.zoho.com; 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 1493882704307880.2359675675125; Thu, 4 May 2017 00:25:04 -0700 (PDT) Received: from localhost ([::1]:40068 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d6B8I-0007Qw-Va for importer@patchew.org; Thu, 04 May 2017 03:25:03 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34734) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d6B1v-0001Ua-Mb for qemu-devel@nongnu.org; Thu, 04 May 2017 03:18:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d6B1t-0004cr-52 for qemu-devel@nongnu.org; Thu, 04 May 2017 03:18:27 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33152) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d6B1s-0004bK-VA for qemu-devel@nongnu.org; Thu, 04 May 2017 03:18:25 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 023D064CF for ; Thu, 4 May 2017 07:18:24 +0000 (UTC) Received: from nilsson.home.kraxel.org (ovpn-116-101.ams2.redhat.com [10.36.116.101]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7E07677546; Thu, 4 May 2017 07:18:23 +0000 (UTC) Received: by nilsson.home.kraxel.org (Postfix, from userid 500) id 50CA381673; Thu, 4 May 2017 09:18:17 +0200 (CEST) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 023D064CF Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=kraxel@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 023D064CF From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Thu, 4 May 2017 09:18:09 +0200 Message-Id: <20170504071811.3547-29-kraxel@redhat.com> In-Reply-To: <20170504071811.3547-1-kraxel@redhat.com> References: <20170504071811.3547-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Thu, 04 May 2017 07:18:24 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 28/30] audio: Remove unused typedefs 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: Gerd Hoffmann , Juan Quintela Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Juan Quintela Signed-off-by: Juan Quintela Message-id: 20170425223739.6703-25-quintela@redhat.com Signed-off-by: Gerd Hoffmann --- hw/audio/fmopl.h | 4 ---- 1 file changed, 4 deletions(-) diff --git a/hw/audio/fmopl.h b/hw/audio/fmopl.h index 8410275dc3..f89af0884d 100644 --- a/hw/audio/fmopl.h +++ b/hw/audio/fmopl.h @@ -4,10 +4,6 @@ #include =20 typedef void (*OPL_TIMERHANDLER)(int channel,double interval_Sec); -typedef void (*OPL_IRQHANDLER)(int param,int irq); -typedef void (*OPL_UPDATEHANDLER)(int param,int min_interval_us); -typedef void (*OPL_PORTHANDLER_W)(int param,unsigned char data); -typedef unsigned char (*OPL_PORTHANDLER_R)(int param); =20 /* !!!!! here is private section , do not access there member direct !!!!!= */ =20 --=20 2.9.3 From nobody Tue May 7 03:12:09 2024 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.zoho.com; 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 1493882946456907.8139184693971; Thu, 4 May 2017 00:29:06 -0700 (PDT) Received: from localhost ([::1]:40086 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d6BCD-0002iF-4F for importer@patchew.org; Thu, 04 May 2017 03:29:05 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34754) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d6B1w-0001Up-45 for qemu-devel@nongnu.org; Thu, 04 May 2017 03:18:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d6B1s-0004cS-NJ for qemu-devel@nongnu.org; Thu, 04 May 2017 03:18:28 -0400 Received: from mx1.redhat.com ([209.132.183.28]:45894) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d6B1s-0004aO-Hm for qemu-devel@nongnu.org; Thu, 04 May 2017 03:18:24 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 91DD0C04B948 for ; Thu, 4 May 2017 07:18:23 +0000 (UTC) Received: from nilsson.home.kraxel.org (ovpn-116-101.ams2.redhat.com [10.36.116.101]) by smtp.corp.redhat.com (Postfix) with ESMTP id 09C625C6E9; Thu, 4 May 2017 07:18:23 +0000 (UTC) Received: by nilsson.home.kraxel.org (Postfix, from userid 500) id 6253D81674; Thu, 4 May 2017 09:18:17 +0200 (CEST) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 91DD0C04B948 Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=kraxel@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 91DD0C04B948 From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Thu, 4 May 2017 09:18:10 +0200 Message-Id: <20170504071811.3547-30-kraxel@redhat.com> In-Reply-To: <20170504071811.3547-1-kraxel@redhat.com> References: <20170504071811.3547-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Thu, 04 May 2017 07:18:23 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 29/30] audio: un-export OPLResetChip 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: Gerd Hoffmann , Juan Quintela Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" From: Juan Quintela Signed-off-by: Juan Quintela Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-id: 20170425223739.6703-26-quintela@redhat.com Signed-off-by: Gerd Hoffmann --- hw/audio/fmopl.h | 1 - hw/audio/fmopl.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/hw/audio/fmopl.h b/hw/audio/fmopl.h index f89af0884d..fc9f16b58a 100644 --- a/hw/audio/fmopl.h +++ b/hw/audio/fmopl.h @@ -95,7 +95,6 @@ FM_OPL *OPLCreate(int clock, int rate); void OPLDestroy(FM_OPL *OPL); void OPLSetTimerHandler(FM_OPL *OPL,OPL_TIMERHANDLER TimerHandler,int chan= nelOffset); =20 -void OPLResetChip(FM_OPL *OPL); int OPLWrite(FM_OPL *OPL,int a,int v); unsigned char OPLRead(FM_OPL *OPL,int a); int OPLTimerOver(FM_OPL *OPL,int c); diff --git a/hw/audio/fmopl.c b/hw/audio/fmopl.c index 99d09c55b3..dc9043c32d 100644 --- a/hw/audio/fmopl.c +++ b/hw/audio/fmopl.c @@ -1036,7 +1036,7 @@ void YM3812UpdateOne(FM_OPL *OPL, int16_t *buffer, in= t length) } =20 /* ---------- reset one of chip ---------- */ -void OPLResetChip(FM_OPL *OPL) +static void OPLResetChip(FM_OPL *OPL) { int c,s; int i; --=20 2.9.3 From nobody Tue May 7 03:12:09 2024 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.zoho.com; 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 1493882831594191.49923890490322; Thu, 4 May 2017 00:27:11 -0700 (PDT) Received: from localhost ([::1]:40080 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d6BAM-0000ve-AT for importer@patchew.org; Thu, 04 May 2017 03:27:10 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34746) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d6B1v-0001Ui-Ui for qemu-devel@nongnu.org; Thu, 04 May 2017 03:18:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d6B1t-0004dJ-BA for qemu-devel@nongnu.org; Thu, 04 May 2017 03:18:27 -0400 Received: from mx1.redhat.com ([209.132.183.28]:42792) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d6B1t-0004bw-5Q for qemu-devel@nongnu.org; Thu, 04 May 2017 03:18:25 -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 mx1.redhat.com (Postfix) with ESMTPS id 3861B8046D for ; Thu, 4 May 2017 07:18:24 +0000 (UTC) Received: from nilsson.home.kraxel.org (ovpn-116-101.ams2.redhat.com [10.36.116.101]) by smtp.corp.redhat.com (Postfix) with ESMTP id E2B96183E3; Thu, 4 May 2017 07:18:23 +0000 (UTC) Received: by nilsson.home.kraxel.org (Postfix, from userid 500) id 71ABD81675; Thu, 4 May 2017 09:18:17 +0200 (CEST) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 3861B8046D Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=kraxel@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 3861B8046D From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Thu, 4 May 2017 09:18:11 +0200 Message-Id: <20170504071811.3547-31-kraxel@redhat.com> In-Reply-To: <20170504071811.3547-1-kraxel@redhat.com> References: <20170504071811.3547-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Thu, 04 May 2017 07:18:24 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 30/30] audio: Use ARRAY_SIZE from qemu/osdep.h 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: Gerd Hoffmann , Juan Quintela Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" From: Juan Quintela Signed-off-by: Juan Quintela Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-id: 20170425223739.6703-27-quintela@redhat.com Signed-off-by: Gerd Hoffmann --- hw/audio/fmopl.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/hw/audio/fmopl.c b/hw/audio/fmopl.c index dc9043c32d..202f752c5d 100644 --- a/hw/audio/fmopl.c +++ b/hw/audio/fmopl.c @@ -34,15 +34,11 @@ #include //#include "driver.h" /* use M.A.M.E. */ #include "fmopl.h" - +#include "qemu/osdep.h" #ifndef PI #define PI 3.14159265358979323846 #endif =20 -#ifndef ARRAY_SIZE -#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) -#endif - /* -------------------- for debug --------------------- */ /* #define OPL_OUTPUT_LOG */ #ifdef OPL_OUTPUT_LOG --=20 2.9.3