qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Philippe Mathieu-Daudé" <philmd@redhat.com>,
	"Allan Peramaki" <aperamak@pp1.inet.fi>,
	"Gerd Hoffmann" <kraxel@redhat.com>,
	qemu-stable@nongnu.org
Subject: [PULL 7/7] hw/audio/gus: Fix registers 32-bit access
Date: Fri, 19 Jun 2020 15:17:41 +0200	[thread overview]
Message-ID: <20200619131741.10857-8-kraxel@redhat.com> (raw)
In-Reply-To: <20200619131741.10857-1-kraxel@redhat.com>

From: Allan Peramaki <aperamak@pp1.inet.fi>

Fix audio on software that accesses DRAM above 64k via register
peek/poke and some cases when more than 16 voices are used.

Cc: qemu-stable@nongnu.org
Fixes: 135f5ae1974c ("audio: GUSsample is int16_t")
Signed-off-by: Allan Peramaki <aperamak@pp1.inet.fi>
Tested-by: Volker Rümelin <vr_qemu@t-online.de>
Reviewed-by: Volker Rümelin <vr_qemu@t-online.de>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-id: 20200618103623.6031-1-philmd@redhat.com
Message-Id: <20200615201757.16868-1-aperamak@pp1.inet.fi>
[PMD: Removed unrelated style changes]
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 hw/audio/gusemu_hal.c   | 2 +-
 hw/audio/gusemu_mixer.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/hw/audio/gusemu_hal.c b/hw/audio/gusemu_hal.c
index ae40ca341cc4..5b9a14ee21b6 100644
--- a/hw/audio/gusemu_hal.c
+++ b/hw/audio/gusemu_hal.c
@@ -32,7 +32,7 @@
 
 #define GUSregb(position) (*            (gusptr+(position)))
 #define GUSregw(position) (*(uint16_t *) (gusptr+(position)))
-#define GUSregd(position) (*(uint16_t *)(gusptr+(position)))
+#define GUSregd(position) (*(uint32_t *)(gusptr + (position)))
 
 /* 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 00b9861b92b2..56300de77e44 100644
--- a/hw/audio/gusemu_mixer.c
+++ b/hw/audio/gusemu_mixer.c
@@ -28,7 +28,7 @@
 
 #define GUSregb(position)  (*            (gusptr+(position)))
 #define GUSregw(position)  (*(uint16_t *) (gusptr+(position)))
-#define GUSregd(position)  (*(uint16_t *)(gusptr+(position)))
+#define GUSregd(position)  (*(uint32_t *)(gusptr + (position)))
 
 #define GUSvoice(position) (*(uint16_t *)(voiceptr+(position)))
 
-- 
2.18.4



  parent reply	other threads:[~2020-06-19 13:22 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-19 13:17 [PULL 0/7] Audio 20200619 patches Gerd Hoffmann
2020-06-19 13:17 ` [PULL 1/7] audio/jack: fix invalid minimum buffer size check Gerd Hoffmann
2020-06-19 13:17 ` [PULL 2/7] audio/jack: remove unused stopped state Gerd Hoffmann
2020-06-19 13:17 ` [PULL 3/7] audio/jack: remove invalid set of input support bool Gerd Hoffmann
2020-06-19 13:17 ` [PULL 4/7] audio/jack: do not remove ports when finishing Gerd Hoffmann
2020-06-19 13:17 ` [PULL 5/7] audio/jack: honour the enable state of the audio device Gerd Hoffmann
2020-06-19 13:17 ` [PULL 6/7] audio/jack: simplify the re-init code path Gerd Hoffmann
2020-06-19 13:17 ` Gerd Hoffmann [this message]
2020-06-19 13:56 ` [PULL 0/7] Audio 20200619 patches no-reply
2020-06-19 14:07 ` no-reply
2020-06-22 13:45 ` Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200619131741.10857-8-kraxel@redhat.com \
    --to=kraxel@redhat.com \
    --cc=aperamak@pp1.inet.fi \
    --cc=philmd@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-stable@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).