qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Pavel Dovgalyuk" <dovgaluk@ispras.ru>
To: 'Pavel Dovgalyuk' <pavel.dovgaluk@ispras.ru>, qemu-devel@nongnu.org
Cc: pbonzini@redhat.com, kraxel@redhat.com
Subject: Re: [Qemu-devel] [PATCH] audio: make audio poll timer deterministic
Date: Mon, 13 Feb 2017 08:04:46 +0300	[thread overview]
Message-ID: <000d01d285b6$b1f12a40$15d37ec0$@ru> (raw)
In-Reply-To: <20170131115913.6828.12266.stgit@PASHA-ISP>

Ping?

Pavel Dovgalyuk


> -----Original Message-----
> From: Pavel Dovgalyuk [mailto:pavel.dovgaluk@ispras.ru]
> Sent: Tuesday, January 31, 2017 2:59 PM
> To: qemu-devel@nongnu.org
> Cc: pbonzini@redhat.com; dovgaluk@ispras.ru; kraxel@redhat.com
> Subject: [PATCH] audio: make audio poll timer deterministic
> 
> This patch changes resetting strategy of the audio polling timer.
> It does not change expiration time if the timer is already set.
> 
> Signed-off-by: Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru>
> ---
>  audio/audio.c |    6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/audio/audio.c b/audio/audio.c
> index c845a44..1ee95a5 100644
> --- a/audio/audio.c
> +++ b/audio/audio.c
> @@ -1112,8 +1112,10 @@ static int audio_is_timer_needed (void)
>  static void audio_reset_timer (AudioState *s)
>  {
>      if (audio_is_timer_needed ()) {
> -        timer_mod (s->ts,
> -            qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL) + conf.period.ticks);
> +        if (!timer_pending(s->ts)) {
> +            timer_mod (s->ts,
> +                qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL) + conf.period.ticks);
> +        }
>      }
>      else {
>          timer_del (s->ts);

  parent reply	other threads:[~2017-02-13  5:04 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-31 11:59 [Qemu-devel] [PATCH] audio: make audio poll timer deterministic Pavel Dovgalyuk
2017-01-31 12:11 ` no-reply
2017-01-31 12:16 ` Marc-André Lureau
2017-01-31 12:32   ` Pavel Dovgalyuk
2017-02-01 13:20     ` Gerd Hoffmann
2017-02-13  5:04 ` Pavel Dovgalyuk [this message]
2017-02-13 18:40   ` Yurii Zubrytskyi
2017-02-14 11:57     ` Paolo Bonzini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='000d01d285b6$b1f12a40$15d37ec0$@ru' \
    --to=dovgaluk@ispras.ru \
    --cc=kraxel@redhat.com \
    --cc=pavel.dovgaluk@ispras.ru \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).