Skip to content
Snippets Groups Projects
  1. Jan 15, 2021
  2. Jan 31, 2020
    • Volker Rümelin's avatar
      audio: fix bug 1858488 · fdc8c5f4
      Volker Rümelin authored
      The combined generic buffer management code and buffer run out
      code in function audio_generic_put_buffer_out has a problematic
      behaviour. A few hundred milliseconds after playback starts the
      mixing buffer and the generic buffer are nearly full and the
      following pattern can be seen.
      
      On first call of audio_pcm_hw_run_out the buffer run code in
      audio_generic_put_buffer_out writes some data to the audio
      hardware but the generic buffer will fill faster and is full
      when audio_pcm_hw_run_out returns. This is because emulated
      audio devices can produce playback data at a higher rate than
      the audio backend hardware consumes this data.
      
      On next call of audio_pcm_hw_run_out the buffer run code in
      audio_generic_put_buffer_out writes some data to the audio
      hardware but no audio data is transferred to the generic buffer
      because the buffer is already full.
      
      Then the pattern repeats. For the emulated audio device this
      looks like the audio timer period has doubled.
      
      This patch splits the combined generic buffer management code
      and buffer run out code and calls the buffer run out code after
      buffer management code to break this pattern.
      
      The bug report is for the wav audio backend. But the problem is
      not limited to this backend. All audio backends which use the
      audio_generic_put_buffer_out function show this problem.
      
      Buglink: https://bugs.launchpad.net/qemu/+bug/1858488
      
      
      Signed-off-by: default avatarVolker Rümelin <vr_qemu@t-online.de>
      Message-Id: <20200123074943.6699-5-vr_qemu@t-online.de>
      Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
      fdc8c5f4
  3. Oct 18, 2019
  4. Sep 23, 2019
  5. Aug 21, 2019
  6. Jun 12, 2019
  7. Mar 11, 2019
  8. Mar 12, 2018
  9. May 19, 2016
  10. Mar 22, 2016
    • Rutuja Shah's avatar
      Replaced get_tick_per_sec() by NANOSECONDS_PER_SECOND · 73bcb24d
      Rutuja Shah authored
      
      This patch replaces get_ticks_per_sec() calls with the macro
      NANOSECONDS_PER_SECOND. Also, as there are no callers, get_ticks_per_sec()
      is then removed.  This replacement improves the readability and
      understandability of code.
      
      For example,
      
          timer_mod(fdctrl->result_timer,
      	      qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL) + (get_ticks_per_sec() / 50));
      
      NANOSECONDS_PER_SECOND makes it obvious that qemu_clock_get_ns
      matches the unit of the expression on the right side of the plus.
      
      Signed-off-by: default avatarRutuja Shah <rutu.shah.26@gmail.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      73bcb24d
  11. Feb 02, 2016
  12. Jun 15, 2015
  13. Aug 22, 2013
  14. Dec 19, 2012
  15. Mar 21, 2011
    • Paolo Bonzini's avatar
      change all other clock references to use nanosecond resolution accessors · 74475455
      Paolo Bonzini authored
      
      This was done with:
      
          sed -i 's/qemu_get_clock\>/qemu_get_clock_ns/' \
              $(git grep -l 'qemu_get_clock\>' )
          sed -i 's/qemu_new_timer\>/qemu_new_timer_ns/' \
              $(git grep -l 'qemu_new_timer\>' )
      
      after checking that get_clock and new_timer never occur twice
      on the same line.  There were no missed occurrences; however, even
      if there had been, they would have been caught by the compiler.
      
      There was exactly one false positive in qemu_run_timers:
      
           -    current_time = qemu_get_clock (clock);
           +    current_time = qemu_get_clock_ns (clock);
      
      which is of course not in this patch.
      
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      74475455
  16. Jan 04, 2011
  17. Dec 10, 2010
  18. Sep 18, 2009
  19. Sep 11, 2009
  20. Aug 11, 2009
  21. Dec 03, 2008
  22. Oct 06, 2008
  23. Oct 05, 2008
  24. Nov 17, 2007
  25. Jul 16, 2006
  26. Jul 04, 2006
  27. Nov 05, 2005
  28. Oct 30, 2005
  29. Dec 06, 2004
  30. Nov 11, 2004
Loading