Skip to content

Commit

Permalink
intel-hda: fix position buffer
Browse files Browse the repository at this point in the history
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>
(cherry picked from commit d58ce68)

Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
  • Loading branch information
kraxel authored and mdroth committed Feb 21, 2014
1 parent 30a08ab commit 97f74de
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions hw/audio/intel-hda.c
Expand Up @@ -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);
}
Expand Down

0 comments on commit 97f74de

Please sign in to comment.