[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: |
Michael Roth |
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 16:00:19 -0600 |
User-agent: |
alot/0.3.4 |
Quoting Alex Bligh (2013-12-03 15:17:11)
> --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);
Ah, thanks, this looks correct. Kept staring at 1.6/1.7 versions and wasn't
seeing a difference for some reason...
>
> --
> Alex Bligh