intel-hda: fix position buffer
commitd58ce68a454e5ae9cbde0308def379e272f13b10
authorGerd Hoffmann <kraxel@redhat.com>
Fri, 29 Nov 2013 13:25:33 +0000 (29 14:25 +0100)
committerGerd Hoffmann <kraxel@redhat.com>
Mon, 9 Dec 2013 08:19:26 +0000 (9 09:19 +0100)
tree7e0230097d384f4a63291ec50befe7bef7c0b822
parent7f0ba7bb4378f22b017e08947219a352d491bac4
intel-hda: fix position buffer

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