[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [qemu-upstream-unstable] sb16: fix interrupt acknowledgement



commit e60fb7af55b3321431ffa6f3523f11111ae66714
Author:     Paolo Bonzini <pbonzini@xxxxxxxxxx>
AuthorDate: Tue Jan 20 17:23:48 2015 +0100
Commit:     Michael Roth <mdroth@xxxxxxxxxxxxxxxxxx>
CommitDate: Sun Feb 22 18:36:08 2015 -0600

    sb16: fix interrupt acknowledgement
    
    SoundBlaster 16 emulation is very broken and consumes a lot of CPU, but a
    small fix was suggested offlist and it is enough to fix some games.  I
    got Epic Pinball to work with the "SoundBlaster Clone" option.
    
    The processing of the interrupt register is wrong due to two missing
    "not"s.  This causes the interrupt flag to remain set even after the
    Acknowledge ports have been read (0x0e and 0x0f).
    
    The line was introduced by commit 85571bc (audio merge (malc), 2004-11-07),
    but the code might have been broken before because I did not look closely
    at the huge patches from 10 years ago.
    
    Reported-by: Joshua Bair <j_bair@xxxxxxxxxxxxx>
    Cc: Gerd Hoffmann <kraxel@xxxxxxxxxx>
    Cc: qemu-stable@xxxxxxxxxx
    Signed-off-by: Paolo Bonzini <pbonzini@xxxxxxxxxx>
    Signed-off-by: Gerd Hoffmann <kraxel@xxxxxxxxxx>
    (cherry picked from commit 9939375c282a0f97afa69dc6799d3c77aaf7d544)
    Signed-off-by: Michael Roth <mdroth@xxxxxxxxxxxxxxxxxx>
---
 hw/audio/sb16.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/hw/audio/sb16.c b/hw/audio/sb16.c
index bda26d0..444eb9e 100644
--- a/hw/audio/sb16.c
+++ b/hw/audio/sb16.c
@@ -999,7 +999,7 @@ static IO_READ_PROTO (dsp_read)
         retval = (!s->out_data_len || s->highspeed) ? 0 : 0x80;
         if (s->mixer_regs[0x82] & 1) {
             ack = 1;
-            s->mixer_regs[0x82] &= 1;
+            s->mixer_regs[0x82] &= ~1;
             qemu_irq_lower (s->pic);
         }
         break;
@@ -1008,7 +1008,7 @@ static IO_READ_PROTO (dsp_read)
         retval = 0xff;
         if (s->mixer_regs[0x82] & 2) {
             ack = 1;
-            s->mixer_regs[0x82] &= 2;
+            s->mixer_regs[0x82] &= ~2;
             qemu_irq_lower (s->pic);
         }
         break;
--
generated by git-patchbot for /home/xen/git/qemu-upstream-unstable.git

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.