Skip to content
Snippets Groups Projects
  1. Aug 21, 2020
    • Paolo Bonzini's avatar
      trace: switch position of headers to what Meson requires · 243af022
      Paolo Bonzini authored
      
      Meson doesn't enjoy the same flexibility we have with Make in choosing
      the include path.  In particular the tracing headers are using
      $(build_root)/$(<D).
      
      In order to keep the include directives unchanged,
      the simplest solution is to generate headers with patterns like
      "trace/trace-audio.h" and place forwarding headers in the source tree
      such that for example "audio/trace.h" includes "trace/trace-audio.h".
      
      This patch is too ugly to be applied to the Makefiles now.  It's only
      a way to separate the changes to the tracing header files from the
      Meson rewrite of the tracing logic.
      
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      243af022
  2. Jul 13, 2020
    • Volker Rümelin's avatar
      ossaudio: fix out of bounds write · 4f50d4a4
      Volker Rümelin authored
      
      In function oss_read() a read error currently does not exit the
      read loop. With no data to read the variable pos will quickly
      underflow and a subsequent successful read overwrites memory
      outside the buffer. This patch adds the missing break statement
      to the error path of the function.
      
      To reproduce start qemu with -audiodev oss,id=audio0 and in the
      guest start audio recording. After some time this will trigger
      an exception.
      
      Fixes: 3ba4066d "ossaudio: port to the new audio backend api"
      
      Signed-off-by: default avatarVolker Rümelin <vr_qemu@t-online.de>
      Message-id: 20200707180836.5435-1-vr_qemu@t-online.de
      Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
      4f50d4a4
  3. Jul 10, 2020
  4. Jun 17, 2020
  5. May 26, 2020
  6. May 25, 2020
  7. Apr 06, 2020
  8. Mar 16, 2020
  9. Feb 18, 2020
  10. Feb 06, 2020
  11. Jan 31, 2020
  12. Jan 24, 2020
  13. Jan 06, 2020
    • Volker Rümelin's avatar
      audio: fix integer overflow · 40ad46d3
      Volker Rümelin authored
      
      Tell the compiler to do a 32bit * 32bit -> 64bit multiplication
      because period_ticks is a 64bit variable. The overflow occurs
      for audio timer periods larger than 4294967us.
      
      Fixes: be1092af "audio: fix audio timer rate conversion bug"
      
      Signed-off-by: default avatarVolker Rümelin <vr_qemu@t-online.de>
      Message-id: 8893a235-66a8-8fbe-7d95-862e29da90b1@t-online.de
      Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
      40ad46d3
    • Volker Rümelin's avatar
      paaudio: wait until the recording stream is ready · 7c9eb86e
      Volker Rümelin authored
      
      Don't call pa_stream_peek before the recording stream is ready.
      
      Information to reproduce the problem.
      
      Start and stop Audacity in the guest several times because the
      problem is racy.
      
      libvirt log file:
      -audiodev pa,id=audio0,server=localhost,out.latency=30000,
       out.mixing-engine=off,in.mixing-engine=off \
      -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,
       resourcecontrol=deny \
      -msg timestamp=on
      : Domain id=4 is tainted: custom-argv
      char device redirected to /dev/pts/1 (label charserial0)
      audio: Device pcspk: audiodev default parameter is deprecated,
       please specify audiodev=audio0
      audio: Device hda: audiodev default parameter is deprecated,
       please specify audiodev=audio0
      pulseaudio: pa_stream_peek failed
      pulseaudio: Reason: Bad state
      pulseaudio: pa_stream_peek failed
      pulseaudio: Reason: Bad state
      
      Signed-off-by: default avatarVolker Rümelin <vr_qemu@t-online.de>
      Message-id: 20200104091122.13971-5-vr_qemu@t-online.de
      Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
      7c9eb86e
    • Volker Rümelin's avatar
      paaudio: try to drain the recording stream · acc3b63e
      Volker Rümelin authored
      
      There is no guarantee a single call to pa_stream_peek every
      timer_period microseconds can read a recording stream faster
      than the data gets produced at the source. Let qpa_read try to
      drain the recording stream.
      
      To reproduce the problem:
      
      Start qemu with -audiodev pa,id=audio0,in.mixing-engine=off
      
      On the host connect the qemu recording stream to the monitor of
      a hardware output device. While the problem can also be seen
      with a hardware input device, it's obvious with the monitor of
      a hardware output device.
      
      In the guest start audio recording with audacity and notice the
      slow recording data rate.
      
      Signed-off-by: default avatarVolker Rümelin <vr_qemu@t-online.de>
      Message-id: 20200104091122.13971-4-vr_qemu@t-online.de
      Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
      acc3b63e
    • Volker Rümelin's avatar
      paaudio: drop recording stream in qpa_fini_in · 4db3e634
      Volker Rümelin authored
      
      Every call to pa_stream_peek which returns a data length > 0
      should have a corresponding pa_stream_drop. A call to qpa_read
      does not necessarily call pa_stream_drop immediately after a
      call to pa_stream_peek. Test in qpa_fini_in if a last
      pa_stream_drop is needed.
      
      This prevents following messages in the libvirt log file after
      a recording stream gets closed and a new one opened.
      
      pulseaudio: pa_stream_drop failed
      pulseaudio: Reason: Bad state
      pulseaudio: pa_stream_drop failed
      pulseaudio: Reason: Bad state
      
      To reproduce start qemu with
      -audiodev pa,id=audio0,in.mixing-engine=off
      and in the guest start and stop Audacity several times.
      
      Signed-off-by: default avatarVolker Rümelin <vr_qemu@t-online.de>
      Message-id: 20200104091122.13971-3-vr_qemu@t-online.de
      Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
      4db3e634
  14. Nov 20, 2019
Loading