From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60186) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VnxLl-0006Zy-R9 for qemu-devel@nongnu.org; Tue, 03 Dec 2013 16:17:47 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VnxLi-00056H-JM for qemu-devel@nongnu.org; Tue, 03 Dec 2013 16:17:45 -0500 Date: Tue, 03 Dec 2013 21:17:11 +0000 From: Alex Bligh Message-ID: In-Reply-To: <20131203200304.16849.11017@loki> References: <1381347758-5016-1-git-send-email-hdegoede@redhat.com> <20131203200304.16849.11017@loki> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Subject: Re: [Qemu-devel] [Qemu-stable] [PATCH 1/2] audio: honor QEMU_AUDIO_TIMER_PERIOD instead of waking up every *nano* second Reply-To: Alex Bligh List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Michael Roth , Hans de Goede , malc Cc: qemu-devel@nongnu.org, Paolo Bonzini , qemu-stable@nongnu.org, Alex Bligh --On 3 December 2013 14:03:04 -0600 Michael Roth 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