aboutsummaryrefslogtreecommitdiff
path: root/hw/audio/intel-hda.c
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2018-06-22 13:11:56 +0200
committerGerd Hoffmann <kraxel@redhat.com>2018-06-25 13:57:57 +0200
commit280c1e1cdb24d80ecdfcdfc679ccc5e8ed7af45d (patch)
tree4e556006e53d2c6752ce74b9cd0e46efea563d99 /hw/audio/intel-hda.c
parent46012db666990ff2eed1d3dc199ab8006439a93b (diff)
audio/hda: create millisecond timers that handle IO
Currently, the HDA device tries to sync itself with the QEMU audio backend by waiting for the guest driver to handle buffer completion interrupts. This causes the backend to often read too much data from the device, as well as running out of data whenever the guest takes too long to handle the interrupt. According to the HDA specification, the guest is also not required to use interrupts, but can also sync itself by polling the LPIB registers. This patch will introduce high frequency (1000Hz) timers that interface with the device and allow for much smoother emulation of the LPIB registers. Since the timing is now provided by these timers, the need to wait for buffer completion interrupts also ceases. Signed-off-by: Martin Schrodt <martin@schrodt.org> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-id: 20180622111200.30561-2-kraxel@redhat.com Message-id: 20171015184033.2951-3-martin@schrodt.org [ kraxel: keep old code for compatibility with older qemu versions, add property to switch code paths at runtime ] [ kraxel: new code is disabled by default, use-timer=on enables it ] Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw/audio/intel-hda.c')
-rw-r--r--hw/audio/intel-hda.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/hw/audio/intel-hda.c b/hw/audio/intel-hda.c
index 948268afd8..23a2cf6484 100644
--- a/hw/audio/intel-hda.c
+++ b/hw/audio/intel-hda.c
@@ -407,13 +407,6 @@ static bool intel_hda_xfer(HDACodecDevice *dev, uint32_t stnr, bool output,
if (st->bpl == NULL) {
return false;
}
- if (st->ctl & (1 << 26)) {
- /*
- * Wait with the next DMA xfer until the guest
- * has acked the buffer completion interrupt
- */
- return false;
- }
left = len;
s = st->bentries;