From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46482) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WGlJS-00057U-Ph for qemu-devel@nongnu.org; Fri, 21 Feb 2014 03:18:36 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WGlJI-0001Sj-8U for qemu-devel@nongnu.org; Fri, 21 Feb 2014 03:18:26 -0500 Received: from e7.ny.us.ibm.com ([32.97.182.137]:44952) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WGlJI-0001SW-3g for qemu-devel@nongnu.org; Fri, 21 Feb 2014 03:18:16 -0500 Received: from /spool/local by e7.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 21 Feb 2014 03:18:15 -0500 From: Michael Roth Date: Fri, 21 Feb 2014 02:16:51 -0600 Message-Id: <1392970647-21528-16-git-send-email-mdroth@linux.vnet.ibm.com> In-Reply-To: <1392970647-21528-1-git-send-email-mdroth@linux.vnet.ibm.com> References: <1392970647-21528-1-git-send-email-mdroth@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH 15/51] intel-hda: fix position buffer List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: lersek@redhat.com, qemu-stable@nongnu.org, Petar.Jovanovic@imgtec.com From: Gerd Hoffmann Fix position buffer updates to use the correct stream offset. Without this patch both IN (record) and OUT (playback) streams will update the IN buffer positions. The linux kernel notices and complains: hda-intel: Invalid position buffer, using LPIB read method instead. The bug may also lead to glitches when recording and playing at the same time: https://bugzilla.redhat.com/show_bug.cgi?id=947785 Cc: qemu-stable@nongnu.org Signed-off-by: Gerd Hoffmann (cherry picked from commit d58ce68a454e5ae9cbde0308def379e272f13b10) Signed-off-by: Michael Roth --- hw/audio/intel-hda.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/audio/intel-hda.c b/hw/audio/intel-hda.c index 4327264..6ab8c24 100644 --- a/hw/audio/intel-hda.c +++ b/hw/audio/intel-hda.c @@ -444,6 +444,7 @@ static bool intel_hda_xfer(HDACodecDevice *dev, uint32_t stnr, bool output, } } if (d->dp_lbase & 0x01) { + s = st - d->st; addr = intel_hda_addr(d->dp_lbase & ~0x01, d->dp_ubase); stl_le_pci_dma(&d->pci, addr + 8*s, st->lpib); } -- 1.7.9.5