qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Vassili Karpov (malc)" <av1474@comtv.ru>,
	Gerd Hoffmann <kraxel@redhat.com>,
	qemu-stable@nongnu.org
Subject: [Qemu-devel] [PATCH 4/4] intel-hda: fix position buffer
Date: Mon,  9 Dec 2013 15:06:14 +0100	[thread overview]
Message-ID: <1386597974-26506-5-git-send-email-kraxel@redhat.com> (raw)
In-Reply-To: <1386597974-26506-1-git-send-email-kraxel@redhat.com>

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 <kraxel@redhat.com>
---
 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.8.3.1

      parent reply	other threads:[~2013-12-09 14:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-09 14:06 [Qemu-devel] [PULL 0/4] audio patch queue Gerd Hoffmann
2013-12-09 14:06 ` [Qemu-devel] [PATCH 1/4] audio: Lower default wakeup rate to 100 times / second Gerd Hoffmann
2013-12-09 14:06 ` [Qemu-devel] [PATCH 2/4] audio: adjust pulse to 100Hz wakeup rate Gerd Hoffmann
2013-12-09 14:06 ` [Qemu-devel] [PATCH 3/4] adlib: fix patching of port I/O addresses Gerd Hoffmann
2013-12-09 14:06 ` Gerd Hoffmann [this message]

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=1386597974-26506-5-git-send-email-kraxel@redhat.com \
    --to=kraxel@redhat.com \
    --cc=av1474@comtv.ru \
    --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).