qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PULL 0/4] audio patch queue
@ 2013-12-09 14:06 Gerd Hoffmann
  2013-12-09 14:06 ` [Qemu-devel] [PATCH 1/4] audio: Lower default wakeup rate to 100 times / second Gerd Hoffmann
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Gerd Hoffmann @ 2013-12-09 14:06 UTC (permalink / raw)
  To: qemu-devel; +Cc: Gerd Hoffmann

  Hi,

Here comes the audio patch queue.

please pull,
  Gerd

The following changes since commit a1d22a367d5780c9553b2cd5a24f665534ce6ed6:

  target-cris: Use new qemu_ld/st opcodes (2013-12-08 09:36:02 +0100)

are available in the git repository at:

  git://git.kraxel.org/qemu tags/pull-audio-1

for you to fetch changes up to d58ce68a454e5ae9cbde0308def379e272f13b10:

  intel-hda: fix position buffer (2013-12-09 09:19:26 +0100)

----------------------------------------------------------------
Change audio wakeup rate from 250 Hz to 100 Hz.
Emulation bugfixes for intel-hda and adlib.

----------------------------------------------------------------
Gerd Hoffmann (2):
      audio: adjust pulse to 100Hz wakeup rate
      intel-hda: fix position buffer

Hans de Goede (1):
      audio: Lower default wakeup rate to 100 times / second

Paolo Bonzini (1):
      adlib: fix patching of port I/O addresses

 audio/audio.c        | 2 +-
 audio/paaudio.c      | 8 ++++----
 hw/audio/adlib.c     | 4 ++--
 hw/audio/intel-hda.c | 1 +
 4 files changed, 8 insertions(+), 7 deletions(-)

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Qemu-devel] [PATCH 1/4] audio: Lower default wakeup rate to 100 times / second
  2013-12-09 14:06 [Qemu-devel] [PULL 0/4] audio patch queue Gerd Hoffmann
@ 2013-12-09 14:06 ` Gerd Hoffmann
  2013-12-09 14:06 ` [Qemu-devel] [PATCH 2/4] audio: adjust pulse to 100Hz wakeup rate Gerd Hoffmann
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Gerd Hoffmann @ 2013-12-09 14:06 UTC (permalink / raw)
  To: qemu-devel; +Cc: Hans de Goede, Vassili Karpov (malc), Gerd Hoffmann

From: Hans de Goede <hdegoede@redhat.com>

This is more then plenty to keep audio card fifos filles / emptied.

This drops host cpu-load for audio playback inside a linux vm from
13% to 9%.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 audio/audio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/audio/audio.c b/audio/audio.c
index b3db679..fc77511 100644
--- a/audio/audio.c
+++ b/audio/audio.c
@@ -95,7 +95,7 @@ static struct {
         }
     },
 
-    .period = { .hertz = 250 },
+    .period = { .hertz = 100 },
     .plive = 0,
     .log_to_monitor = 0,
     .try_poll_in = 1,
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [Qemu-devel] [PATCH 2/4] audio: adjust pulse to 100Hz wakeup rate
  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 ` 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 ` [Qemu-devel] [PATCH 4/4] intel-hda: fix position buffer Gerd Hoffmann
  3 siblings, 0 replies; 5+ messages in thread
From: Gerd Hoffmann @ 2013-12-09 14:06 UTC (permalink / raw)
  To: qemu-devel; +Cc: Vassili Karpov (malc), Gerd Hoffmann

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 audio/paaudio.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/audio/paaudio.c b/audio/paaudio.c
index 8b69778..90ff245 100644
--- a/audio/paaudio.c
+++ b/audio/paaudio.c
@@ -547,11 +547,11 @@ static int qpa_init_out (HWVoiceOut *hw, struct audsettings *as)
     ss.rate = as->freq;
 
     /*
-     * qemu audio tick runs at 250 Hz (by default), so processing
-     * data chunks worth 4 ms of sound should be a good fit.
+     * qemu audio tick runs at 100 Hz (by default), so processing
+     * data chunks worth 10 ms of sound should be a good fit.
      */
-    ba.tlength = pa_usec_to_bytes (4 * 1000, &ss);
-    ba.minreq = pa_usec_to_bytes (2 * 1000, &ss);
+    ba.tlength = pa_usec_to_bytes (10 * 1000, &ss);
+    ba.minreq = pa_usec_to_bytes (5 * 1000, &ss);
     ba.maxlength = -1;
     ba.prebuf = -1;
 
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [Qemu-devel] [PATCH 3/4] adlib: fix patching of port I/O addresses
  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 ` Gerd Hoffmann
  2013-12-09 14:06 ` [Qemu-devel] [PATCH 4/4] intel-hda: fix position buffer Gerd Hoffmann
  3 siblings, 0 replies; 5+ messages in thread
From: Gerd Hoffmann @ 2013-12-09 14:06 UTC (permalink / raw)
  To: qemu-devel; +Cc: Paolo Bonzini, Vassili Karpov (malc), Gerd Hoffmann

From: Paolo Bonzini <pbonzini@redhat.com>

Commit 2b21fb5 (adlib: sort offsets in portio registration, 2013-08-14)
fixed the offsets in adlib_portio_list, but forgot the matching indices
in adlib_realizefn.

Reported at http://virtuallyfun.superglobalmegacorp.com/?p=3616 by
"neozeed".

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Hervé Poussineau <hpoussin@reactos.org>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 hw/audio/adlib.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/hw/audio/adlib.c b/hw/audio/adlib.c
index bd8e9d9..e88d2dd 100644
--- a/hw/audio/adlib.c
+++ b/hw/audio/adlib.c
@@ -347,8 +347,8 @@ static void adlib_realizefn (DeviceState *dev, Error **errp)
     s->samples = AUD_get_buffer_size_out (s->voice) >> SHIFT;
     s->mixbuf = g_malloc0 (s->samples << SHIFT);
 
-    adlib_portio_list[1].offset = s->port;
-    adlib_portio_list[2].offset = s->port + 8;
+    adlib_portio_list[0].offset = s->port;
+    adlib_portio_list[1].offset = s->port + 8;
     portio_list_init (port_list, OBJECT(s), adlib_portio_list, s, "adlib");
     portio_list_add (port_list, isa_address_space_io(&s->parent_obj), 0);
 }
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [Qemu-devel] [PATCH 4/4] intel-hda: fix position buffer
  2013-12-09 14:06 [Qemu-devel] [PULL 0/4] audio patch queue Gerd Hoffmann
                   ` (2 preceding siblings ...)
  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
  3 siblings, 0 replies; 5+ messages in thread
From: Gerd Hoffmann @ 2013-12-09 14:06 UTC (permalink / raw)
  To: qemu-devel; +Cc: Vassili Karpov (malc), Gerd Hoffmann, qemu-stable

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

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-12-09 14:06 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [Qemu-devel] [PATCH 4/4] intel-hda: fix position buffer Gerd Hoffmann

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).