qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] 243011: alsaaudio: remove #ifdef DEBUG to avo


From: Peter Maydell
Subject: [Qemu-commits] [qemu/qemu] 243011: alsaaudio: remove #ifdef DEBUG to avoid bit rot
Date: Fri, 18 Jun 2021 06:01:25 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 243011896ad2503e515b4fed746402e651b8e520
      
https://github.com/qemu/qemu/commit/243011896ad2503e515b4fed746402e651b8e520
  Author: Volker Rümelin <vr_qemu@t-online.de>
  Date:   2021-06-17 (Thu, 17 Jun 2021)

  Changed paths:
    M audio/alsaaudio.c

  Log Message:
  -----------
  alsaaudio: remove #ifdef DEBUG to avoid bit rot

Merge the #ifdef DEBUG code with the if statement a few lines
above to avoid bit rot.

Suggested-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Volker Rümelin <vr_qemu@t-online.de>
Message-Id: <20210517194604.2545-1-vr_qemu@t-online.de>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>


  Commit: 50db82d84ce24e893932ecb1aa90cc9c5560fc91
      
https://github.com/qemu/qemu/commit/50db82d84ce24e893932ecb1aa90cc9c5560fc91
  Author: Volker Rümelin <vr_qemu@t-online.de>
  Date:   2021-06-17 (Thu, 17 Jun 2021)

  Changed paths:
    M audio/paaudio.c

  Log Message:
  -----------
  paaudio: remove unused stream flags

In current code there are no calls to pa_stream_get_latency()
or pa_stream_get_time() to receive latency or time information.

Remove the flags PA_STREAM_INTERPOLATE_TIMING and
PA_STREAM_AUTO_TIMING_UPDATE which instruct PulseAudio to
calculate this information in regular intervals.

Signed-off-by: Volker Rümelin <vr_qemu@t-online.de>
Message-Id: <20210517194604.2545-2-vr_qemu@t-online.de>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>


  Commit: 37a54d054f5aac43cb5721c68954b8b76d0db12d
      
https://github.com/qemu/qemu/commit/37a54d054f5aac43cb5721c68954b8b76d0db12d
  Author: Volker Rümelin <vr_qemu@t-online.de>
  Date:   2021-06-17 (Thu, 17 Jun 2021)

  Changed paths:
    M audio/audio.c
    M audio/audio_int.h
    M audio/paaudio.c

  Log Message:
  -----------
  audio: move code to audio/audio.c

Move the code to generate the pa_context_new() application name
argument to a function in audio/audio.c. The new function
audio_application_name() will also be used in the jackaudio
backend.

Signed-off-by: Volker Rümelin <vr_qemu@t-online.de>
Message-Id: <20210517194604.2545-3-vr_qemu@t-online.de>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>


  Commit: 2833d697b9a418e2b9735e38ad4b33ae86f84739
      
https://github.com/qemu/qemu/commit/2833d697b9a418e2b9735e38ad4b33ae86f84739
  Author: Volker Rümelin <vr_qemu@t-online.de>
  Date:   2021-06-17 (Thu, 17 Jun 2021)

  Changed paths:
    M audio/jackaudio.c

  Log Message:
  -----------
  jackaudio: avoid that the client name contains the word (NULL)

Currently with jackaudio client name and qemu guest name unset,
the JACK client names are out-(NULL) and in-(NULL). These names
are user visible in the patch bay. Replace the function call to
qemu_get_vm_name() with a call to audio_application_name() which
replaces NULL with "qemu" to have more descriptive names.

Signed-off-by: Volker Rümelin <vr_qemu@t-online.de>
Message-Id: <20210517194604.2545-4-vr_qemu@t-online.de>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>


  Commit: a2cd86a94a881b38a7d8bb67c61920ab3b23e82d
      
https://github.com/qemu/qemu/commit/a2cd86a94a881b38a7d8bb67c61920ab3b23e82d
  Author: Philippe Mathieu-Daudé <f4bug@amsat.org>
  Date:   2021-06-17 (Thu, 17 Jun 2021)

  Changed paths:
    M MAINTAINERS
    M hw/audio/sb16.c
    A tests/qtest/fuzz-sb16-test.c
    M tests/qtest/meson.build

  Log Message:
  -----------
  hw/audio/sb16: Avoid assertion by restricting I/O sampling rate range

While the SB16 seems to work up to 48000 Hz, the "Sound Blaster Series
Hardware Programming Guide" limit the sampling range from 4000 Hz to
44100 Hz (Section 3-9, 3-10: Digitized Sound I/O Programming, tables
3-2 and 3-3).

Later, section 6-15 (DSP Commands) is more specific regarding the 41h /
42h registers (Set digitized sound output sampling rate):

  Valid sampling rates range from 5000 to 45000 Hz inclusive.

There is no comment regarding error handling if the register is filled
with an out-of-range value.  (See also section 3-28 "8-bit or 16-bit
Auto-initialize Transfer"). Assume limits are enforced in hardware.

This fixes triggering an assertion in audio_calloc():

  #1 abort
  #2 audio_bug audio/audio.c:119:9
  #3 audio_calloc audio/audio.c:154:9
  #4 audio_pcm_sw_alloc_resources_out audio/audio_template.h:116:15
  #5 audio_pcm_sw_init_out audio/audio_template.h:175:11
  #6 audio_pcm_create_voice_pair_out audio/audio_template.h:410:9
  #7 AUD_open_out audio/audio_template.h:503:14
  #8 continue_dma8 hw/audio/sb16.c:216:20
  #9 dma_cmd8 hw/audio/sb16.c:276:5
  #10 command hw/audio/sb16.c:0
  #11 dsp_write hw/audio/sb16.c:949:13
  #12 portio_write softmmu/ioport.c:205:13
  #13 memory_region_write_accessor softmmu/memory.c:491:5
  #14 access_with_adjusted_size softmmu/memory.c:552:18
  #15 memory_region_dispatch_write softmmu/memory.c:0:13
  #16 flatview_write_continue softmmu/physmem.c:2759:23
  #17 flatview_write softmmu/physmem.c:2799:14
  #18 address_space_write softmmu/physmem.c:2891:18
  #19 cpu_outw softmmu/ioport.c:70:5

[*] http://www.baudline.com/solutions/full_duplex/sb16_pci/index.html

OSS-Fuzz Report: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=29174

Fixes: 85571bc7415 ("audio merge (malc)")
Buglink: https://bugs.launchpad.net/bugs/1910603
Tested-by: Qiang Liu <cyruscyliu@gmail.com>
Reviewed-by: Qiang Liu <cyruscyliu@gmail.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20210616104349.2398060-1-f4bug@amsat.org>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>


  Commit: 0c29b786e6b5276d43be2be255a8323c628ec790
      
https://github.com/qemu/qemu/commit/0c29b786e6b5276d43be2be255a8323c628ec790
  Author: Akihiko Odaki <akihiko.odaki@gmail.com>
  Date:   2021-06-17 (Thu, 17 Jun 2021)

  Changed paths:
    M audio/audio.c

  Log Message:
  -----------
  audio: Fix format specifications of debug logs

Signed-off-by: Akihiko Odaki <akihiko.odaki@gmail.com>
Message-id: 20210616141411.53892-1-akihiko.odaki@gmail.com
Message-Id: <20210616141411.53892-1-akihiko.odaki@gmail.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>


  Commit: 986bdbc6a29c4d7ef125299c5013783e30dc2cae
      
https://github.com/qemu/qemu/commit/986bdbc6a29c4d7ef125299c5013783e30dc2cae
  Author: Akihiko Odaki <akihiko.odaki@gmail.com>
  Date:   2021-06-17 (Thu, 17 Jun 2021)

  Changed paths:
    M audio/coreaudio.c

  Log Message:
  -----------
  coreaudio: Fix output stream format settings

Before commit 7d6948cd98cf5ad8a3458a4ce7fdbcb79bcd1212, it was coded to
retrieve the initial output stream format settings, modify the frame
rate, and set again. However, I removed a frame rate modification code by
mistake in the commit. It also assumes the initial output stream format
is consistent with what QEMU expects, but that expectation is not in the
code, which makes it harder to understand and will lead to breakage if
the initial settings change.

This change explicitly sets all of the output stream settings to solve
these problems.

Signed-off-by: Akihiko Odaki <akihiko.odaki@gmail.com>
Message-Id: <20210616141721.54091-1-akihiko.odaki@gmail.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>


  Commit: 3ccf6cd0e3e1dfd663814640b3b18b55715d7a75
      
https://github.com/qemu/qemu/commit/3ccf6cd0e3e1dfd663814640b3b18b55715d7a75
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    M MAINTAINERS
    M audio/alsaaudio.c
    M audio/audio.c
    M audio/audio_int.h
    M audio/coreaudio.c
    M audio/jackaudio.c
    M audio/paaudio.c
    M hw/audio/sb16.c
    A tests/qtest/fuzz-sb16-test.c
    M tests/qtest/meson.build

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

audio: bugfix collection.

# gpg: Signature made Thu 17 Jun 2021 13:40:56 BST
# gpg:                using RSA key A0328CFFB93A17A79901FE7D4CB6D8EED3E87138
# 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-20210617-pull-request:
  coreaudio: Fix output stream format settings
  audio: Fix format specifications of debug logs
  hw/audio/sb16: Avoid assertion by restricting I/O sampling rate range
  jackaudio: avoid that the client name contains the word (NULL)
  audio: move code to audio/audio.c
  paaudio: remove unused stream flags
  alsaaudio: remove #ifdef DEBUG to avoid bit rot

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


Compare: https://github.com/qemu/qemu/compare/b6d73e9cb1c6...3ccf6cd0e3e1



reply via email to

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