qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] 36963e: audio/jack: fix invalid minimum buffe


From: Peter Maydell
Subject: [Qemu-commits] [qemu/qemu] 36963e: audio/jack: fix invalid minimum buffer size check
Date: Mon, 22 Jun 2020 06:45:30 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 36963ed116b625c6dcdf71002c804f893dc6fdc1
      
https://github.com/qemu/qemu/commit/36963ed116b625c6dcdf71002c804f893dc6fdc1
  Author: Geoffrey McRae <geoff@hostfission.com>
  Date:   2020-06-17 (Wed, 17 Jun 2020)

  Changed paths:
    M audio/jackaudio.c

  Log Message:
  -----------
  audio/jack: fix invalid minimum buffer size check

JACK does not provide us with the configured buffer size until after
activiation which was overriding this minimum value. JACK itself doesn't
have this minimum limitation, but the QEMU virtual hardware and as such
it must be enforced, failure to do so results in audio discontinuities.

Signed-off-by: Geoffrey McRae <geoff@hostfission.com>
Message-id: 20200613040518.38172-2-geoff@hostfission.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>


  Commit: 2f33ee08083ca540120ab572a7130f08c4d47be3
      
https://github.com/qemu/qemu/commit/2f33ee08083ca540120ab572a7130f08c4d47be3
  Author: Geoffrey McRae <geoff@hostfission.com>
  Date:   2020-06-17 (Wed, 17 Jun 2020)

  Changed paths:
    M audio/jackaudio.c

  Log Message:
  -----------
  audio/jack: remove unused stopped state

Signed-off-by: Geoffrey McRae <geoff@hostfission.com>
Message-id: 20200613040518.38172-3-geoff@hostfission.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>


  Commit: f8f0f218d4212598eab6c824754cfc40d4961ab7
      
https://github.com/qemu/qemu/commit/f8f0f218d4212598eab6c824754cfc40d4961ab7
  Author: Geoffrey McRae <geoff@hostfission.com>
  Date:   2020-06-17 (Wed, 17 Jun 2020)

  Changed paths:
    M audio/jackaudio.c

  Log Message:
  -----------
  audio/jack: remove invalid set of input support bool

Initial code for JACK did not support audio input and as such this
boolean was set to let QEMU know, however JACK ended up including input
support making this invalid. Further investigation shows it was invalid
to set it in the first instance anyway due to a failure on my part
understand properly what this was for when the audodev was initially
developed.

Signed-off-by: Geoffrey McRae <geoff@hostfission.com>
Message-id: 20200613040518.38172-4-geoff@hostfission.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>


  Commit: de82640843769e84139b5b5a8ed60b076f0bcabe
      
https://github.com/qemu/qemu/commit/de82640843769e84139b5b5a8ed60b076f0bcabe
  Author: Geoffrey McRae <geoff@hostfission.com>
  Date:   2020-06-17 (Wed, 17 Jun 2020)

  Changed paths:
    M audio/jackaudio.c

  Log Message:
  -----------
  audio/jack: do not remove ports when finishing

This fixes a hang when there is a communications issue with the JACK
server. Simply closing the connection is enough to completely clean up
and as such we do not need to remove the ports first. As JACK uses a
socket based protocol that relies on the `select` call, if there is a
communication breakdown with the server the client library waits
forever for a response to the unregister request.

Signed-off-by: Geoffrey McRae <geoff@hostfission.com>
Message-id: 20200613040518.38172-5-geoff@hostfission.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>


  Commit: 81e0efb2e57cfdb076887b0f99ce6f0353952617
      
https://github.com/qemu/qemu/commit/81e0efb2e57cfdb076887b0f99ce6f0353952617
  Author: Geoffrey McRae <geoff@hostfission.com>
  Date:   2020-06-17 (Wed, 17 Jun 2020)

  Changed paths:
    M audio/jackaudio.c

  Log Message:
  -----------
  audio/jack: honour the enable state of the audio device

When the guest closes the audio device we must start dropping input
samples from JACK and zeroing the output buffer samples. Failure to do
so causes sound artifacts during operations such as guest OS reboot, and
causes a hang of the input pipeline breaking it until QEMU is restated.

Closing and reconnecting to JACK was tested during these enable/disable
calls which works well for Linux guests, however Windows re-opens the
audio hardware repeatedly even when doing simple tasks like playing a
system sounds. As such it was decided it is better to feed silence to
JACK while the device is disabled.

Signed-off-by: Geoffrey McRae <geoff@hostfission.com>
Message-id: 20200613040518.38172-6-geoff@hostfission.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>


  Commit: bc81e6e56eeea88bb1e3b6105c80850ffb58841c
      
https://github.com/qemu/qemu/commit/bc81e6e56eeea88bb1e3b6105c80850ffb58841c
  Author: Geoffrey McRae <geoff@hostfission.com>
  Date:   2020-06-17 (Wed, 17 Jun 2020)

  Changed paths:
    M audio/jackaudio.c

  Log Message:
  -----------
  audio/jack: simplify the re-init code path

Instead of checking for the audodev state in each code path, centralize
the check into the initialize function itself to make it safe to call it
at any time.

Signed-off-by: Geoffrey McRae <geoff@hostfission.com>
Message-id: 20200613040518.38172-7-geoff@hostfission.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>


  Commit: 586803455b3fa44d949ecd42cd9c87e5a6287aef
      
https://github.com/qemu/qemu/commit/586803455b3fa44d949ecd42cd9c87e5a6287aef
  Author: Allan Peramaki <aperamak@pp1.inet.fi>
  Date:   2020-06-19 (Fri, 19 Jun 2020)

  Changed paths:
    M hw/audio/gusemu_hal.c
    M hw/audio/gusemu_mixer.c

  Log Message:
  -----------
  hw/audio/gus: Fix registers 32-bit access

Fix audio on software that accesses DRAM above 64k via register
peek/poke and some cases when more than 16 voices are used.

Cc: qemu-stable@nongnu.org
Fixes: 135f5ae1974c ("audio: GUSsample is int16_t")
Signed-off-by: Allan Peramaki <aperamak@pp1.inet.fi>
Tested-by: Volker Rümelin <vr_qemu@t-online.de>
Reviewed-by: Volker Rümelin <vr_qemu@t-online.de>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-id: 20200618103623.6031-1-philmd@redhat.com
Message-Id: <20200615201757.16868-1-aperamak@pp1.inet.fi>
[PMD: Removed unrelated style changes]
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>


  Commit: bae31bfa48b9caecee25da3d5333901a126a06b4
      
https://github.com/qemu/qemu/commit/bae31bfa48b9caecee25da3d5333901a126a06b4
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2020-06-19 (Fri, 19 Jun 2020)

  Changed paths:
    M audio/jackaudio.c
    M hw/audio/gusemu_hal.c
    M hw/audio/gusemu_mixer.c

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

audio: bugfixes for jack backend and gus emulation.

# gpg: Signature made Fri 19 Jun 2020 14:17:22 BST
# gpg:                using RSA key 4CB6D8EED3E87138
# gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" [full]
# gpg:                 aka "Gerd Hoffmann <gerd@kraxel.org>" [full]
# gpg:                 aka "Gerd Hoffmann (private) <kraxel@gmail.com>" [full]
# Primary key fingerprint: A032 8CFF B93A 17A7 9901  FE7D 4CB6 D8EE D3E8 7138

* remotes/kraxel/tags/audio-20200619-pull-request:
  hw/audio/gus: Fix registers 32-bit access
  audio/jack: simplify the re-init code path
  audio/jack: honour the enable state of the audio device
  audio/jack: do not remove ports when finishing
  audio/jack: remove invalid set of input support bool
  audio/jack: remove unused stopped state
  audio/jack: fix invalid minimum buffer size check

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


Compare: https://github.com/qemu/qemu/compare/06c4cc3660b3...bae31bfa48b9



reply via email to

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