qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [Qemu-stable] [PATCH 1/2] audio: honor QEMU_AUDIO_TIMER


From: Alex Bligh
Subject: Re: [Qemu-devel] [Qemu-stable] [PATCH 1/2] audio: honor QEMU_AUDIO_TIMER_PERIOD instead of waking up every *nano* second
Date: Tue, 03 Dec 2013 21:17:11 +0000



--On 3 December 2013 14:03:04 -0600 Michael Roth <address@hidden> wrote:

Note this will not apply to 1.5 and 1.6 as is.

What needs to be changed? Wouldn't this patch also restore the 250hz
frequency for 1.6, as it was pre-0.14?

The function names have changed as have the clock names.
At a guess (cut and paste diff, completely untested), you
need something like this:

diff --git a/audio/audio.c b/audio/audio.c
index 02bb886..45d146e 100644
--- a/audio/audio.c
+++ b/audio/audio.c
@@ -1124,7 +1124,8 @@ static int audio_is_timer_needed (void)
static void audio_reset_timer (AudioState *s)
{
    if (audio_is_timer_needed ()) {
-        qemu_mod_timer (s->ts, qemu_get_clock_ns (vm_clock) + 1);
+        qemu_mod_timer (s->ts, qemu_get_clock_ns (vm_clock) +
+                        conf.period.ticks);
    }
    else {
        qemu_del_timer (s->ts);

--
Alex Bligh



reply via email to

[Prev in Thread] Current Thread [Next in Thread]