cryptospore / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone
0a122b
From 91bcfcc9583a61158f7f69f52ff3575eb432067f Mon Sep 17 00:00:00 2001
0a122b
From: Gerd Hoffmann <kraxel@redhat.com>
0a122b
Date: Wed, 11 Dec 2013 09:49:07 -0500
0a122b
Subject: [PATCH 01/14] intel-hda: fix position buffer
0a122b
0a122b
Message-id: <1386755347-9800-2-git-send-email-kraxel@redhat.com>
0a122b
Patchwork-id: 56156
0a122b
O-Subject: [RHEL-7 qemu-kvm PATCH 1/1] intel-hda: fix position buffer
0a122b
Bugzilla: 947785
0a122b
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
0a122b
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
0a122b
RH-Acked-by: Orit Wasserman <owasserm@redhat.com>
0a122b
0a122b
Fix position buffer updates to use the correct stream offset.
0a122b
0a122b
Without this patch both IN (record) and OUT (playback) streams
0a122b
will update the IN buffer positions.  The linux kernel notices
0a122b
and complains:
0a122b
  hda-intel: Invalid position buffer, using LPIB read method instead.
0a122b
0a122b
The bug may also lead to glitches when recording and playing
0a122b
at the same time:
0a122b
  https://bugzilla.redhat.com/show_bug.cgi?id=947785
0a122b
0a122b
Cc: qemu-stable@nongnu.org
0a122b
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
0a122b
(cherry picked from commit d58ce68a454e5ae9cbde0308def379e272f13b10)
0a122b
---
0a122b
 hw/audio/intel-hda.c | 1 +
0a122b
 1 file changed, 1 insertion(+)
0a122b
0a122b
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
0a122b
---
0a122b
 hw/audio/intel-hda.c | 1 +
0a122b
 1 file changed, 1 insertion(+)
0a122b
0a122b
diff --git a/hw/audio/intel-hda.c b/hw/audio/intel-hda.c
0a122b
index e747342..cc948de 100644
0a122b
--- a/hw/audio/intel-hda.c
0a122b
+++ b/hw/audio/intel-hda.c
0a122b
@@ -439,6 +439,7 @@ static bool intel_hda_xfer(HDACodecDevice *dev, uint32_t stnr, bool output,
0a122b
         }
0a122b
     }
0a122b
     if (d->dp_lbase & 0x01) {
0a122b
+        s = st - d->st;
0a122b
         addr = intel_hda_addr(d->dp_lbase & ~0x01, d->dp_ubase);
0a122b
         stl_le_pci_dma(&d->pci, addr + 8*s, st->lpib);
0a122b
     }
0a122b
-- 
0a122b
1.8.3.1
0a122b