From patchwork Fri Aug 28 17:49:11 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Juan Quintela X-Patchwork-Id: 32387 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by bilbo.ozlabs.org (Postfix) with ESMTPS id B3156B7093 for ; Sat, 29 Aug 2009 03:54:00 +1000 (EST) Received: from localhost ([127.0.0.1]:41879 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mh5e9-00080i-3y for incoming@patchwork.ozlabs.org; Fri, 28 Aug 2009 13:53:57 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mh5cA-0006Se-QR for qemu-devel@nongnu.org; Fri, 28 Aug 2009 13:51:54 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mh5c6-0006QN-48 for qemu-devel@nongnu.org; Fri, 28 Aug 2009 13:51:54 -0400 Received: from [199.232.76.173] (port=35384 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mh5c6-0006QJ-0B for qemu-devel@nongnu.org; Fri, 28 Aug 2009 13:51:50 -0400 Received: from mx1.redhat.com ([209.132.183.28]:20570) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Mh5c5-0005f0-Gc for qemu-devel@nongnu.org; Fri, 28 Aug 2009 13:51:49 -0400 Received: from int-mx08.intmail.prod.int.phx2.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n7SHpb9w014232; Fri, 28 Aug 2009 13:51:37 -0400 Received: from localhost.localdomain (vpn2-8-222.ams2.redhat.com [10.36.8.222]) by int-mx08.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id n7SHpZV6014309; Fri, 28 Aug 2009 13:51:36 -0400 From: Juan Quintela To: qemu-devel@nongnu.org Date: Fri, 28 Aug 2009 19:49:11 +0200 Message-Id: <1251481751-27326-1-git-send-email-quintela@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.21 X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Cc: Subject: [Qemu-devel] [PATCH] Remove HAS_YMF262 conditional code X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org HAS_YMF262 is not defined anywhere, and use functinos that are not in the tree. Signed-off-by: Juan Quintela --- hw/adlib.c | 39 --------------------------------------- vl.c | 4 ---- 2 files changed, 0 insertions(+), 43 deletions(-) diff --git a/hw/adlib.c b/hw/adlib.c index e1e4077..8b77ebd 100644 --- a/hw/adlib.c +++ b/hw/adlib.c @@ -42,14 +42,8 @@ #define ldebug(...) #endif -#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 #define IO_READ_PROTO(name) \ uint32_t name (void *opaque, uint32_t nport) @@ -75,20 +69,14 @@ typedef struct { SWVoiceOut *voice; int left, pos, samples; QEMUAudioTimeStamp ats; -#ifndef HAS_YMF262 FM_OPL *opl; -#endif } AdlibState; static AdlibState glob_adlib; 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] = 0; } @@ -126,11 +114,7 @@ static IO_WRITE_PROTO (adlib_write) adlib_kill_timers (s); -#ifdef HAS_YMF262 - status = YMF262Write (0, a, val); -#else status = OPLWrite (s->opl, a, val); -#endif } static IO_READ_PROTO (adlib_read) @@ -141,11 +125,7 @@ static IO_READ_PROTO (adlib_read) adlib_kill_timers (s); -#ifdef HAS_YMF262 - data = YMF262Read (0, a); -#else data = OPLRead (s->opl, a); -#endif return data; } @@ -235,11 +215,7 @@ static void adlib_callback (void *opaque, int free) return; } -#ifdef HAS_YMF262 - YMF262UpdateOneQEMU (0, s->mixbuf + s->pos * 2, samples); -#else YM3812UpdateOne (s->opl, s->mixbuf + s->pos, samples); -#endif while (samples) { written = write_audio (s, samples); @@ -258,14 +234,10 @@ static void adlib_callback (void *opaque, int free) static void Adlib_fini (AdlibState *s) { -#ifdef HAS_YMF262 - YMF262Shutdown (); -#else if (s->opl) { OPLDestroy (s->opl); s->opl = NULL; } -#endif if (s->mixbuf) { qemu_free (s->mixbuf); @@ -281,16 +253,6 @@ int Adlib_init (qemu_irq *pic) AdlibState *s = &glob_adlib; struct audsettings as; -#ifdef HAS_YMF262 - if (YMF262Init (1, 14318180, conf.freq)) { - dolog ("YMF262Init %d failed\n", conf.freq); - return -1; - } - else { - YMF262SetTimerHandler (0, timer_handler, 0); - s->enabled = 1; - } -#else s->opl = OPLCreate (OPL_TYPE_YM3812, 3579545, conf.freq); if (!s->opl) { dolog ("OPLCreate %d failed\n", conf.freq); @@ -300,7 +262,6 @@ int Adlib_init (qemu_irq *pic) OPLSetTimerHandler (s->opl, timer_handler, 0); s->enabled = 1; } -#endif as.freq = conf.freq; as.nchannels = SHIFT; diff --git a/vl.c b/vl.c index a894285..8c53e25 100644 --- a/vl.c +++ b/vl.c @@ -4443,11 +4443,7 @@ struct soundhw soundhw[] = { #ifdef CONFIG_ADLIB { "adlib", -#ifdef HAS_YMF262 - "Yamaha YMF262 (OPL3)", -#else "Yamaha YM3812 (OPL2)", -#endif 0, 1, { .init_isa = Adlib_init }