qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] 4ba664: dsoundaudio: fix never-ending playbac


From: Peter Maydell
Subject: [Qemu-commits] [qemu/qemu] 4ba664: dsoundaudio: fix never-ending playback loop
Date: Tue, 07 Apr 2020 07:15:13 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 4ba664cb0aabecfc425aa94cd025c515e6251539
      
https://github.com/qemu/qemu/commit/4ba664cb0aabecfc425aa94cd025c515e6251539
  Author: Volker Rümelin <address@hidden>
  Date:   2020-04-06 (Mon, 06 Apr 2020)

  Changed paths:
    M audio/dsoundaudio.c

  Log Message:
  -----------
  dsoundaudio: fix never-ending playback loop

Currently the DirectSound backend fails to stop audio playback
in dsound_enable_out(). To detect a lost buffer condition
dsound_get_status_out() incorrectly uses the error code
DSERR_BUFFERLOST instead of flag DSBSTATUS_BUFFERLOST as a mask
and returns with an error. As a result dsound_enable_out()
returns early and doesn't stop playback.

To reproduce the bug start qemu on a Windows host with
-soundhw pcspk -audiodev dsound,id=audio0. On the guest
FreeDOS 1.2 command line enter beep. The image Day 1 - F-Bird
from the QEMU Advent Calendar 2018 shows the bug as well.

Buglink: https://bugs.launchpad.net/qemu/+bug/1699628
Signed-off-by: Volker Rümelin <address@hidden>
Message-id: address@hidden
Signed-off-by: Gerd Hoffmann <address@hidden>


  Commit: 174702986c04180e0c05cddbaf6b2547a07310eb
      
https://github.com/qemu/qemu/commit/174702986c04180e0c05cddbaf6b2547a07310eb
  Author: Volker Rümelin <address@hidden>
  Date:   2020-04-06 (Mon, 06 Apr 2020)

  Changed paths:
    M audio/dsoundaudio.c

  Log Message:
  -----------
  dsoundaudio: fix "Could not lock capture buffer" warning

IDirectSoundCaptureBuffer_Lock() fails on Windows when called
with len = 0. Return early from dsound_get_buffer_in() in this
case.

To reproduce the warning start a linux guest. In the guest
start Audacity and you will see a lot of "Could not lock
capture buffer" warnings.

Signed-off-by: Volker Rümelin <address@hidden>
Message-id: address@hidden
Signed-off-by: Gerd Hoffmann <address@hidden>


  Commit: 8d1439b692c5dc8edc4d4a1d334afd7070458029
      
https://github.com/qemu/qemu/commit/8d1439b692c5dc8edc4d4a1d334afd7070458029
  Author: Volker Rümelin <address@hidden>
  Date:   2020-04-06 (Mon, 06 Apr 2020)

  Changed paths:
    M audio/audio.c
    M audio/dsoundaudio.c

  Log Message:
  -----------
  dsoundaudio: dsound_get_buffer_in should honor *size

This patch prevents an underflow of variable samples in function
audio_pcm_hw_run_in(). See commit 599eac4e5a "audio:
audio_generic_get_buffer_in should honor *size". This time the
while loop in audio_pcm_hw_run_in() will terminate nevertheless,
because it seems the recording stream in Windows is always rate
limited.

Signed-off-by: Volker Rümelin <address@hidden>
Message-id: address@hidden
Signed-off-by: Gerd Hoffmann <address@hidden>


  Commit: ac2071c3791b67fc7af78b8ceb320c01ca1b5df7
      
https://github.com/qemu/qemu/commit/ac2071c3791b67fc7af78b8ceb320c01ca1b5df7
  Author: BALATON Zoltan <address@hidden>
  Date:   2020-04-07 (Tue, 07 Apr 2020)

  Changed paths:
    M hw/display/ati_2d.c

  Log Message:
  -----------
  ati-vga: Fix checks in ati_2d_blt() to avoid crash

In some corner cases (that never happen during normal operation but a
malicious guest could program wrong values) pixman functions were
called with parameters that result in a crash. Fix this and add more
checks to disallow such cases.

Reported-by: Ziming Zhang <address@hidden>
Signed-off-by: BALATON Zoltan <address@hidden>
Message-id: address@hidden
Signed-off-by: Gerd Hoffmann <address@hidden>


  Commit: ca74fc19883fd97ae84f2ce38e94ab9e26854d68
      
https://github.com/qemu/qemu/commit/ca74fc19883fd97ae84f2ce38e94ab9e26854d68
  Author: Peter Maydell <address@hidden>
  Date:   2020-04-07 (Tue, 07 Apr 2020)

  Changed paths:
    M audio/audio.c
    M audio/dsoundaudio.c
    M hw/display/ati_2d.c

  Log Message:
  -----------
  Merge remote-tracking branch 
'remotes/kraxel/tags/fixes-20200407-pull-request' into staging

fixes for 5.0:
- audio: windows (dsound) fixes.
- vga: ati blitter sanity check fixes.

# gpg: Signature made Tue 07 Apr 2020 10:21:44 BST
# gpg:                using RSA key 4CB6D8EED3E87138
# gpg: Good signature from "Gerd Hoffmann (work) <address@hidden>" [full]
# gpg:                 aka "Gerd Hoffmann <address@hidden>" [full]
# gpg:                 aka "Gerd Hoffmann (private) <address@hidden>" [full]
# Primary key fingerprint: A032 8CFF B93A 17A7 9901  FE7D 4CB6 D8EE D3E8 7138

* remotes/kraxel/tags/fixes-20200407-pull-request:
  ati-vga: Fix checks in ati_2d_blt() to avoid crash
  dsoundaudio: dsound_get_buffer_in should honor *size
  dsoundaudio: fix "Could not lock capture buffer" warning
  dsoundaudio: fix never-ending playback loop

Signed-off-by: Peter Maydell <address@hidden>


Compare: https://github.com/qemu/qemu/compare/c185e22112f5...ca74fc19883f



reply via email to

[Prev in Thread] Current Thread [Next in Thread]